Skip to content
Start here

Dynamic 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