---
title: AI Gateway
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# AI Gateway

##### [List gateways](https://developers.cloudflare.com/api/go/resources/ai_gateway/methods/list)

client.AIGateway.List(ctx, params) (\*V4PagePaginationArray\[[AIGatewayListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway%20%3E%20(model)%20AIGatewayListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/ai-gateway/gateways

##### [Get a gateway](https://developers.cloudflare.com/api/go/resources/ai_gateway/methods/get)

client.AIGateway.Get(ctx, id, query) (\*[AIGatewayGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway%20%3E%20(model)%20AIGatewayGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{id}

##### [Create a gateway](https://developers.cloudflare.com/api/go/resources/ai_gateway/methods/create)

client.AIGateway.New(ctx, params) (\*[AIGatewayNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway%20%3E%20(model)%20AIGatewayNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways

##### [Update a gateway](https://developers.cloudflare.com/api/go/resources/ai_gateway/methods/update)

client.AIGateway.Update(ctx, id, params) (\*[AIGatewayUpdateResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway%20%3E%20(model)%20AIGatewayUpdateResponse%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/ai-gateway/gateways/{id}

##### [Delete a gateway](https://developers.cloudflare.com/api/go/resources/ai_gateway/methods/delete)

client.AIGateway.Delete(ctx, id, body) (\*[AIGatewayDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway%20%3E%20(model)%20AIGatewayDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/ai-gateway/gateways/{id}

#### AI GatewayEvaluation Types

##### [List evaluator types (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/evaluation_types/methods/list)

client.AIGateway.EvaluationTypes.List(ctx, params) (\*V4PagePaginationArray\[[EvaluationTypeListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.evaluation_types%20%3E%20(model)%20EvaluationTypeListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/ai-gateway/evaluation-types

#### AI GatewayCustom Providers

##### [List custom providers](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/custom_providers/methods/list)

client.AIGateway.CustomProviders.List(ctx, params) (\*V4PagePaginationArray\[[CustomProviderListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20CustomProviderListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/ai-gateway/custom-providers

##### [Get a custom provider](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/custom_providers/methods/get)

client.AIGateway.CustomProviders.Get(ctx, id, query) (\*[CustomProviderGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20CustomProviderGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/custom-providers/{id}

##### [Create a custom provider](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/custom_providers/methods/create)

client.AIGateway.CustomProviders.New(ctx, params) (\*[CustomProviderNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20CustomProviderNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/custom-providers

##### [Delete a custom provider](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/custom_providers/methods/delete)

client.AIGateway.CustomProviders.Delete(ctx, id, body) (\*[CustomProviderDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.custom_providers%20%3E%20(model)%20CustomProviderDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/ai-gateway/custom-providers/{id}

#### AI GatewayLogs

##### [List Gateway Logs](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/list)

client.AIGateway.Logs.List(ctx, gatewayID, params) (\*V4PagePaginationArray\[[LogListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/logs

##### [Get Gateway Log Detail](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/get)

client.AIGateway.Logs.Get(ctx, gatewayID, id, query) (\*[LogGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/logs/{id}

##### [Patch Gateway Log](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/edit)

client.AIGateway.Logs.Edit(ctx, gatewayID, id, params) (\*[LogEditResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogEditResponse%20%3E%20(schema)>), error)

PATCH/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/logs/{id}

##### [Delete Gateway Logs](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/delete)

client.AIGateway.Logs.Delete(ctx, gatewayID, params) (\*[LogDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/logs

##### [Get Gateway Log Request](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/request)

client.AIGateway.Logs.Request(ctx, gatewayID, id, query) (\*[LogRequestResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogRequestResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/logs/{id}/request

##### [Get Gateway Log Response](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/logs/methods/response)

client.AIGateway.Logs.Response(ctx, gatewayID, id, query) (\*[LogResponseResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.logs%20%3E%20(model)%20LogResponseResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/logs/{id}/response

#### AI GatewayDatasets

##### [List datasets (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/datasets/methods/list)

client.AIGateway.Datasets.List(ctx, gatewayID, params) (\*V4PagePaginationArray\[[DatasetListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.datasets%20%3E%20(model)%20DatasetListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets

##### [Get a dataset (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/datasets/methods/get)

client.AIGateway.Datasets.Get(ctx, gatewayID, id, query) (\*[DatasetGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.datasets%20%3E%20(model)%20DatasetGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets/{id}

##### [Create a dataset (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/datasets/methods/create)

client.AIGateway.Datasets.New(ctx, gatewayID, params) (\*[DatasetNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.datasets%20%3E%20(model)%20DatasetNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets

##### [Update a dataset (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/datasets/methods/update)

client.AIGateway.Datasets.Update(ctx, gatewayID, id, params) (\*[DatasetUpdateResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.datasets%20%3E%20(model)%20DatasetUpdateResponse%20%3E%20(schema)>), error)

PUT/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets/{id}

##### [Delete a dataset (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/datasets/methods/delete)

client.AIGateway.Datasets.Delete(ctx, gatewayID, id, body) (\*[DatasetDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.datasets%20%3E%20(model)%20DatasetDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/datasets/{id}

#### AI GatewayEvaluations

##### [List evaluations (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/evaluations/methods/list)

client.AIGateway.Evaluations.List(ctx, gatewayID, params) (\*V4PagePaginationArray\[[EvaluationListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20EvaluationListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/evaluations

##### [Get an evaluation (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/evaluations/methods/get)

client.AIGateway.Evaluations.Get(ctx, gatewayID, id, query) (\*[EvaluationGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20EvaluationGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/evaluations/{id}

##### [Create an evaluation (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/evaluations/methods/create)

client.AIGateway.Evaluations.New(ctx, gatewayID, params) (\*[EvaluationNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20EvaluationNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/evaluations

##### [Delete an evaluation (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/evaluations/methods/delete)

client.AIGateway.Evaluations.Delete(ctx, gatewayID, id, body) (\*[EvaluationDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.evaluations%20%3E%20(model)%20EvaluationDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/evaluations/{id}

#### AI GatewayDynamic Routing

##### [List dynamic routes](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/list)

client.AIGateway.DynamicRouting.List(ctx, gatewayID, params) (\*[DynamicRoutingListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingListResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes

##### [Get a dynamic route](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/get)

client.AIGateway.DynamicRouting.Get(ctx, gatewayID, id, query) (\*[DynamicRoutingGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}

##### [Create a dynamic route](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/create)

client.AIGateway.DynamicRouting.New(ctx, gatewayID, params) (\*[DynamicRoutingNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes

##### [Rename a dynamic route](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/update)

client.AIGateway.DynamicRouting.Update(ctx, gatewayID, id, params) (\*[DynamicRoutingUpdateResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingUpdateResponse%20%3E%20(schema)>), error)

PATCH/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}

##### [Delete a dynamic route](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/delete)

client.AIGateway.DynamicRouting.Delete(ctx, gatewayID, id, body) (\*[DynamicRoutingDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}

##### [List dynamic route deployments](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/list_deployments)

client.AIGateway.DynamicRouting.ListDeployments(ctx, gatewayID, id, query) (\*[DynamicRoutingListDeploymentsResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingListDeploymentsResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/deployments

##### [Deploy a dynamic route version](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/create_deployment)

client.AIGateway.DynamicRouting.NewDeployment(ctx, gatewayID, id, params) (\*[DynamicRoutingNewDeploymentResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingNewDeploymentResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/deployments

##### [List dynamic route versions](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/list_versions)

client.AIGateway.DynamicRouting.ListVersions(ctx, gatewayID, id, query) (\*[DynamicRoutingListVersionsResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingListVersionsResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/versions

##### [Create a dynamic route version](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/create_version)

client.AIGateway.DynamicRouting.NewVersion(ctx, gatewayID, id, params) (\*[DynamicRoutingNewVersionResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingNewVersionResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/versions

##### [Get a dynamic route version](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/dynamic_routing/methods/get_version)

client.AIGateway.DynamicRouting.GetVersion(ctx, gatewayID, id, versionID, query) (\*[DynamicRoutingGetVersionResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.dynamic_routing%20%3E%20(model)%20DynamicRoutingGetVersionResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/routes/{id}/versions/{version\_id}

#### AI GatewayProvider Configs

##### [List provider keys](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/provider_configs/methods/list)

client.AIGateway.ProviderConfigs.List(ctx, gatewayID, params) (\*V4PagePaginationArray\[[ProviderConfigListResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20ProviderConfigListResponse%20%3E%20(schema)>)], error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/provider\_configs

##### [Store a provider key](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/provider_configs/methods/create)

client.AIGateway.ProviderConfigs.New(ctx, gatewayID, params) (\*[ProviderConfigNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.provider_configs%20%3E%20(model)%20ProviderConfigNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/provider\_configs

#### AI GatewayURLs

##### [Get Gateway URL](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/urls/methods/get)

client.AIGateway.URLs.Get(ctx, gatewayID, provider, query) (\*string, error)

GET/accounts/{account\_id}/ai-gateway/gateways/{gateway\_id}/url/{provider}

#### AI GatewayBilling

##### [Get credit balance](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/methods/credit_balance)

client.AIGateway.Billing.CreditBalance(ctx, query) (\*[BillingCreditBalanceResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing%20%3E%20(model)%20BillingCreditBalanceResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/billing/credit-balance

##### [Get usage history](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/methods/usage_history)

client.AIGateway.Billing.UsageHistory(ctx, params) (\*[BillingUsageHistoryResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing%20%3E%20(model)%20BillingUsageHistoryResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/billing/usage-history

##### [Get invoice history](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/methods/invoice_history)

client.AIGateway.Billing.InvoiceHistory(ctx, params) (\*[BillingInvoiceHistoryResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing%20%3E%20(model)%20BillingInvoiceHistoryResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/billing/invoice-history

##### [Get invoice preview](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/methods/invoice_preview)

client.AIGateway.Billing.InvoicePreview(ctx, query) (\*[BillingInvoicePreviewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing%20%3E%20(model)%20BillingInvoicePreviewResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/billing/invoice-preview

#### AI GatewayBillingTopup

##### [Create a top-up](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/subresources/topup/methods/create)

client.AIGateway.Billing.Topup.New(ctx, params) (\*[BillingTopupNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing.topup%20%3E%20(model)%20BillingTopupNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/billing/topup

##### [Check top-up status](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/subresources/topup/methods/status)

client.AIGateway.Billing.Topup.Status(ctx, params) (\*[BillingTopupStatusResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing.topup%20%3E%20(model)%20BillingTopupStatusResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/billing/topup/status

#### AI GatewayBillingTopupConfig

##### [Get auto top-up configuration](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/subresources/topup/subresources/config/methods/get)

client.AIGateway.Billing.Topup.Config.Get(ctx, query) (\*[BillingTopupConfigGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing.topup.config%20%3E%20(model)%20BillingTopupConfigGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/billing/topup/config

##### [Set auto top-up configuration](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/subresources/topup/subresources/config/methods/create)

client.AIGateway.Billing.Topup.Config.New(ctx, params) (\*[BillingTopupConfigNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing.topup.config%20%3E%20(model)%20BillingTopupConfigNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/billing/topup/config

##### [Delete auto top-up configuration](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/subresources/topup/subresources/config/methods/delete)

client.AIGateway.Billing.Topup.Config.Delete(ctx, body) (\*[BillingTopupConfigDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing.topup.config%20%3E%20(model)%20BillingTopupConfigDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/ai-gateway/billing/topup/config

#### AI GatewayBillingSpending Limit

##### [Get spending limit (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/subresources/spending_limit/methods/get)

client.AIGateway.Billing.SpendingLimit.Get(ctx, query) (\*[BillingSpendingLimitGetResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing.spending_limit%20%3E%20(model)%20BillingSpendingLimitGetResponse%20%3E%20(schema)>), error)

GET/accounts/{account\_id}/ai-gateway/billing/spending-limit

##### [Set spending limit (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/subresources/spending_limit/methods/create)

Deprecated

client.AIGateway.Billing.SpendingLimit.New(ctx, params) (\*[BillingSpendingLimitNewResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing.spending_limit%20%3E%20(model)%20BillingSpendingLimitNewResponse%20%3E%20(schema)>), error)

POST/accounts/{account\_id}/ai-gateway/billing/spending-limit

##### [Delete spending limit (deprecated)](https://developers.cloudflare.com/api/go/resources/ai_gateway/subresources/billing/subresources/spending_limit/methods/delete)

client.AIGateway.Billing.SpendingLimit.Delete(ctx, body) (\*[BillingSpendingLimitDeleteResponse](<https://developers.cloudflare.com/api/go/resources/ai_gateway#(resource)%20ai_gateway.billing.spending_limit%20%3E%20(model)%20BillingSpendingLimitDeleteResponse%20%3E%20(schema)>), error)

DELETE/accounts/{account\_id}/ai-gateway/billing/spending-limit