Skip to main content
PUT
/
v1
/
models
Update model provider key
curl --request PUT \
  --url https://api.getmaxim.ai/v1/models \
  --header 'Content-Type: application/json' \
  --header 'x-maxim-api-key: <api-key>' \
  --data '
{
  "id": "<string>",
  "name": "<string>",
  "value": "<string>",
  "models": [
    "<string>"
  ],
  "meta": {
    "key2": "<string>",
    "secretAccessKey": "<string>",
    "sessionToken": "<string>"
  },
  "enabled": true,
  "customPricingStructureId": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "value": "<string>",
    "providerId": "<string>",
    "enabled": true,
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "meta": null,
    "customPricingStructureId": "<string>",
    "models": [
      {
        "id": "<string>",
        "label": "<string>",
        "name": "<string>",
        "provider": "<string>",
        "config": null
      }
    ]
  }
}

Authorizations

x-maxim-api-key
string
header
required

API key for authentication

Body

application/json
id
string
required

Unique identifier of the model provider key to update

Minimum string length: 1
name
string

Name for the API key configuration

Minimum string length: 1
value
string

The API key value (omit to keep existing value)

Minimum string length: 1
models
string[]

List of model IDs to associate with this key

meta
object

Key-related metadata fields. Includes key2 for Azure, secretAccessKey and sessionToken for Bedrock.

enabled
boolean

Whether the key is enabled

customPricingStructureId
string | null

ID of a custom pricing structure to use for this key

Response

Model provider key updated successfully

data
object
required