---
updatedAt: 2026-09-05T01:44:39.000Z
agentTools:
  projectIndex: https://docs.pennsieve.io/llms.txt
---

# Set node-wide LLM cost budget

Updates the node-wide LLM cost budget the governor enforces on every
invocation. Applies to chat and to workflow applications that invoke
the LLM — this is the only enforcement layer that catches non-chat
callers (per-user chat quotas don't apply to workflow apps).

**Permissions:** Node owner only.

Note: the governor caches SSM values for ~60 seconds, so changes take
up to a minute to take effect on in-flight invocations.


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "version": "3.0",
    "title": "Compute Resources API",
    "description": "This is the serverless Compute Resources API\n",
    "termsOfService": "https://docs.pennsieve.io/page/pennsieve-terms-of-use",
    "contact": {
      "name": "Pennsieve Support",
      "email": "support@pennsieve.net"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "servers": [
    {
      "url": "https://api2.pennsieve.io/compute/resources",
      "description": "Production server"
    },
    {
      "url": "https://api2.pennsieve.net/compute/resources",
      "description": "Development server"
    }
  ],
  "externalDocs": {
    "description": "Find more info here",
    "url": "https://docs.pennsieve.io"
  },
  "tags": [
    {
      "name": "LLM Access",
      "description": "Enabling and configuring LLM access on a compute node, including the model\nallow-list and the BAA acknowledgement required before enabling it.\n"
    }
  ],
  "components": {
    "x-amazon-apigateway-integrations": {
      "account-service": {
        "type": "aws_proxy",
        "uri": "${account_service_lambda_arn}",
        "httpMethod": "POST",
        "passthroughBehavior": "when_no_match",
        "contentHandling": "CONVERT_TO_TEXT",
        "payloadFormatVersion": 2
      }
    },
    "securitySchemes": {
      "token_auth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header",
        "x-amazon-apigateway-authorizer": {
          "identitySource": "$request.header.Authorization",
          "authorizerUri": "${authorize_lambda_invoke_uri}",
          "authorizerPayloadFormatVersion": "2.0",
          "authorizerResultTtlInSeconds": 300,
          "type": "request",
          "enableSimpleResponses": true,
          "authorizerCredentials": "${gateway_authorizer_role}"
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Incorrect authentication or user has incorrect permissions.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "BadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error": {
        "description": "Server Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/compute-nodes/{id}/llm-config": {
      "put": {
        "summary": "Set node-wide LLM cost budget",
        "description": "Updates the node-wide LLM cost budget the governor enforces on every\ninvocation. Applies to chat and to workflow applications that invoke\nthe LLM — this is the only enforcement layer that catches non-chat\ncallers (per-user chat quotas don't apply to workflow apps).\n\n**Permissions:** Node owner only.\n\nNote: the governor caches SSM values for ~60 seconds, so changes take\nup to a minute to take effect on in-flight invocations.\n",
        "x-amazon-apigateway-integration": {
          "$ref": "#/components/x-amazon-apigateway-integrations/account-service"
        },
        "operationId": "putLLMConfig",
        "security": [
          {
            "token_auth": []
          }
        ],
        "tags": [
          "LLM Access"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The UUID of the compute node"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "budgetUsd",
                  "budgetPeriod"
                ],
                "properties": {
                  "budgetUsd": {
                    "type": "number",
                    "format": "double",
                    "minimum": 0,
                    "description": "Cost cap in USD for the chosen period."
                  },
                  "budgetPeriod": {
                    "type": "string",
                    "enum": [
                      "daily",
                      "monthly"
                    ],
                    "description": "Period the cap applies to."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "LLM budget updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "budgetUsd": {
                      "type": "number",
                      "format": "double"
                    },
                    "budgetPeriod": {
                      "type": "string",
                      "enum": [
                        "daily",
                        "monthly"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "4XX": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "5XX": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  }
}
```