---
title: "LLM Self-Host vs API Cost Calculator"
method: POST
path: "/api/v1/tools/llm-self-host-vs-api-calculator"
tags: ["ai"]
---

# LLM Self-Host vs API Cost Calculator

`POST /api/v1/tools/llm-self-host-vs-api-calculator`

## Request

- Base URL: `https://calcfleet.com`
- URL: `https://calcfleet.com/api/v1/tools/llm-self-host-vs-api-calculator`
- Auth: none declared

Find the monthly token volume where self-hosting an LLM on rented GPUs beats paying per token for an API. Compare costs, GPUs needed, and breakeven point.

## Request body

- object
  - `monthlyInputTokensM` number, required
  - `monthlyOutputTokensM` number, required
  - `apiModelId` '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
  - `gpuId` 'h100-sxm-80gb' | 'a100-sxm-80gb' | 'a100-40gb' | 'l40s-48gb' | 'rtx-4090-24gb', required
  - `gpuHourlyUsd` number, required
  - `throughputTokensPerSec` number, required
  - `utilizationPct` 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)
