AI Gateway

AIGateway

Methods

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

Lists all AI Gateway evaluator types configured for the account.

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

Retrieves details for a specific AI Gateway dataset.

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

Creates a new AI Gateway.

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

Updates an existing AI Gateway dataset.

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

Deletes an AI Gateway dataset.

AI Gateway

Datasets

AIGateway.Datasets

Methods

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

Lists all AI Gateway evaluator types configured for the account.

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

Retrieves details for a specific AI Gateway dataset.

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

Creates a new AI Gateway.

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

Updates an existing AI Gateway dataset.

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

Deletes an AI Gateway dataset.

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
gatewayId: string
(maxLength: 64, minLength: 1)

gateway id

id: string
account_id: string
Returns
DatasetDeleteResponse{
id: string
created_at: string
(format: date-time)
enable: boolean
filters: Array<>
gateway_id: string
(maxLength: 64, minLength: 1)

gateway id

modified_at: string
(format: date-time)
name: string
Request example
200Example
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

Lists all AI Gateway evaluator types configured for the account.

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

Retrieves details for a specific AI Gateway dataset.

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

Creates a new AI Gateway.

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

Deletes an AI Gateway dataset.

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}

Retrieves detailed information for a specific AI Gateway log entry.

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

Updates metadata for an AI Gateway log entry.

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

Retrieves the original request payload for an AI Gateway log entry.

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

Retrieves the response payload for an AI Gateway log entry.

AI Gateway

Provider Configs

AIGateway.ProviderConfigs

Methods

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

Lists all AI Gateway evaluator types configured for the account.

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

Creates a new AI Gateway.

AIGateway.URLs

Methods

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

Retrieves the endpoint URL for an AI Gateway.