Search + K

Command Palette

Search for a command to run...

Sign In

Create a new AI Gateway Dynamic Route Version.

POST /accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions
Copy endpoint
https://api.cloudflare.com/client/v4

Create a new AI Gateway Dynamic Route Version.

Parameters

path Path Parameters

Name Type
account_id required
string
gateway_id required
string
id required
string

Request Body

application/json
{ comment: string;elements: ({ id: string;outputs: { next: { ... }; };type: "start"; } | {
id: string;
outputs: { false: { ... };true: { ... }; };
properties: { conditions?: {}; };
type: "conditional";
}
| { id: string;outputs: { };type: "percentage"; } | {
id: string;
outputs: { fallback: { ... };success: { ... }; };
properties: {
key: string;
limit: number;
limitType: "count" | "cost";
window: number;
}
;
type: "rate";
}
| {
id: string;
outputs: { fallback: { ... };success: { ... }; };
properties: {
model: string;
provider: string;
retries: number;
timeout: number;
}
;
type: "model";
}
| { id: string;outputs: { };type: "end"; }
)[]
; }

Responses

200 application/json

Success

{ result: {
account_tag: string;
created_at: string;
elements: ({ id: string;outputs: { ... };type: "start"; } | {
id: string;
outputs: { ... };
properties: { ... };
type: "conditional";
}
| { id: string;outputs: { ... };type: "percentage"; } | {
id: string;
outputs: { ... };
properties: { ... };
type: "rate";
}
| {
id: string;
outputs: { ... };
properties: { ... };
type: "model";
}
| { id: string;outputs: { ... };type: "end"; }
)[]
;
gateway_id: string;
id: string;
modified_at: string;
name: string;
}
;success: boolean; }

Client Errors

400 application/json

Bad Request

{ errors: { message: string; }[];result: {};success: boolean; }