List Costs
GEThttps://api.confident-ai.com/v2/model-costs
Lists the custom model prices your Confident AI project uses one page at a time, newest first. When the project inherits its pricing from the organization the response carries the organization's model costs and inherit is true, in which case they can only be changed from the organization's own project.
curl -X GET "https://api.confident-ai.com/v2/model-costs" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"modelCosts": [
{
"id": "<MODEL-COST-ID>",
"matchPattern": "^gpt-4o",
"provider": "openai",
"inputCostPerMillionTokens": 2.5,
"outputCostPerMillionTokens": 10,
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-16T09:05:00.000Z"
}
],
"totalModelCosts": 4,
"inherit": false,
"page": 1,
"pageSize": 25
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/project-settings/model-costs",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Query parameters
pageintegerdefault: 1The page to return. Defaults to 1.
pageSizeintegerdefault: 25The number of model costs per page, at most 100. Defaults to 25.
searchTermstringReturns only model costs whose match pattern or provider contains this text, case-insensitively.
Response
List Costs succeeded.
successbooleanIndicates if the request was successful.
dataobjectOne page of model costs, with the total across all pages.
Show 5 propertiesHide 5 properties
modelCostslist of objectsThe model costs for the current page, newest first.
Show 7 propertiesHide 7 properties
idstringThe id of the model cost, generated by Confident AI.
matchPatternstringThe case-insensitive regular expression a model name must match for this cost to apply.
providerstring | nullThe model provider this cost applies to, or null when it applies whatever the provider.
inputCostPerMillionTokensnumber | nullThe cost in USD of one million input tokens, or null when the input rate is not priced.
outputCostPerMillionTokensnumber | nullThe cost in USD of one million output tokens, or null when the output rate is not priced.
createdAtstringThe timestamp when the model cost was created.
updatedAtstringThe timestamp when the model cost was last updated.
totalModelCostsintegerThe total number of model costs this project resolves.
inheritbooleanWhether these model costs come from the organization rather than the project. When true they are read-only through the API, and creating, updating or deleting one fails until 'Inherit Custom Model Pricing From Organization' is turned off in the project's model costs settings.
pageintegerThe page this response covers.
pageSizeintegerThe number of model costs per page.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.