---
title: "Calculate Expected Llm Usage For An Agent"
method: POST
path: "/v1/convai/agent/{agent_id}/llm-usage/calculate"
tags: ["Agents Platform"]
---

# Calculate Expected Llm Usage For An Agent

`POST /v1/convai/agent/{agent_id}/llm-usage/calculate`

Calculates expected number of LLM tokens needed for the specified agent.

## Path parameters

- `agent_id` string, required

## Headers

- `xi-api-key` string, nullable — Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- LLMUsageCalculatorRequestModel
  - `prompt_length` integer, nullable — Length of the prompt in characters.
  - `number_of_pages` integer, nullable — Pages of content in pdf documents OR urls in agent's Knowledge Base.
  - `rag_enabled` boolean, nullable — Whether RAG is enabled.

## Response `200`

Successful Response

- LLMUsageCalculatorResponseModel
  - `llm_prices` LLMUsageCalculatorLLMResponseModel[], required
    - `llm` 'gpt-4o-mini' | 'gpt-4o' | 'gpt-4' | 'gpt-4-turbo' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-5' | 'gpt-5.1' | 'gpt-5.2' | 'gpt-5.2-chat-latest' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.5' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-6-astra' | 'gpt-6-sol' | 'gpt-6-luna' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-3.5-turbo' | 'gemini-1.5-pro' | 'gemini-1.5-flash' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash' | 'gemini-3-pro-preview' | 'gemini-3-flash-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-lite' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'gemini-3.7-flash' | 'gemini-3.8-flash' | 'claude-sonnet-4-5' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-opus-5' | 'claude-opus-5-5' | 'claude-sonnet-4-6' | 'claude-sonnet-5' | 'claude-sonnet-4' | 'claude-haiku-4-5' | 'claude-3-7-sonnet' | 'claude-3-5-sonnet' | 'claude-3-5-sonnet-v1' | 'claude-3-haiku' | 'grok-beta' | 'custom-llm' | 'qwen3-4b' | 'qwen3-30b-a3b' | 'qwen36-35b-a3b' | 'qwen35-397b-a17b' | 'gpt-oss-20b' | 'gpt-oss-120b' | 'glm-45-air-fp8' | 'glm-52' | 'deepseek-v41-flash' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-preview-05-20' | 'gemini-2.5-flash-preview-04-17' | 'gemini-2.5-flash-lite-preview-06-17' | 'gemini-2.0-flash-lite-001' | 'gemini-2.0-flash-001' | 'gemini-1.5-flash-002' | 'gemini-1.5-flash-001' | 'gemini-1.5-pro-002' | 'gemini-1.5-pro-001' | 'claude-sonnet-4@20250514' | 'claude-sonnet-4-5@20250929' | 'claude-haiku-4-5@20251001' | 'claude-3-7-sonnet@20250219' | 'claude-3-5-sonnet@20240620' | 'claude-3-5-sonnet-v2@20241022' | 'claude-3-haiku@20240307' | 'gpt-5-2025-08-07' | 'gpt-5.1-2025-11-13' | 'gpt-5.2-2025-12-11' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.5-2026-04-23' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o-mini-2024-07-18' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4-0613' | 'gpt-4-0314' | 'gpt-4-turbo-2024-04-09' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'watt-tool-8b' | 'watt-tool-70b', required
    - `price_per_minute` number, required
    - `price_per_message` number, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-26** `4a6716242c9e` — 1 warning
  - added the new `deepseek-v41-flash` enum value to the `llm_prices/items/llm` response property for the response status `200`
- **2026-09-23** `ee57929773bf` — 3 warning
  - added the new `glm-52` enum value to the `llm_prices/items/llm` response property for the response status `200`
  - added the new `gpt-6-luna` enum value to the `llm_prices/items/llm` response property for the response status `200`
  - added the new `gpt-6-sol` enum value to the `llm_prices/items/llm` response property for the response status `200`
- **2026-09-23** `cefd6ab6f610` — 2 warning
  - added the new `claude-opus-5` enum value to the `llm_prices/items/llm` response property for the response status `200`
  - added the new `claude-opus-5-5` enum value to the `llm_prices/items/llm` response property for the response status `200`
- **2026-09-15** `101ef23e3958` — 1 warning
  - added the new `gpt-6-astra` enum value to the `llm_prices/items/llm` response property for the response status `200`
- **2026-09-11** `01782c0621ab` — 1 info
  - added the required property `llm_prices/items/price_per_message` to the response with the `200` status

[Full history](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/changes/v1/convai/agent/:agent_id/llm-usage/calculate/post.md)

---

[API](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation.md) · [All operations](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/revisions/4a6716242c9e?raw)
