> ## Documentation Index
> Fetch the complete documentation index at: https://docs.korve.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Update

> Update model allowlists, budget, timeout, retry, and prompt-retention policy.



## OpenAPI

````yaml /openapi.json patch /v1/orgs/{orgId}/projects/{projectId}/ai-gateways/{gatewayId}
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/ai-gateways/{gatewayId}:
    patch:
      tags:
        - aiGateways
      summary: Update
      description: >-
        Update model allowlists, budget, timeout, retry, and prompt-retention
        policy.
      operationId: aiGateways.update
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
        - name: gatewayId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        x-korve-max-bytes: 1048576
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  pattern: ^[a-z][a-z0-9-]{1,61}$
                allowedModels:
                  type: array
                  items:
                    type: string
                    enum:
                      - korve/fast
                      - korve/balanced
                      - korve/reasoning
                  minItems: 1
                  maxItems: 3
                  uniqueItems: true
                monthlyBudgetUsd:
                  type: number
                  minimum: 1
                  maximum: 100000
                timeoutMs:
                  type: integer
                  minimum: 1000
                  maximum: 120000
                maxRetries:
                  type: integer
                  minimum: 0
                  maximum: 3
                redactPrompts:
                  type: boolean
              additionalProperties: false
              minProperties: 1
      responses:
        '200':
          description: Updated AI gateway.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  environment:
                    type: string
                  allowedModels:
                    type: array
                    items:
                      type: string
                      enum:
                        - korve/fast
                        - korve/balanced
                        - korve/reasoning
                  monthlyBudgetUsd:
                    type: number
                  timeoutMs:
                    type: integer
                  maxRetries:
                    type: integer
                  redactPrompts:
                    type: boolean
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - name
                  - environment
                  - allowedModels
                  - monthlyBudgetUsd
                  - timeoutMs
                  - maxRetries
                  - redactPrompts
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '404':
          description: No such gateway.
        '422':
          description: Invalid gateway configuration.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````