POST /accounts/{account_id}/ai-gateway/custom-providers/costs
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 |
|---|---|---|---|
model_rule |
String | No |
Valid values:
Default value: "equals" |
token_pricing |
Object | No | |
token_pricing.input_image_tokens |
Number | No | |
token_pricing.input_video_tokens |
Number | No | |
token_pricing.input_tokens |
Number | No | |
token_pricing.output_image_count |
Number | No | |
token_pricing.total_tokens |
Number | No | |
token_pricing.input_image_count |
Number | No | |
token_pricing.output_reasoning_tokens |
Number | No | |
token_pricing.input_audio_tokens |
Number | No | |
token_pricing.input_cached_tokens |
Number | No | |
token_pricing.input_cache_creation_tokens |
Number | No | |
token_pricing.input_text_tokens |
Number | No | |
token_pricing.output_tokens |
Number | No | |
cost_in |
Number | No | |
account_provider_id |
String | Yes | |
cost_out |
Number | No | |
cost_type |
String | No |
Default value: "tokens" |
enable |
Boolean | No | |
model |
String | Yes |
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.