# Pricing and limits

> Prices per million tokens, context window, output limits and rate-limit behaviour on Serenity Edge.

Source: https://docs.serenityedge.ai/docs/pricing-and-limits/

## Prices

Prices are in US dollars per million tokens and are read from `GET /v1/models` when this page is published and again when you open it. You are billed on the `usage` object returned with every response: `prompt_tokens` at the input price, of which `prompt_tokens_details.cached_tokens` at the cached input price, and `completion_tokens` at the output price. Reasoning tokens count as output tokens. The final chunk of a streamed chat completion also carries `usage.cost`, an estimate at these prices that ignores contract rates; it is informational, not the bill (see [Streaming](https://docs.serenityedge.ai/docs/streaming/#usage-in-the-final-chunk)). Inference has no usage records to read through the API: [`GET /v1/usage`](https://docs.serenityedge.ai/docs/api/edge/get-usage/) returns the usage records of [Sandboxes](https://docs.serenityedge.ai/docs/sandboxes/pricing-and-usage/#check-your-usage) only.

| Model | Input | Output | Cached input |
| --- | --- | --- | --- |
| `orion-pro` | $0.144 | $1.50 | $0.036 |
| `orion-plus` | $0.101 | $0.60 | $0.025 |
| `qwen3.8-27b` | $0.144 | $1.50 | $0.036 |
| `qwen3.6-35b-a3b` | $0.101 | $0.60 | $0.025 |
| `paddleocr-vl-1.6` | $0.016 | $0.016 | n/a |

Read from the API (`GET /v1/models`) when this page was published, on 20 November 2026, 14:40 UTC.

Images count as prompt tokens. A full page sent to `paddleocr-vl-1.6` for [document OCR](https://docs.serenityedge.ai/docs/models/#document-ocr) is about 1,250 prompt tokens.

A [stream](https://docs.serenityedge.ai/docs/streaming/) that ends before its usage chunk because you closed the connection, or because the request reached the 600-second limit (the stream then ends with a `timeout` error event), is billed for the output you received, on an estimate of its tokens: a quarter of the characters of that output (at least one token per chunk that carried output) and of the text of your messages and tools, rounded up, with images not counted. The whole estimated prompt is billed at the input price, with no cached input. A stream that fails on our side (any other error event, or no usage chunk) is not billed, and neither is a stream closed before any output arrived.

These are the prices of direct access to the API with a Serenity Edge API key. An [enterprise contract](https://docs.serenityedge.ai/docs/access/enterprise/) may set committed-use rates. With a key from a [Serenity Star account](https://docs.serenityedge.ai/docs/access/serenity-star-account/), Serenity Star bills your usage at the prices of that account. Through a [router or marketplace](https://docs.serenityedge.ai/docs/access/channels/), that platform bills you under its own terms and shows its own prices.

### Cached input

When the beginning of a prompt repeats across requests (a long system prompt, a shared document, the earlier turns of a conversation), the matching prefix can be served from the prompt cache and is billed at the cached input price. The number of cached tokens is reported in `usage.prompt_tokens_details.cached_tokens` (`usage.input_tokens_details.cached_tokens` on the [Responses API](https://docs.serenityedge.ai/docs/responses-api/)). To benefit, keep the stable part of the prompt at the start and the variable part at the end.

The cache works in blocks of tokens, so a prefix is cached only when it repeats over more than about 2,000 tokens (about 4,000 on `orion-plus` and `qwen3.6-35b-a3b`), and the cached part is a whole number of blocks; a shorter prompt is billed entirely at the input price. Every request of a conversation is sent to the server that already holds its prefix, so the earlier turns of a conversation are cached as long as you send them unchanged.

**One cache per API key.** Cached content is never shared between API keys. A prefix is served from the cache only to requests made with the key that sent it, so the first request of each key with a given prefix is billed at the full input price, even when another key has sent the same prefix. A new key, for example after a rotation, starts with an empty cache.

**Splitting a key's cache with `cache_salt`.** A platform that serves many users with one key can give each of them a cache of their own with the `cache_salt` field of `POST /v1/chat/completions`:

-   requests of one key with the same `cache_salt` share one cache;
-   requests with different values, or one with a value and one without, never share cached content;
-   requests without `cache_salt`, or with `null`, use the key's own cache;
-   two keys never share a cache, whatever values they send.

```python
response = client.chat.completions.create(
    model="orion-plus",
    messages=messages,
    extra_body={"cache_salt": "customer-4821"},
)
```

The value must be a string of 1 to 128 characters without `@`, `/`, `\` or NUL. Anything else is refused with HTTP 400, `param: "cache_salt"` and the message `The 'cache_salt' field must be a string of 1 to 128 characters without '@', '/', '\' or NUL.` The value is not logged and does not come back in the answer. The [Responses API](https://docs.serenityedge.ai/docs/responses-api/) has no `cache_salt` parameter (it is refused as an unknown parameter): its requests always use the key's own cache, and its `prompt_cache_key` is accepted without changing the cache.

## Decision models

> **Preview**
> 
> Decision models are in public preview. Their availability will be announced in the [release notes](https://docs.serenityedge.ai/release-notes/).

[Decision models](https://docs.serenityedge.ai/docs/decisions/) are billed on input tokens only: `usage.input_tokens` of each reply at the input price below. Output is not billed, and there is no cached input price. The model reads the input together with each question, so the input tokens of a request grow with the number of questions as well as with the length of the input. Prices are in US dollars per million input tokens and are read from `GET /v1/models?format=openai` when this page is published and again when you open it. On `orion-compass-flash` and `d3`, the tokens of a request's images are input tokens too: `usage.input_tokens` counts them, and `usage.input_tokens_details.image_tokens` (`usage.image_tokens` on `POST /v1/systemone`) shows their part.

| Model id | Context | Reads | Input | Output | Endpoints |
| --- | --- | --- | --- | --- | --- |
| `d3`, also `vllm-sr/d3` | 24,576 | text, image | $0.042 | Free | /v1/decisions, /v1/systemone |
| `orion-compass`, alias of `orion-compass-26.1` | 32,000 | text | $0.034 | Free | /v1/decisions, /v1/systemone |
| `orion-compass-flash`, alias of `orion-compass-flash-26.1` | 32,000 | text, image | $0.017 | Free | /v1/decisions, /v1/systemone |

Read from the API (`GET /v1/models?format=openai`) when this page was published, on 20 November 2026, 14:40 UTC.

A decision request whose input and questions do not fit the context length is refused with `code: "context_length_exceeded"` rather than truncated. Rate limits and capacity work as for chat completions: see below.

## Embeddings, rerank and redaction

The models of `POST /v1/embeddings`, `POST /v1/rerank` and `POST /v1/redact` are billed on input tokens only, at the price below; output is not billed, and there is no cached input price. Prices are in US dollars per million tokens and are read from `GET /v1/models?format=openai` when this page is published and again when you open it. See [Embeddings, rerank and redaction](https://docs.serenityedge.ai/docs/embeddings-rerank-and-redaction/) for worked examples.

| Model id | Input | Endpoint |
| --- | --- | --- |
| `privacy-filter`, also `openai/privacy-filter` | $0.009 | /v1/redact |
| `qwen3-embedding-0.6b`, also `qwen/qwen3-embedding-0.6b` | $0.008 | /v1/embeddings |
| `qwen3-reranker-0.6b`, also `qwen/qwen3-reranker-0.6b` | $0.008 | /v1/rerank |

Read from the API (`GET /v1/models?format=openai`) when this page was published, on 20 November 2026, 14:40 UTC.

| Route | Billed tokens | Per request |
| --- | --- | --- |
| `POST /v1/embeddings` | `usage.prompt_tokens` of the answer: each input's own tokens, as the model counts them | At most 512 inputs and about 300,000 tokens (a quarter of the characters), each input read up to its first 8,192 tokens; body up to 4 MB |
| `POST /v1/rerank` | Estimated per document as `ceil((characters(query) + characters(document)) / 4)`, added up and returned in `usage` | At most 1000 documents, a query of 4096 characters and about 300,000 tokens (the estimate in the previous column); body up to 4 MB |
| `POST /v1/redact` | Estimated as `ceil(characters of all inputs / 4)`; the answer has no `usage` | At most 256 inputs; body up to 192 KiB (196,608 bytes) |

Characters are Unicode code points, not bytes. If an embeddings answer ever comes without `usage`, it is billed on an estimate instead: a quarter of the characters of each string, rounded up. A request over a limit is refused before it reaches the model: HTTP 400 for too many inputs or documents, HTTP 413 for a body that is too large. Rate limits and capacity work as for chat completions: see below.

## Speech to text

The model of `POST /v1/audio/transcriptions` is billed per second of audio, not per token: each request is billed for the duration of its audio in seconds, rounded up, at least one second, and `usage.seconds` of the answer is what was billed. Output is not billed separately. A request that ends in an error is not billed. The price is in US dollars per second of audio and is read from `GET /v1/models?format=openai` (`audio_pricing.per_second`) when this page is published and again when you open it.

| Model id | Per second of audio |
| --- | --- |
| `vibevoice-asr`, also `microsoft/vibevoice-asr` | $0.000047 |

Read from the API (`GET /v1/models?format=openai`) when this page was published, on 20 November 2026, 14:40 UTC.

| Per request | Limit |
| --- | --- |
| Audio | At most 5 minutes, when the duration can be read from the file; longer files are refused with HTTP 400 before anything is billed |
| Body | At most 16 MiB, the file included; a larger one is refused with HTTP 413 |

See [Speech to text](https://docs.serenityedge.ai/docs/audio-transcriptions/#billing) for how the duration is measured. Rate limits and capacity work as for chat completions: see below.

## Context and output limits

The context window (input plus output) and the maximum output (`max_tokens`) of each model are shown in the [catalogue](https://docs.serenityedge.ai/docs/models/#catalogue) and returned by `GET /v1/models`. A request whose messages exceed the context window is rejected with HTTP 400. A response that reaches `max_tokens` or the end of the context window returns `finish_reason: "length"`.

## Rate limits

Rate limits count requests, not tokens: there is no tokens-per-minute limit. A router or marketplace and an enterprise contract can set a limit of requests per minute and a limit of requests in flight for every key of that access route, and a key can have limits of its own. Each model also serves a limited number of requests at a time (see [Capacity](https://docs.serenityedge.ai/docs/pricing-and-limits/#capacity)). When a request goes over either, the API returns **HTTP 429** with a `Retry-After` header stating how many seconds to wait, and an [error object](https://docs.serenityedge.ai/docs/errors-and-rate-limits/#rate-limits-and-http-429) of type `rate_limit_error`.

Handle 429 with exponential backoff and honour `Retry-After`. The OpenAI SDKs retry 429 automatically; see [Errors and rate limits](https://docs.serenityedge.ai/docs/errors-and-rate-limits/) for details and for how to request a higher limit.

## Capacity

Serenity Edge runs on Substrate AI's own GPUs in Spain, not on a hyperscaler. Capacity is added in steps as new hardware comes online. Each model serves a limited number of requests at a time, which the access routes share, and no single route can take all of it. During peaks the API responds with HTTP 429 and a `Retry-After` header rather than queue requests and degrade latency for everyone; handle it like any other 429. Capacity problems are always a 429, never a 5xx. If you need guaranteed throughput, an [enterprise contract](https://docs.serenityedge.ai/docs/access/enterprise/) reserves capacity for you.
