Skip to main content
POST
/
providers
Create an AI Gateway provider
curl --request POST \
  --url https://api.ngrok.ai/providers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "providerId": "<string>",
  "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.

Body

application/json
providerId
string
required

Provider identifier used as the address segment in model strings (for example "internal-vllm"). Unique within the account; must not collide with a built-in catalog providerId.

Required string length: 1 - 255
name
string
required

User-friendly label for this provider.

Required string length: 1 - 255
baseUrl
string
required

Base URL of the provider's API endpoint. Required — every provider has one.

Required string length: 1 - 2048
metadata
string

Arbitrary user-defined metadata for this provider.

Maximum string length: 4096
supportedApiSurfaces
object[]

API surfaces supported by this provider.

models
object[]

Initial set of models exposed by this provider.

Response

The created 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.