Developers / Agents

Estimate the cost of a language model

GET https://api.echonova.ai/v1/llm/estimate

Returns what one language model costs this workspace in credits, per minute of a voice call and per million tokens. Prices are null when the workspace has no usable rate card. Needs the agents:read scope on the key.

Headers

Authorization string Required

Bearer, a space, then your API key, which starts with ek_. Create keys in the portal under Developers, API Keys.

Query parameters

model string Required

The model id, as an agent's llm.model shows it, for example gpt-4o.

Up to 100 characters

Response

200 application/json Every response uses this envelope.

data object

The result.

success boolean

true for a successful call.

statusCode integer

Repeats the HTTP status.

errorMessage string or null

null on success.

Errors

Same envelope, with success false and data null. All errors

GET /v1/llm/estimate

curl "https://api.echonova.ai/v1/llm/estimate?model=gpt-4o" \
  -H "Authorization: Bearer YOUR_API_KEY"

{
  "data": {
    "model": "gpt-4o",
    "creditsPerMinute": 3,
    "creditsPerMillionOnYourPlan": {
      "input": 10,
      "output": 40,
      "cachedInput": 5,
      "cacheWrite": null
    },
    "creditsPerMillionAtCurrentRate": {
      "input": 10,
      "output": 40,
      "cachedInput": 5,
      "cacheWrite": null
    }
  },
  "success": true,
  "statusCode": 200,
  "errorMessage": null
}