Skip to content
Start here

AI Gateway

List Gateways
GET/accounts/{account_id}/ai-gateway/gateways
Fetch a Gateway
GET/accounts/{account_id}/ai-gateway/gateways/{id}
Create a new Gateway
POST/accounts/{account_id}/ai-gateway/gateways
Update a Gateway
PUT/accounts/{account_id}/ai-gateway/gateways/{id}
Delete a Gateway
DELETE/accounts/{account_id}/ai-gateway/gateways/{id}
ModelsExpand Collapse
AIGatewayListResponse { id, cache_invalidate_on_update, cache_ttl, 21 more }
id: string

gateway id

maxLength64
minLength1
cache_invalidate_on_update: boolean
cache_ttl: number
minimum0
collect_logs: boolean
created_at: string
formatdate-time
modified_at: string
formatdate-time
rate_limiting_interval: number
minimum0
rate_limiting_limit: number
minimum0
authentication: optional boolean
dlp: optional { action, enabled, profiles } or { enabled, policies }
One of the following:
{ action, enabled, profiles }
action: "BLOCK" or "FLAG"
One of the following:
"BLOCK"
"FLAG"
enabled: boolean
profiles: array of string
{ enabled, policies }
enabled: boolean
policies: array of { id, action, check, 2 more }
id: string
action: "FLAG" or "BLOCK"
One of the following:
"FLAG"
"BLOCK"
check: array of "REQUEST" or "RESPONSE"
One of the following:
"REQUEST"
"RESPONSE"
enabled: boolean
profiles: array of string
is_default: optional boolean
log_management: optional number
maximum10000000
minimum10000
log_management_strategy: optional "STOP_INSERTING" or "DELETE_OLDEST"
One of the following:
"STOP_INSERTING"
"DELETE_OLDEST"
logpush: optional boolean
logpush_public_key: optional string
maxLength1024
minLength16
otel: optional array of { authorization, headers, url, content_type }
authorization: string
headers: map[string]
url: string
content_type: optional "json" or "protobuf"
One of the following:
"json"
"protobuf"
rate_limiting_technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
retry_backoff: optional "constant" or "linear" or "exponential"

Backoff strategy for retry delays

One of the following:
"constant"
"linear"
"exponential"
retry_delay: optional number

Delay between retry attempts in milliseconds (0-5000)

maximum5000
minimum0
retry_max_attempts: optional number

Maximum number of retry attempts for failed requests (1-5)

maximum5
minimum1
store_id: optional string
stripe: optional { authorization, usage_events }
authorization: string
usage_events: array of { payload }
payload: string
workers_ai_billing_mode: optional "postpaid"

Controls how Workers AI inference calls routed through this gateway are billed. Only ‘postpaid’ is currently supported.

zdr: optional boolean
AIGatewayGetResponse { id, cache_invalidate_on_update, cache_ttl, 21 more }
id: string

gateway id

maxLength64
minLength1
cache_invalidate_on_update: boolean
cache_ttl: number
minimum0
collect_logs: boolean
created_at: string
formatdate-time
modified_at: string
formatdate-time
rate_limiting_interval: number
minimum0
rate_limiting_limit: number
minimum0
authentication: optional boolean
dlp: optional { action, enabled, profiles } or { enabled, policies }
One of the following:
{ action, enabled, profiles }
action: "BLOCK" or "FLAG"
One of the following:
"BLOCK"
"FLAG"
enabled: boolean
profiles: array of string
{ enabled, policies }
enabled: boolean
policies: array of { id, action, check, 2 more }
id: string
action: "FLAG" or "BLOCK"
One of the following:
"FLAG"
"BLOCK"
check: array of "REQUEST" or "RESPONSE"
One of the following:
"REQUEST"
"RESPONSE"
enabled: boolean
profiles: array of string
is_default: optional boolean
log_management: optional number
maximum10000000
minimum10000
log_management_strategy: optional "STOP_INSERTING" or "DELETE_OLDEST"
One of the following:
"STOP_INSERTING"
"DELETE_OLDEST"
logpush: optional boolean
logpush_public_key: optional string
maxLength1024
minLength16
otel: optional array of { authorization, headers, url, content_type }
authorization: string
headers: map[string]
url: string
content_type: optional "json" or "protobuf"
One of the following:
"json"
"protobuf"
rate_limiting_technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
retry_backoff: optional "constant" or "linear" or "exponential"

Backoff strategy for retry delays

One of the following:
"constant"
"linear"
"exponential"
retry_delay: optional number

Delay between retry attempts in milliseconds (0-5000)

maximum5000
minimum0
retry_max_attempts: optional number

Maximum number of retry attempts for failed requests (1-5)

maximum5
minimum1
store_id: optional string
stripe: optional { authorization, usage_events }
authorization: string
usage_events: array of { payload }
payload: string
workers_ai_billing_mode: optional "postpaid"

Controls how Workers AI inference calls routed through this gateway are billed. Only ‘postpaid’ is currently supported.

zdr: optional boolean
AIGatewayCreateResponse { id, cache_invalidate_on_update, cache_ttl, 21 more }
id: string

gateway id

maxLength64
minLength1
cache_invalidate_on_update: boolean
cache_ttl: number
minimum0
collect_logs: boolean
created_at: string
formatdate-time
modified_at: string
formatdate-time
rate_limiting_interval: number
minimum0
rate_limiting_limit: number
minimum0
authentication: optional boolean
dlp: optional { action, enabled, profiles } or { enabled, policies }
One of the following:
{ action, enabled, profiles }
action: "BLOCK" or "FLAG"
One of the following:
"BLOCK"
"FLAG"
enabled: boolean
profiles: array of string
{ enabled, policies }
enabled: boolean
policies: array of { id, action, check, 2 more }
id: string
action: "FLAG" or "BLOCK"
One of the following:
"FLAG"
"BLOCK"
check: array of "REQUEST" or "RESPONSE"
One of the following:
"REQUEST"
"RESPONSE"
enabled: boolean
profiles: array of string
is_default: optional boolean
log_management: optional number
maximum10000000
minimum10000
log_management_strategy: optional "STOP_INSERTING" or "DELETE_OLDEST"
One of the following:
"STOP_INSERTING"
"DELETE_OLDEST"
logpush: optional boolean
logpush_public_key: optional string
maxLength1024
minLength16
otel: optional array of { authorization, headers, url, content_type }
authorization: string
headers: map[string]
url: string
content_type: optional "json" or "protobuf"
One of the following:
"json"
"protobuf"
rate_limiting_technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
retry_backoff: optional "constant" or "linear" or "exponential"

Backoff strategy for retry delays

One of the following:
"constant"
"linear"
"exponential"
retry_delay: optional number

Delay between retry attempts in milliseconds (0-5000)

maximum5000
minimum0
retry_max_attempts: optional number

Maximum number of retry attempts for failed requests (1-5)

maximum5
minimum1
store_id: optional string
stripe: optional { authorization, usage_events }
authorization: string
usage_events: array of { payload }
payload: string
workers_ai_billing_mode: optional "postpaid"

Controls how Workers AI inference calls routed through this gateway are billed. Only ‘postpaid’ is currently supported.

zdr: optional boolean
AIGatewayUpdateResponse { id, cache_invalidate_on_update, cache_ttl, 21 more }
id: string

gateway id

maxLength64
minLength1
cache_invalidate_on_update: boolean
cache_ttl: number
minimum0
collect_logs: boolean
created_at: string
formatdate-time
modified_at: string
formatdate-time
rate_limiting_interval: number
minimum0
rate_limiting_limit: number
minimum0
authentication: optional boolean
dlp: optional { action, enabled, profiles } or { enabled, policies }
One of the following:
{ action, enabled, profiles }
action: "BLOCK" or "FLAG"
One of the following:
"BLOCK"
"FLAG"
enabled: boolean
profiles: array of string
{ enabled, policies }
enabled: boolean
policies: array of { id, action, check, 2 more }
id: string
action: "FLAG" or "BLOCK"
One of the following:
"FLAG"
"BLOCK"
check: array of "REQUEST" or "RESPONSE"
One of the following:
"REQUEST"
"RESPONSE"
enabled: boolean
profiles: array of string
is_default: optional boolean
log_management: optional number
maximum10000000
minimum10000
log_management_strategy: optional "STOP_INSERTING" or "DELETE_OLDEST"
One of the following:
"STOP_INSERTING"
"DELETE_OLDEST"
logpush: optional boolean
logpush_public_key: optional string
maxLength1024
minLength16
otel: optional array of { authorization, headers, url, content_type }
authorization: string
headers: map[string]
url: string
content_type: optional "json" or "protobuf"
One of the following:
"json"
"protobuf"
rate_limiting_technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
retry_backoff: optional "constant" or "linear" or "exponential"

Backoff strategy for retry delays

One of the following:
"constant"
"linear"
"exponential"
retry_delay: optional number

Delay between retry attempts in milliseconds (0-5000)

maximum5000
minimum0
retry_max_attempts: optional number

Maximum number of retry attempts for failed requests (1-5)

maximum5
minimum1
store_id: optional string
stripe: optional { authorization, usage_events }
authorization: string
usage_events: array of { payload }
payload: string
workers_ai_billing_mode: optional "postpaid"

Controls how Workers AI inference calls routed through this gateway are billed. Only ‘postpaid’ is currently supported.

zdr: optional boolean
AIGatewayDeleteResponse { id, cache_invalidate_on_update, cache_ttl, 21 more }
id: string

gateway id

maxLength64
minLength1
cache_invalidate_on_update: boolean
cache_ttl: number
minimum0
collect_logs: boolean
created_at: string
formatdate-time
modified_at: string
formatdate-time
rate_limiting_interval: number
minimum0
rate_limiting_limit: number
minimum0
authentication: optional boolean
dlp: optional { action, enabled, profiles } or { enabled, policies }
One of the following:
{ action, enabled, profiles }
action: "BLOCK" or "FLAG"
One of the following:
"BLOCK"
"FLAG"
enabled: boolean
profiles: array of string
{ enabled, policies }
enabled: boolean
policies: array of { id, action, check, 2 more }
id: string
action: "FLAG" or "BLOCK"
One of the following:
"FLAG"
"BLOCK"
check: array of "REQUEST" or "RESPONSE"
One of the following:
"REQUEST"
"RESPONSE"
enabled: boolean
profiles: array of string
is_default: optional boolean
log_management: optional number
maximum10000000
minimum10000
log_management_strategy: optional "STOP_INSERTING" or "DELETE_OLDEST"
One of the following:
"STOP_INSERTING"
"DELETE_OLDEST"
logpush: optional boolean
logpush_public_key: optional string
maxLength1024
minLength16
otel: optional array of { authorization, headers, url, content_type }
authorization: string
headers: map[string]
url: string
content_type: optional "json" or "protobuf"
One of the following:
"json"
"protobuf"
rate_limiting_technique: optional "fixed" or "sliding"
One of the following:
"fixed"
"sliding"
retry_backoff: optional "constant" or "linear" or "exponential"

Backoff strategy for retry delays

One of the following:
"constant"
"linear"
"exponential"
retry_delay: optional number

Delay between retry attempts in milliseconds (0-5000)

maximum5000
minimum0
retry_max_attempts: optional number

Maximum number of retry attempts for failed requests (1-5)

maximum5
minimum1
store_id: optional string
stripe: optional { authorization, usage_events }
authorization: string
usage_events: array of { payload }
payload: string
workers_ai_billing_mode: optional "postpaid"

Controls how Workers AI inference calls routed through this gateway are billed. Only ‘postpaid’ is currently supported.

zdr: optional boolean

AI GatewayEvaluation Types

List Evaluators
GET/accounts/{account_id}/ai-gateway/evaluation-types
ModelsExpand Collapse
EvaluationTypeListResponse { id, created_at, description, 5 more }
id: string
created_at: string
formatdate-time
description: string
enable: boolean
mandatory: boolean
modified_at: string
formatdate-time
name: string
type: string

AI GatewayLogs

List Gateway Logs
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs
Get Gateway Log Detail
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}
Patch Gateway Log
PATCH/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}
Delete Gateway Logs
DELETE/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs
Get Gateway Log Request
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/request
Get Gateway Log Response
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/response
ModelsExpand Collapse
LogListResponse { id, cached, created_at, 16 more }
id: string
cached: boolean
created_at: string
formatdate-time
duration: number
model: string
path: string
provider: string
success: boolean
tokens_in: number
tokens_out: number
cost: optional number
custom_cost: optional boolean
metadata: optional string
model_type: optional string
request_content_type: optional string
request_type: optional string
response_content_type: optional string
status_code: optional number
step: optional number
LogGetResponse { id, cached, created_at, 22 more }
id: string
cached: boolean
created_at: string
formatdate-time
duration: number
model: string
path: string
provider: string
success: boolean
tokens_in: number
tokens_out: number
cost: optional number
custom_cost: optional boolean
metadata: optional string
model_type: optional string
request_content_type: optional string
request_head: optional string
request_head_complete: optional boolean
request_size: optional number
request_type: optional string
response_content_type: optional string
response_head: optional string
response_head_complete: optional boolean
response_size: optional number
status_code: optional number
step: optional number
LogEditResponse = unknown
LogDeleteResponse { success }
success: boolean
LogRequestResponse = unknown
LogResponseResponse = unknown

AI GatewayDatasets

List Datasets
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets
Fetch a Dataset
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}
Create a new Dataset
POST/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets
Update a Dataset
PUT/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}
Delete a Dataset
DELETE/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}
ModelsExpand Collapse
DatasetListResponse { id, created_at, enable, 4 more }
id: string
created_at: string
formatdate-time
enable: boolean
filters: array of { key, operator, value }
key: "created_at" or "request_content_type" or "response_content_type" or 10 more
One of the following:
"created_at"
"request_content_type"
"response_content_type"
"success"
"cached"
"provider"
"model"
"cost"
"tokens"
"tokens_in"
"tokens_out"
"duration"
"feedback"
operator: "eq" or "contains" or "lt" or "gt"
One of the following:
"eq"
"contains"
"lt"
"gt"
value: array of string or number or boolean
One of the following:
string
number
boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
DatasetGetResponse { id, created_at, enable, 4 more }
id: string
created_at: string
formatdate-time
enable: boolean
filters: array of { key, operator, value }
key: "created_at" or "request_content_type" or "response_content_type" or 10 more
One of the following:
"created_at"
"request_content_type"
"response_content_type"
"success"
"cached"
"provider"
"model"
"cost"
"tokens"
"tokens_in"
"tokens_out"
"duration"
"feedback"
operator: "eq" or "contains" or "lt" or "gt"
One of the following:
"eq"
"contains"
"lt"
"gt"
value: array of string or number or boolean
One of the following:
string
number
boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
DatasetCreateResponse { id, created_at, enable, 4 more }
id: string
created_at: string
formatdate-time
enable: boolean
filters: array of { key, operator, value }
key: "created_at" or "request_content_type" or "response_content_type" or 10 more
One of the following:
"created_at"
"request_content_type"
"response_content_type"
"success"
"cached"
"provider"
"model"
"cost"
"tokens"
"tokens_in"
"tokens_out"
"duration"
"feedback"
operator: "eq" or "contains" or "lt" or "gt"
One of the following:
"eq"
"contains"
"lt"
"gt"
value: array of string or number or boolean
One of the following:
string
number
boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
DatasetUpdateResponse { id, created_at, enable, 4 more }
id: string
created_at: string
formatdate-time
enable: boolean
filters: array of { key, operator, value }
key: "created_at" or "request_content_type" or "response_content_type" or 10 more
One of the following:
"created_at"
"request_content_type"
"response_content_type"
"success"
"cached"
"provider"
"model"
"cost"
"tokens"
"tokens_in"
"tokens_out"
"duration"
"feedback"
operator: "eq" or "contains" or "lt" or "gt"
One of the following:
"eq"
"contains"
"lt"
"gt"
value: array of string or number or boolean
One of the following:
string
number
boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
DatasetDeleteResponse { id, created_at, enable, 4 more }
id: string
created_at: string
formatdate-time
enable: boolean
filters: array of { key, operator, value }
key: "created_at" or "request_content_type" or "response_content_type" or 10 more
One of the following:
"created_at"
"request_content_type"
"response_content_type"
"success"
"cached"
"provider"
"model"
"cost"
"tokens"
"tokens_in"
"tokens_out"
"duration"
"feedback"
operator: "eq" or "contains" or "lt" or "gt"
One of the following:
"eq"
"contains"
"lt"
"gt"
value: array of string or number or boolean
One of the following:
string
number
boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string

AI GatewayEvaluations

List Evaluations
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations
Fetch a Evaluation
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations/{id}
Create a new Evaluation
POST/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations
Delete a Evaluation
DELETE/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations/{id}
ModelsExpand Collapse
EvaluationListResponse { id, created_at, datasets, 6 more }
id: string
created_at: string
formatdate-time
datasets: array of { id, account_id, account_tag, 6 more }
id: string
account_id: string
account_tag: string
created_at: string
formatdate-time
enable: boolean
filters: array of { key, operator, value }
key: "created_at" or "request_content_type" or "response_content_type" or 10 more
One of the following:
"created_at"
"request_content_type"
"response_content_type"
"success"
"cached"
"provider"
"model"
"cost"
"tokens"
"tokens_in"
"tokens_out"
"duration"
"feedback"
operator: "eq" or "contains" or "lt" or "gt"
One of the following:
"eq"
"contains"
"lt"
"gt"
value: array of string or number or boolean
One of the following:
string
number
boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
processed: boolean
results: array of { id, created_at, evaluation_id, 6 more }
id: string
created_at: string
formatdate-time
evaluation_id: string
evaluation_type_id: string
modified_at: string
formatdate-time
result: string
status: number
status_description: string
total_logs: number
total_logs: number
EvaluationGetResponse { id, created_at, datasets, 6 more }
id: string
created_at: string
formatdate-time
datasets: array of { id, account_id, account_tag, 6 more }
id: string
account_id: string
account_tag: string
created_at: string
formatdate-time
enable: boolean
filters: array of { key, operator, value }
key: "created_at" or "request_content_type" or "response_content_type" or 10 more
One of the following:
"created_at"
"request_content_type"
"response_content_type"
"success"
"cached"
"provider"
"model"
"cost"
"tokens"
"tokens_in"
"tokens_out"
"duration"
"feedback"
operator: "eq" or "contains" or "lt" or "gt"
One of the following:
"eq"
"contains"
"lt"
"gt"
value: array of string or number or boolean
One of the following:
string
number
boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
processed: boolean
results: array of { id, created_at, evaluation_id, 6 more }
id: string
created_at: string
formatdate-time
evaluation_id: string
evaluation_type_id: string
modified_at: string
formatdate-time
result: string
status: number
status_description: string
total_logs: number
total_logs: number
EvaluationCreateResponse { id, created_at, datasets, 6 more }
id: string
created_at: string
formatdate-time
datasets: array of { id, account_id, account_tag, 6 more }
id: string
account_id: string
account_tag: string
created_at: string
formatdate-time
enable: boolean
filters: array of { key, operator, value }
key: "created_at" or "request_content_type" or "response_content_type" or 10 more
One of the following:
"created_at"
"request_content_type"
"response_content_type"
"success"
"cached"
"provider"
"model"
"cost"
"tokens"
"tokens_in"
"tokens_out"
"duration"
"feedback"
operator: "eq" or "contains" or "lt" or "gt"
One of the following:
"eq"
"contains"
"lt"
"gt"
value: array of string or number or boolean
One of the following:
string
number
boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
processed: boolean
results: array of { id, created_at, evaluation_id, 6 more }
id: string
created_at: string
formatdate-time
evaluation_id: string
evaluation_type_id: string
modified_at: string
formatdate-time
result: string
status: number
status_description: string
total_logs: number
total_logs: number
EvaluationDeleteResponse { id, created_at, datasets, 6 more }
id: string
created_at: string
formatdate-time
datasets: array of { id, account_id, account_tag, 6 more }
id: string
account_id: string
account_tag: string
created_at: string
formatdate-time
enable: boolean
filters: array of { key, operator, value }
key: "created_at" or "request_content_type" or "response_content_type" or 10 more
One of the following:
"created_at"
"request_content_type"
"response_content_type"
"success"
"cached"
"provider"
"model"
"cost"
"tokens"
"tokens_in"
"tokens_out"
"duration"
"feedback"
operator: "eq" or "contains" or "lt" or "gt"
One of the following:
"eq"
"contains"
"lt"
"gt"
value: array of string or number or boolean
One of the following:
string
number
boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
name: string
processed: boolean
results: array of { id, created_at, evaluation_id, 6 more }
id: string
created_at: string
formatdate-time
evaluation_id: string
evaluation_type_id: string
modified_at: string
formatdate-time
result: string
status: number
status_description: string
total_logs: number
total_logs: number

AI GatewayDynamic Routing

List all AI Gateway Dynamic Routes.
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes
Get an AI Gateway Dynamic Route.
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}
Create a new AI Gateway Dynamic Route.
POST/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes
Update an AI Gateway Dynamic Route.
PATCH/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}
Delete an AI Gateway Dynamic Route.
DELETE/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}
List all AI Gateway Dynamic Route Deployments.
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/deployments
Create a new AI Gateway Dynamic Route Deployment.
POST/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/deployments
List all AI Gateway Dynamic Route Versions.
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions
Create a new AI Gateway Dynamic Route Version.
POST/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions
Get an AI Gateway Dynamic Route Version.
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions/{version_id}
ModelsExpand Collapse
DynamicRoutingListResponse { data, success }
data: { order_by, order_by_direction, page, 2 more }
order_by: string
order_by_direction: string
page: number
per_page: number
routes: array of { id, account_tag, created_at, 6 more }
id: string
account_tag: string
created_at: string
formatdate-time
deployment: { created_at, deployment_id, version_id }
created_at: string
deployment_id: string
version_id: string
elements: array of { id, outputs, type } or { id, outputs, properties, type } or { id, outputs, type } or 3 more
One of the following:
{ id, outputs, type }
id: string
outputs: { next }
type: "start"
{ id, outputs, properties, type }
id: string
outputs: { false, true }
false: { elementId }
elementId: string
true: { elementId }
elementId: string
properties: { conditions }
conditions: optional unknown
type: "conditional"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "percentage"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version: { active, created_at, data, version_id }
active: "true" or "false"
One of the following:
"true"
"false"
created_at: string
data: string
version_id: string
success: boolean
DynamicRoutingGetResponse { id, created_at, deployment, 5 more }
id: string
created_at: string
formatdate-time
deployment: { created_at, deployment_id, version_id }
created_at: string
deployment_id: string
version_id: string
elements: array of { id, outputs, type } or { id, outputs, properties, type } or { id, outputs, type } or 3 more
One of the following:
{ id, outputs, type }
id: string
outputs: { next }
type: "start"
{ id, outputs, properties, type }
id: string
outputs: { false, true }
false: { elementId }
elementId: string
true: { elementId }
elementId: string
properties: { conditions }
conditions: optional unknown
type: "conditional"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "percentage"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version: { active, created_at, data, version_id }
active: "true" or "false"
One of the following:
"true"
"false"
created_at: string
data: string
version_id: string
DynamicRoutingCreateResponse { id, created_at, deployment, 5 more }
id: string
created_at: string
formatdate-time
deployment: { created_at, deployment_id, version_id }
created_at: string
deployment_id: string
version_id: string
elements: array of { id, outputs, type } or { id, outputs, properties, type } or { id, outputs, type } or 3 more
One of the following:
{ id, outputs, type }
id: string
outputs: { next }
type: "start"
{ id, outputs, properties, type }
id: string
outputs: { false, true }
false: { elementId }
elementId: string
true: { elementId }
elementId: string
properties: { conditions }
conditions: optional unknown
type: "conditional"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "percentage"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version: { active, created_at, data, version_id }
active: "true" or "false"
One of the following:
"true"
"false"
created_at: string
data: string
version_id: string
DynamicRoutingUpdateResponse { route, success }
route: { id, account_tag, created_at, 6 more }
id: string
account_tag: string
created_at: string
formatdate-time
deployment: { created_at, deployment_id, version_id }
created_at: string
deployment_id: string
version_id: string
elements: array of { id, outputs, type } or { id, outputs, properties, type } or { id, outputs, type } or 3 more
One of the following:
{ id, outputs, type }
id: string
outputs: { next }
type: "start"
{ id, outputs, properties, type }
id: string
outputs: { false, true }
false: { elementId }
elementId: string
true: { elementId }
elementId: string
properties: { conditions }
conditions: optional unknown
type: "conditional"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "percentage"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version: { active, created_at, data, version_id }
active: "true" or "false"
One of the following:
"true"
"false"
created_at: string
data: string
version_id: string
success: boolean
DynamicRoutingDeleteResponse { id, created_at, elements, 3 more }
id: string
created_at: string
formatdate-time
elements: array of { id, outputs, type } or { id, outputs, properties, type } or { id, outputs, type } or 3 more
One of the following:
{ id, outputs, type }
id: string
outputs: { next }
type: "start"
{ id, outputs, properties, type }
id: string
outputs: { false, true }
false: { elementId }
elementId: string
true: { elementId }
elementId: string
properties: { conditions }
conditions: optional unknown
type: "conditional"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "percentage"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
DynamicRoutingListDeploymentsResponse { data, success }
data: { deployments, order_by, order_by_direction, 2 more }
deployments: array of { created_at, deployment_id, version_id }
created_at: string
deployment_id: string
version_id: string
order_by: string
order_by_direction: string
page: number
per_page: number
success: boolean
DynamicRoutingCreateDeploymentResponse { id, created_at, elements, 3 more }
id: string
created_at: string
formatdate-time
elements: array of { id, outputs, type } or { id, outputs, properties, type } or { id, outputs, type } or 3 more
One of the following:
{ id, outputs, type }
id: string
outputs: { next }
type: "start"
{ id, outputs, properties, type }
id: string
outputs: { false, true }
false: { elementId }
elementId: string
true: { elementId }
elementId: string
properties: { conditions }
conditions: optional unknown
type: "conditional"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "percentage"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
DynamicRoutingListVersionsResponse { data, success }
data: { order_by, order_by_direction, page, 2 more }
order_by: string
order_by_direction: string
page: number
per_page: number
versions: array of { active, created_at, data, version_id }
active: "true" or "false"
One of the following:
"true"
"false"
created_at: string
data: string
version_id: string
success: boolean
DynamicRoutingCreateVersionResponse { id, created_at, elements, 3 more }
id: string
created_at: string
formatdate-time
elements: array of { id, outputs, type } or { id, outputs, properties, type } or { id, outputs, type } or 3 more
One of the following:
{ id, outputs, type }
id: string
outputs: { next }
type: "start"
{ id, outputs, properties, type }
id: string
outputs: { false, true }
false: { elementId }
elementId: string
true: { elementId }
elementId: string
properties: { conditions }
conditions: optional unknown
type: "conditional"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "percentage"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
DynamicRoutingGetVersionResponse { id, active, created_at, 6 more }
id: string
active: "true" or "false"
One of the following:
"true"
"false"
created_at: string
data: string
elements: array of { id, outputs, type } or { id, outputs, properties, type } or { id, outputs, type } or 3 more
One of the following:
{ id, outputs, type }
id: string
outputs: { next }
type: "start"
{ id, outputs, properties, type }
id: string
outputs: { false, true }
false: { elementId }
elementId: string
true: { elementId }
elementId: string
properties: { conditions }
conditions: optional unknown
type: "conditional"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "percentage"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
{ id, outputs, properties, type }
id: string
outputs: { fallback, success }
fallback: { elementId }
elementId: string
success: { elementId }
elementId: string
properties: { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
{ id, outputs, type }
id: string
outputs: map[ { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version_id: string

AI GatewayProvider Configs

List Provider Configs
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs
Create a new Provider Configs
POST/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs
ModelsExpand Collapse
ProviderConfigListResponse { id, alias, default_config, 7 more }
id: string
alias: string
default_config: boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
provider_slug: string
secret_id: string
secret_preview: string
rate_limit: optional number
rate_limit_period: optional number
ProviderConfigCreateResponse { id, alias, default_config, 7 more }
id: string
alias: string
default_config: boolean
gateway_id: string

gateway id

maxLength64
minLength1
modified_at: string
formatdate-time
provider_slug: string
secret_id: string
secret_preview: string
rate_limit: optional number
rate_limit_period: optional number

AI GatewayURLs

Get Gateway URL
GET/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/url/{provider}
ModelsExpand Collapse
URLGetResponse = string