Launch Week 02 wrapped — explore all five launches

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.

GET/v2/model-costs
curl -X GET "https://api.confident-ai.com/v2/model-costs" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Query parameters

  • pageintegerdefault: 1

    The page to return. Defaults to 1.

  • pageSizeintegerdefault: 25

    The number of model costs per page, at most 100. Defaults to 25.

  • searchTermstring

    Returns only model costs whose match pattern or provider contains this text, case-insensitively.

Response

List Costs succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    One page of model costs, with the total across all pages.

    Show 5 propertiesHide 5 properties
    • modelCostslist of objects

      The model costs for the current page, newest first.

      Show 7 propertiesHide 7 properties
      • idstring

        The id of the model cost, generated by Confident AI.

      • matchPatternstring

        The case-insensitive regular expression a model name must match for this cost to apply.

      • providerstring | null

        The model provider this cost applies to, or null when it applies whatever the provider.

      • inputCostPerMillionTokensnumber | null

        The cost in USD of one million input tokens, or null when the input rate is not priced.

      • outputCostPerMillionTokensnumber | null

        The cost in USD of one million output tokens, or null when the output rate is not priced.

      • createdAtstring

        The timestamp when the model cost was created.

      • updatedAtstring

        The timestamp when the model cost was last updated.

    • totalModelCostsinteger

      The total number of model costs this project resolves.

    • inheritboolean

      Whether 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.

    • pageinteger

      The page this response covers.

    • pageSizeinteger

      The number of model costs per page.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI