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

# Update model provider key

> Update an existing model provider key configuration



## OpenAPI

````yaml /public-apis/openapi/models.json put /v1/models
openapi: 3.0.0
info:
  version: 1.0.0
  contact:
    name: Maxim Engineering
    email: eng@getmaxim.ai
  title: Maxim SDK API - models
  description: API documentation for Maxim SDK models endpoints
servers:
  - url: https://api.getmaxim.ai
security: []
paths:
  /v1/models:
    put:
      tags:
        - Models
      summary: Update model provider key
      description: Update an existing model provider key configuration
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                  description: Unique identifier of the model provider key to update
                name:
                  type: string
                  minLength: 1
                  description: Name for the API key configuration
                value:
                  type: string
                  minLength: 1
                  description: The API key value (omit to keep existing value)
                models:
                  type: array
                  items:
                    type: string
                  description: List of model IDs to associate with this key
                meta:
                  type: object
                  properties:
                    key2:
                      type: string
                      description: Secondary API key for Azure
                    secretAccessKey:
                      type: string
                      description: Secret access key for AWS Bedrock
                    sessionToken:
                      type: string
                      description: Session token for AWS Bedrock
                  description: >-
                    Key-related metadata fields. Includes key2 for Azure,
                    secretAccessKey and sessionToken for Bedrock.
                enabled:
                  type: boolean
                  description: Whether the key is enabled
                customPricingStructureId:
                  type: string
                  nullable: true
                  description: ID of a custom pricing structure to use for this key
              required:
                - id
      responses:
        '200':
          description: Model provider key updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      value:
                        type: string
                        description: Masked API key value
                      providerId:
                        type: string
                      enabled:
                        type: boolean
                      meta:
                        nullable: true
                      customPricingStructureId:
                        type: string
                        nullable: true
                      models:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            label:
                              type: string
                            name:
                              type: string
                            provider:
                              type: string
                            config:
                              nullable: true
                          required:
                            - id
                            - label
                            - name
                            - provider
                        description: Included when includeModels=true
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                    required:
                      - id
                      - name
                      - value
                      - providerId
                      - enabled
                      - createdAt
                      - updatedAt
                required:
                  - data
        '400':
          description: Invalid request parameters
        '404':
          description: Model provider key not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-maxim-api-key
      description: API key for authentication

````

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