---
title: "RAG Cost Calculator"
method: POST
path: "/api/v1/tools/rag-cost-calculator"
tags: ["ai"]
---

# RAG Cost Calculator

`POST /api/v1/tools/rag-cost-calculator`

## Request

- Base URL: `https://calcfleet.com`
- URL: `https://calcfleet.com/api/v1/tools/rag-cost-calculator`
- Auth: none declared

Estimate what a RAG pipeline costs: one-time corpus embedding, monthly vector storage, and per-query LLM generation from verified 2026 provider prices.

## Request body

- object
  - `docCount` integer, required
  - `avgTokensPerDoc` number, required
  - `chunkTokens` integer, required
  - `embeddingModelId` 'text-embedding-3-small' | 'text-embedding-3-large' | 'voyage-4' | 'voyage-4-lite' | 'voyage-4-large', required
  - `vectorStorageUsdPerGbMonth` number, required
  - `queriesPerMonth` integer, required
  - `retrievedTokensPerQuery` number, required
  - `generationModelId` 'gpt-5.5' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-opus-4.8' | 'claude-sonnet-4.6' | 'claude-haiku-4.5' | 'gemini-3.5-flash' | 'gemini-3.1-pro' | 'gemini-2.5-flash' | 'llama-3.3-70b-together' | 'llama-3-8b-lite-together', required
  - `outputTokensPerQuery` number, required

## Response `200`

Successful calculation result.

- object
  - `result` object, required: Structured calculation output (fields vary per calculator).

## Other responses

- `400`: Invalid input — the issues array contains Zod validation errors.
- `403`: Forbidden — an Authorization: Bearer cf_… key was supplied but is invalid.
- `404`: Unknown tool slug.

---

[API](https://skmtc.dev/calcfleet/apis/calcfleet-financial-calculators-api.md) · [All operations](https://skmtc.dev/calcfleet/apis/calcfleet-financial-calculators-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calcfleet/apis/calcfleet-financial-calculators-api/revisions/cd9abd595bbe?raw)
