---
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. Uses the same pricing and the same token→credit rate that bills real usage, so a caller needs no copy of either. Does not record usage or spend credits. Usage on a model with no known 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/revisions/e7688d4122e1/schema)
