Vapi · Schema

ModelCost

Artificial IntelligenceVoiceAgentsReal-TimeCPaaS

Properties

Name Type Description
type string This is the type of cost, always 'model' for this class.
model object This is the model that was used during the call. This matches one of the following: - `call.assistant.model`, - `call.assistantId->model`, - `call.squad[n].assistant.model`, - `call.squad[n].assistant
promptTokens number This is the number of prompt tokens used in the call. These should be total prompt tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each ass
completionTokens number This is the number of completion tokens generated in the call. These should be total completion tokens used in the call for single assistant calls, while squad calls will have multiple model costs one
cachedPromptTokens number This is the number of cached prompt tokens used in the call. This is only applicable to certain providers (e.g., OpenAI, Azure OpenAI) that support prompt caching. Cached tokens are billed at a discou
cost number This is the cost of the component in USD.
View JSON Schema on GitHub

JSON Schema

vapi-modelcost-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ModelCost",
  "title": "ModelCost",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "This is the type of cost, always 'model' for this class.",
      "enum": [
        "model"
      ]
    },
    "model": {
      "type": "object",
      "description": "This is the model that was used during the call.\n\nThis matches one of the following:\n- `call.assistant.model`,\n- `call.assistantId->model`,\n- `call.squad[n].assistant.model`,\n- `call.squad[n].assistantId->model`,\n- `call.squadId->[n].assistant.model`,\n- `call.squadId->[n].assistantId->model`."
    },
    "promptTokens": {
      "type": "number",
      "description": "This is the number of prompt tokens used in the call. These should be total prompt tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used."
    },
    "completionTokens": {
      "type": "number",
      "description": "This is the number of completion tokens generated in the call. These should be total completion tokens used in the call for single assistant calls, while squad calls will have multiple model costs one for each assistant that was used."
    },
    "cachedPromptTokens": {
      "type": "number",
      "description": "This is the number of cached prompt tokens used in the call. This is only applicable to certain providers (e.g., OpenAI, Azure OpenAI) that support prompt caching. Cached tokens are billed at a discounted rate."
    },
    "cost": {
      "type": "number",
      "description": "This is the cost of the component in USD."
    }
  },
  "required": [
    "type",
    "model",
    "promptTokens",
    "completionTokens",
    "cost"
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/vapi-modelcost"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.