AI Gateway
Set a model pricing override
Set a custom provider model's pricing override. Requires ai_gateway_config_write and provider Edit. Models and pricing inherit provider access.
put/api/v2/providers/{provider_id}/models/{canonical}/pricing
Request
- Base URLhttps://api.datadoghq.com
- Auth
- API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
- or OAuth 2Authorization code/oauth2/v1/authorizeToken URL/oauth2/v1/tokenScopesai_gateway_config_write
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
provider_idinteger required
Provider ID.
canonicalstring required
Canonical model identifier.
Request body
Example request
{
"data": {
"attributes": {
"pricing_config": {
"source": {
"type": "custom"
},
"version": 1
}
},
"id": "gpt-4o",
"type": "model-pricing"
}
}Response
OK
Example response
{
"data": {
"attributes": {
"pricing_config": {
"source": {
"provider_id": "openai",
"type": "custom"
},
"version": 1
}
},
"id": "gpt-4o",
"type": "model-pricing"
}
}Changes
Changes to this operation have not been checked yet.