Skip to main content
GET
/
gateway-config
Get AI Gateway configuration
curl --request GET \
  --url https://api.ngrok.ai/gateway-config \
  --header 'Authorization: Bearer <token>'
{
  "accountId": "<string>",
  "uri": "<string>",
  "totalTimeout": "<string>",
  "perRequestTimeout": "<string>",
  "maxInputTokens": 123,
  "maxOutputTokens": 123,
  "metadata": "<string>"
}

Authorizations

Authorization
string
header
required

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

Response

The AI Gateway configuration.

accountId
string
required

Unique identifier of the account this configuration belongs to.

uri
string
required

URI of this AI Gateway Configuration API resource.

totalTimeout
string
required

Total timeout duration for a request through the AI Gateway (Go duration string, e.g. 30s, 1m).

perRequestTimeout
string
required

Per-request timeout duration for individual upstream requests (Go duration string, e.g. 30s, 1m).

maxInputTokens
integer<int64> | null

Maximum number of input tokens allowed per request. PATCH: omit to preserve, send null to clear the cap (no limit), or send a number to set it. Accounts that have not written a value read back the per-account default; once cleared with null, GET returns null until a new value is written.

maxOutputTokens
integer<int64> | null

Maximum number of output tokens allowed per request. PATCH: omit to preserve, send null to clear the cap (no limit), or send a number to set it. Accounts that have not written a value read back the per-account default; once cleared with null, GET returns null until a new value is written.

metadata
string | null

Arbitrary user-defined metadata for the AI Gateway configuration. PATCH: omit to preserve, send null to clear, or send a string to set it. GET returns null when no value is stored.

Maximum string length: 4096