Skip to main content
PATCH
Update AI Gateway configuration

Authorizations

Authorization
string
header
required

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

Body

application/json
totalTimeout
string

Total timeout duration for a request through the AI Gateway (Go duration string, e.g. 30s, 1m). Defaults to 2m. For a streaming response, the default bounds the stream only until its first byte, after which the stream can run for up to 15 minutes. A value you set applies to the whole stream.

perRequestTimeout
string

Per-request timeout duration for individual upstream requests (Go duration string, e.g. 30s, 1m). Defaults to 1m. Must be less than or equal to totalTimeout, checked against the configuration as it will be after the update.

maxInputTokens
integer<int64> | null

Maximum number of input tokens allowed per request. Must be greater than zero. 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. Must be greater than zero. 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

Response

The updated 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). Defaults to 2m. For a streaming response, the default bounds the stream only until its first byte, after which the stream can run for up to 15 minutes. A value you set applies to the whole stream.

perRequestTimeout
string
required

Per-request timeout duration for individual upstream requests (Go duration string, e.g. 30s, 1m). Defaults to 1m. Must be less than or equal to totalTimeout, checked against the configuration as it will be after the update.

maxInputTokens
integer<int64> | null

Maximum number of input tokens allowed per request. Must be greater than zero. 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. Must be greater than zero. 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