POST /accounts/{account_id}/ai-gateway/gateways
Creates a new AI Gateway.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id |
String | Yes |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
workers_ai_billing_mode |
String | No |
Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Valid values:
Default value: "postpaid" |
cache_ttl |
Integer | Yes | |
rate_limiting_limit |
Integer | Yes | |
authentication |
Boolean | No | |
rate_limiting_technique |
String | No |
Valid values:
|
cache_invalidate_on_update |
Boolean | Yes | |
collect_logs |
Boolean | Yes | |
id |
String | Yes |
gateway id |
logpush_public_key |
String | No | |
rate_limiting_interval |
Integer | Yes | |
log_management_strategy |
String | No |
Valid values:
|
logpush |
Boolean | No | |
retry_delay |
Integer | No |
Delay between retry attempts in milliseconds (0-5000) |
log_management |
Integer | No | |
retry_backoff |
String | No |
Backoff strategy for retry delays Valid values:
|
zdr |
Boolean | No | |
retry_max_attempts |
Integer | No |
Maximum number of retry attempts for failed requests (1-5) |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.