Creating or updating a model price¶
Note
The Admin API requires no token. The Admin API is typically protected at the network level.
Send the request as PUT to the path /admin/v1/model-prices.
Description¶
Upserts a pricing record using (provider, model) as the key. If a record already exists it is replaced.
Example¶
Example of the request body:
{
"provider": "openai",
"model": "gpt-4o",
"input_per_1k": 0.005,
"output_per_1k": 0.015,
"cache_write_per_1k": null,
"cache_read_per_1k": null
}
Responses¶
The endpoint answers the request with the following status codes:
| Status code | Description |
|---|---|
200 |
Operation succeeded. |
400 |
Invalid request body or missing required field (Admin API). |