Skip to main content
PATCH
/
providers
/
{id}
Update an AI Gateway provider
curl --request PATCH \
  --url https://api.ngrok.ai/providers/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "baseUrl": "<string>",
  "metadata": "<string>",
  "supportedApiSurfaces": [
    {
      "format": "<string>",
      "surface": "<string>",
      "supportedParams": [
        {
          "name": "<string>"
        }
      ]
    }
  ],
  "models": [
    {
      "modelId": "<string>"
    }
  ]
}
'
{
  "id": "<string>",
  "uri": "<string>",
  "providerId": "<string>",
  "name": "<string>",
  "baseUrl": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "createdBy": {
    "id": "<string>",
    "uri": "<string>"
  },
  "lastUpdatedBy": {
    "id": "<string>",
    "uri": "<string>"
  },
  "metadata": "<string>",
  "supportedApiSurfaces": [
    {
      "format": "<string>",
      "surface": "<string>",
      "supportedParams": [
        {
          "name": "<string>"
        }
      ]
    }
  ],
  "models": [
    {
      "id": "<string>",
      "modelId": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Unique identifier for an AI Gateway provider.

Body

application/json
name
string | null

User-friendly label for this provider.

Required string length: 1 - 255
baseUrl
string

Base URL of the provider's API endpoint. Cannot be cleared (every provider has one).

Required string length: 1 - 2048
metadata
string | null

Arbitrary user-defined metadata for this provider.

Maximum string length: 4096
supportedApiSurfaces
object[] | null

API surfaces supported by this provider.

models
object[] | null

Full replacement set for the models attached to this provider. Omit the field to leave existing models alone, send an empty array to clear all models, or send a full list to replace the existing set.

Response

The updated AI Gateway provider.

id
string
required

Unique identifier for this provider.

uri
string
required

URI of this AI Gateway Provider API resource.

providerId
string
required

Provider identifier used as the address segment in model strings (for example "internal-vllm").

name
string
required

User-friendly label for this provider.

baseUrl
string
required

Base URL of the provider's API endpoint.

createdAt
string<date-time>
required

Timestamp when the provider was created.

updatedAt
string<date-time>
required

Timestamp when the provider was last updated.

createdBy
object
required
lastUpdatedBy
object
required
metadata
string

Arbitrary user-defined metadata for this provider.

supportedApiSurfaces
object[]

API surfaces supported by this provider.

models
object[]

Models exposed by this provider.