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 object { data, success }
data: object { order_by, order_by_direction, page, 2 more }
order_by: string
order_by_direction: string
page: number
per_page: number
routes: array of object { id, account_tag, created_at, 6 more }
id: string
account_tag: string
created_at: string
formatdate-time
deployment: object { created_at, deployment_id, version_id }
created_at: string
deployment_id: string
version_id: string
elements: array of object { id, outputs, type } or object { id, outputs, properties, type } or object { id, outputs, type } or 3 more
One of the following:
object { id, outputs, type }
id: string
outputs: object { next }
type: "start"
object { id, outputs, properties, type }
id: string
outputs: object { false, true }
false: object { elementId }
elementId: string
true: object { elementId }
elementId: string
properties: object { conditions }
conditions: optional unknown
type: "conditional"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "percentage"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version: object { 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 object { id, created_at, deployment, 5 more }
id: string
created_at: string
formatdate-time
deployment: object { created_at, deployment_id, version_id }
created_at: string
deployment_id: string
version_id: string
elements: array of object { id, outputs, type } or object { id, outputs, properties, type } or object { id, outputs, type } or 3 more
One of the following:
object { id, outputs, type }
id: string
outputs: object { next }
type: "start"
object { id, outputs, properties, type }
id: string
outputs: object { false, true }
false: object { elementId }
elementId: string
true: object { elementId }
elementId: string
properties: object { conditions }
conditions: optional unknown
type: "conditional"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "percentage"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version: object { 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 object { id, created_at, deployment, 5 more }
id: string
created_at: string
formatdate-time
deployment: object { created_at, deployment_id, version_id }
created_at: string
deployment_id: string
version_id: string
elements: array of object { id, outputs, type } or object { id, outputs, properties, type } or object { id, outputs, type } or 3 more
One of the following:
object { id, outputs, type }
id: string
outputs: object { next }
type: "start"
object { id, outputs, properties, type }
id: string
outputs: object { false, true }
false: object { elementId }
elementId: string
true: object { elementId }
elementId: string
properties: object { conditions }
conditions: optional unknown
type: "conditional"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "percentage"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version: object { 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 object { route, success }
route: object { id, account_tag, created_at, 6 more }
id: string
account_tag: string
created_at: string
formatdate-time
deployment: object { created_at, deployment_id, version_id }
created_at: string
deployment_id: string
version_id: string
elements: array of object { id, outputs, type } or object { id, outputs, properties, type } or object { id, outputs, type } or 3 more
One of the following:
object { id, outputs, type }
id: string
outputs: object { next }
type: "start"
object { id, outputs, properties, type }
id: string
outputs: object { false, true }
false: object { elementId }
elementId: string
true: object { elementId }
elementId: string
properties: object { conditions }
conditions: optional unknown
type: "conditional"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "percentage"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version: object { 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 object { id, created_at, elements, 3 more }
id: string
created_at: string
formatdate-time
elements: array of object { id, outputs, type } or object { id, outputs, properties, type } or object { id, outputs, type } or 3 more
One of the following:
object { id, outputs, type }
id: string
outputs: object { next }
type: "start"
object { id, outputs, properties, type }
id: string
outputs: object { false, true }
false: object { elementId }
elementId: string
true: object { elementId }
elementId: string
properties: object { conditions }
conditions: optional unknown
type: "conditional"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "percentage"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
DynamicRoutingListDeploymentsResponse object { data, success }
data: object { deployments, order_by, order_by_direction, 2 more }
deployments: array of object { 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 object { id, created_at, elements, 3 more }
id: string
created_at: string
formatdate-time
elements: array of object { id, outputs, type } or object { id, outputs, properties, type } or object { id, outputs, type } or 3 more
One of the following:
object { id, outputs, type }
id: string
outputs: object { next }
type: "start"
object { id, outputs, properties, type }
id: string
outputs: object { false, true }
false: object { elementId }
elementId: string
true: object { elementId }
elementId: string
properties: object { conditions }
conditions: optional unknown
type: "conditional"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "percentage"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
DynamicRoutingListVersionsResponse object { data, success }
data: object { order_by, order_by_direction, page, 2 more }
order_by: string
order_by_direction: string
page: number
per_page: number
versions: array of object { 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 object { id, created_at, elements, 3 more }
id: string
created_at: string
formatdate-time
elements: array of object { id, outputs, type } or object { id, outputs, properties, type } or object { id, outputs, type } or 3 more
One of the following:
object { id, outputs, type }
id: string
outputs: object { next }
type: "start"
object { id, outputs, properties, type }
id: string
outputs: object { false, true }
false: object { elementId }
elementId: string
true: object { elementId }
elementId: string
properties: object { conditions }
conditions: optional unknown
type: "conditional"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "percentage"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
DynamicRoutingGetVersionResponse object { 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 object { id, outputs, type } or object { id, outputs, properties, type } or object { id, outputs, type } or 3 more
One of the following:
object { id, outputs, type }
id: string
outputs: object { next }
type: "start"
object { id, outputs, properties, type }
id: string
outputs: object { false, true }
false: object { elementId }
elementId: string
true: object { elementId }
elementId: string
properties: object { conditions }
conditions: optional unknown
type: "conditional"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "percentage"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { key, limit, limitType, window }
key: string
limit: number
limitType: "count" or "cost"
One of the following:
"count"
"cost"
window: number
type: "rate"
object { id, outputs, properties, type }
id: string
outputs: object { fallback, success }
fallback: object { elementId }
elementId: string
success: object { elementId }
elementId: string
properties: object { model, provider, retries, timeout }
model: string
provider: string
retries: number
timeout: number
type: "model"
object { id, outputs, type }
id: string
outputs: map[object { elementId } ]
elementId: string
type: "end"
gateway_id: string
modified_at: string
formatdate-time
name: string
version_id: string