---
title: "POST /v1/llm/cost"
method: POST
path: "/v1/llm/cost"
tags: ["LLM"]
---

# POST /v1/llm/cost

`POST /v1/llm/cost`

Quotes the credit cost of LLM usage. Each entry is the usage of ONE model call and is priced on its own, because provider pricing is tiered on the size of a single request: summing a session into one entry would quote the long-context rate. Prices through the same LiteLLM cost map and the same token→credit rate that bills real usage, so a client (e.g. the agent's `/cost`) needs no copy of either. Records nothing and spends nothing. Usage on a model LiteLLM cannot price contributes 0 credits and the model is named in `unpricedModels`.

## Headers

- `Authorization` string

## Request body

- object
  - `usage` object[], required
    - `model` string, required
    - `inputTokens` integer, required
    - `outputTokens` integer, required
    - `cacheReadTokens` integer, required
    - `cacheWriteTokens` integer, required

## Response `200`

Default Response

- object
  - `links` object, required
    - `self` string, uri, required
  - `data` object, required
    - `id` 'llm-cost-quote', required
    - `type` 'llm-cost-quote', required
    - `attributes` object, required
      - `credits` number, required
      - `unpricedModels` string[], required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/tessl/apis/tessl-api.md) · [All operations](https://skmtc.net/tessl/apis/tessl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tessl/tessl-api/versions/fbb186825642/schema)
