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

# Update an LLM provider

> Partial update - only the fields in the body change. org_id is not accepted - scope is create-only. The rules of the create apply to the provider as it is after the update. requires_auth: false clears the credential. An archived provider returns 404. An organization-scoped caller writing a tenant-wide provider gets 403. enabled: false sets each agent engine that uses one of its models as its own back to the default model, and a later enabled: true does not restore them. It returns 409 RESOURCE_IN_USE when a default model or a backup model list (of the tenant or of an organization) names one of its models, with details.settings naming those settings and an organization the caller cannot read as "another organization"; when an engine would find no default model; or when an agent of an organization the caller cannot write uses one of its models. When one of its models is the Text LLM model or the Multimodal model of the tenant, replacements names the model that takes its place, else the call returns 409. A Discovery model among its models is cleared, so discovery uses the Text LLM model.



## OpenAPI

````yaml /0.23/openapi.json post /api/v1/llm-providers/{id}
openapi: 3.0.3
info:
  title: 2501 Public API
  version: v1
  description: >-
    The stable, versioned HTTP API for driving 2501 as code. See the API
    Overview for authentication, the org_id rule, cursor pagination, and the
    error envelope.
servers:
  - url: https://{command_center_host}
    variables:
      command_center_host:
        default: your-command-center-host
        description: Your Command Center host
security:
  - bearerAuth: []
paths:
  /api/v1/llm-providers/{id}:
    post:
      tags:
        - Usage
      summary: Update an LLM provider
      description: >-
        Partial update - only the fields in the body change. org_id is not
        accepted - scope is create-only. The rules of the create apply to the
        provider as it is after the update. requires_auth: false clears the
        credential. An archived provider returns 404. An organization-scoped
        caller writing a tenant-wide provider gets 403. enabled: false sets each
        agent engine that uses one of its models as its own back to the default
        model, and a later enabled: true does not restore them. It returns 409
        RESOURCE_IN_USE when a default model or a backup model list (of the
        tenant or of an organization) names one of its models, with
        details.settings naming those settings and an organization the caller
        cannot read as "another organization"; when an engine would find no
        default model; or when an agent of an organization the caller cannot
        write uses one of its models. When one of its models is the Text LLM
        model or the Multimodal model of the tenant, replacements names the
        model that takes its place, else the call returns 409. A Discovery model
        among its models is cleared, so discovery uses the Text LLM model.
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                key:
                  type: string
                  minLength: 1
                  maxLength: 80
                kind:
                  type: string
                  enum:
                    - anthropic
                    - anthropic-compatible
                    - azure
                    - cohere
                    - deepseek
                    - mistral
                    - openai
                    - openai-compatible
                    - openrouter
                    - togetherai
                requires_auth:
                  type: boolean
                api_key_credential_id:
                  type: string
                  nullable: true
                base_url:
                  type: string
                  nullable: true
                  format: uri
                provider_args:
                  type: object
                  additionalProperties:
                    nullable: true
                max_concurrency:
                  type: integer
                  nullable: true
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 2147483647
                enabled:
                  type: boolean
                replacements:
                  type: object
                  properties:
                    llm_model:
                      type: string
                      minLength: 1
                    multimodal_llm_model:
                      type: string
                      minLength: 1
      responses:
        '200':
          description: The updated provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LlmProvider'
        '400':
          description: >-
            Bad request - a field is missing, malformed, or not allowed
            (VALIDATION_FAILED, BAD_REQUEST, INVALID_CURSOR)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            No credentials, or a key that is invalid, revoked, or expired
            (UNAUTHORIZED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Authenticated but not allowed (FORBIDDEN, ORG_ACCESS_DENIED,
            STEP_UP_REFUSED, TWO_FACTOR_ENROLLMENT_REQUIRED,
            LICENSE_CAP_REACHED, LICENSE_EXPIRED, FEATURE_NOT_LICENSED with
            details.feature and details.reason `not_licensed`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such row that this caller can see (NOT_FOUND)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The write conflicts with existing data (CONFLICT, DUPLICATE_KEY,
            FOREIGN_KEY_VIOLATION, RESOURCE_IN_USE)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    LlmProvider:
      type: object
      properties:
        id:
          type: string
          example: llmp_3f8a1c2d-...
        key:
          type: string
          description: Unique among the tenant's live providers
        org_id:
          type: string
          nullable: true
          description: >-
            The organization the provider and its models belong to; null when
            tenant-wide
        kind:
          type: string
          description: The provider type, such as openai, anthropic or azure
        requires_auth:
          type: boolean
        api_key_credential_id:
          type: string
          nullable: true
          description: >-
            The credential holding the API key; null without one. A provider
            created before credentials could be attached may require auth with
            this null: it resolves its key by credential name, which v1 does not
            show. Attach a credential to such a provider by setting this field.
        base_url:
          type: string
          nullable: true
        provider_args:
          type: object
          additionalProperties:
            nullable: true
          description: >-
            Kind-specific options, such as the API version and auth mode of an
            azure provider
        max_concurrency:
          type: integer
          nullable: true
          description: >-
            Max requests in flight to the provider, shared by its models; null
            means no limit
        enabled:
          type: boolean
        archived_at:
          type: string
          nullable: true
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
          description: >-
            Set when the provider was removed; it stays listed because archived
            models point at it
        created_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
      required:
        - id
        - key
        - org_id
        - kind
        - requires_auth
        - api_key_credential_id
        - base_url
        - provider_args
        - max_concurrency
        - enabled
        - archived_at
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        code:
          type: string
          example: VALIDATION_FAILED
        message:
          type: string
          example: Validation failed
        request_id:
          type: string
          example: req_3702b7e7-...
        field:
          type: string
          description: Set when one input is at fault
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
          description: Set when several inputs are at fault
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - message
        - request_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key minted in Command Center (Settings -> API Keys), sent as
        `Authorization: Bearer 2501_ak_...`. A Command Center session cookie is
        also accepted.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.