AI Gateway

AIGateway

Methods

list(, ): <>
get/accounts/{account_id}/ai-gateway/gateways

List Gateways

get(, , ):
get/accounts/{account_id}/ai-gateway/gateways/{id}

Fetch a Gateway

create(, ):
post/accounts/{account_id}/ai-gateway/gateways

Create a new Gateway

update(, , ):
put/accounts/{account_id}/ai-gateway/gateways/{id}

Update a Gateway

delete(, , ):
delete/accounts/{account_id}/ai-gateway/gateways/{id}

Delete a Gateway

Security

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Accepted Permissions (at least one required)

AI Gateway Write

Parameters
id: string
(maxLength: 64, minLength: 1)

gateway id

account_id: string
Returns
AIGatewayDeleteResponse{
id: string
(maxLength: 64, minLength: 1)

gateway id

account_id: string
account_tag: string
cache_invalidate_on_update: boolean
cache_ttl: number | null
(minimum: 0)
collect_logs: boolean
created_at: string
(format: date-time)
internal_id: string
(format: uuid)
modified_at: string
(format: date-time)
rate_limiting_interval: number | null
(minimum: 0)
rate_limiting_limit: number | null
(minimum: 0)
rate_limiting_technique: "fixed" | "sliding"
authentication?: boolean
is_default?: boolean
log_management?: number | null
(maximum: 10000000, minimum: 10000)
log_management_strategy?: "STOP_INSERTING" | "DELETE_OLDEST" | null
logpush?: boolean
logpush_public_key?: string | null
(maxLength: 1024, minLength: 16)
otel?: Array<> | null
store_id?: string | null
stripe?: | null
zdr?: boolean
Request example
200Example
AI Gateway

Datasets

AIGateway.Datasets

Methods

list(, , ): <>
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets

List Datasets

get(, , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}

Fetch a Dataset

create(, , ):
post/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets

Create a new Dataset

update(, , , ):
put/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}

Update a Dataset

delete(, , , ):
delete/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}

Delete a Dataset

AI Gateway

Dynamic Routing

AIGateway.DynamicRouting

Methods

list(, , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes

List all AI Gateway Dynamic Routes.

get(, , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}

Get an AI Gateway Dynamic Route.

create(, , ):
post/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes

Create a new AI Gateway Dynamic Route.

update(, , , ):
patch/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}

Update an AI Gateway Dynamic Route.

delete(, , , ):
delete/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}

Delete an AI Gateway Dynamic Route.

listDeployments(, , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/deployments

List all AI Gateway Dynamic Route Deployments.

createDeployment(, , , ):
post/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/deployments

Create a new AI Gateway Dynamic Route Deployment.

listVersions(, , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions

List all AI Gateway Dynamic Route Versions.

createVersion(, , , ):
post/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions

Create a new AI Gateway Dynamic Route Version.

getVersion(, , , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions/{version_id}

Get an AI Gateway Dynamic Route Version.

AI Gateway

Evaluation Types

AIGateway.EvaluationTypes

Methods

list(, ): <>
get/accounts/{account_id}/ai-gateway/evaluation-types

List Evaluators

AI Gateway

Evaluations

AIGateway.Evaluations

Methods

list(, , ): <>
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations

List Evaluations

get(, , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations/{id}

Fetch a Evaluation

create(, , ):
post/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations

Create a new Evaluation

delete(, , , ):
delete/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations/{id}

Delete a Evaluation

AIGateway.Logs

Methods

list(, , ): <>
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs

List Gateway Logs

get(, , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}

Get Gateway Log Detail

edit(, , , ):
patch/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}

Patch Gateway Log

delete(, , ):
delete/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs

Delete Gateway Logs

request(, , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/request

Get Gateway Log Request

response(, , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/response

Get Gateway Log Response

AI Gateway

Provider Configs

AIGateway.ProviderConfigs

Methods

list(, , ): <>
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs

List Provider Configs

create(, , ):
post/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs

Create a new Provider Configs

AIGateway.URLs

Methods

get(, , , ):
get/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/url/{provider}

Get Gateway URL