# Serenity Edge > Serenity Edge is the OpenAI-compatible inference API of Substrate AI, run on its own GPU infrastructure in Spain. Prompts and completions are never written to disk or logs and never used for training. Base URL: `https://api.serenityedge.ai/v1`, with bearer authentication. Code that already uses an OpenAI SDK only needs a new base URL and API key. The live catalogue with context lengths and prices needs no key: `GET https://api.serenityedge.ai/v1/models` lists the chat models (OpenRouter provider schema) and `GET https://api.serenityedge.ai/v1/models?format=openai` lists every model with the endpoints it is served on. Sandboxes (private preview, by invitation): isolated microVMs for AI agents, compatible with the E2B API and the official E2B SDKs. Set `E2B_DOMAIN=serenityedge.ai` and `E2B_API_KEY` to a Serenity Edge API key whose account has Sandboxes enabled: the SDKs then manage sandboxes through `https://api.serenityedge.ai`, the same host and key as inference, on the E2B API's paths (not under `/v1`), and reach each sandbox on the sandbox domain the API returns for it. Each link below points to the Markdown version of a page; the same URL without `.md` is the HTML page. [llms-full.txt](https://docs.serenityedge.ai/llms-full.txt) holds the docs, guides, access pages and API reference in one file. ## Docs - [Getting started](https://docs.serenityedge.ai/docs/getting-started.md): Make your first request to Serenity Edge, the OpenAI-compatible inference API running on GPUs in Spain. - [Models](https://docs.serenityedge.ai/docs/models.md): The models available on Serenity Edge: the Orion family and the open models, with context, output limits and capabilities read from the API. - [Pricing and limits](https://docs.serenityedge.ai/docs/pricing-and-limits.md): Prices per million tokens, context window, output limits and rate-limit behaviour on Serenity Edge. - [Data residency and retention](https://docs.serenityedge.ai/docs/data-residency.md): Where Serenity Edge processes your data, what it keeps, for how long, and what it never does with it. ## Guides - [Streaming](https://docs.serenityedge.ai/docs/streaming.md): Receive chat completions as server-sent events, with token usage in the final chunk. - [Tool calling](https://docs.serenityedge.ai/docs/tool-calling.md): Let the model call your functions with the OpenAI tools and tool_choice parameters. - [Structured outputs](https://docs.serenityedge.ai/docs/structured-outputs.md): Constrain the response to plain text, any JSON object, or a JSON schema with response_format. - [Responses API](https://docs.serenityedge.ai/docs/responses-api.md): Call every chat model with OpenAI's Responses API (POST /v1/responses): stateless, with streaming events, function tools, structured outputs, reasoning and images. - [Coding agents](https://docs.serenityedge.ai/docs/coding-agents.md): Use OpenCode and Codex CLI with the Serenity Edge chat models. - [Decisions](https://docs.serenityedge.ai/docs/decisions.md): Typed, calibrated answers to typed questions with the Orion Compass and d3 decision models: POST /v1/decisions, in the format of OpenAI's Decisions API, and the Jev-compatible POST /v1/systemone. - [Embeddings, rerank and redaction](https://docs.serenityedge.ai/docs/embeddings-rerank-and-redaction.md): Vector embeddings with POST /v1/embeddings, reranking with POST /v1/rerank and personal-data redaction with POST /v1/redact: request and answer shapes, limits, billing and errors. - [Speech to text](https://docs.serenityedge.ai/docs/audio-transcriptions.md): Transcribe audio files with POST /v1/audio/transcriptions: request and answer formats, speakers and timestamps, languages, limits, billing per second and data handling. - [Errors and rate limits](https://docs.serenityedge.ai/docs/errors-and-rate-limits.md): HTTP status codes, the error object and how to handle HTTP 429 with Retry-After. ## Access - [Serenity Star account](https://docs.serenityedge.ai/docs/access/serenity-star-account.md): Create API keys and buy prepaid credits for Serenity Edge from a Serenity Star account. - [Routers and marketplaces](https://docs.serenityedge.ai/docs/access/channels.md): Use Serenity Edge as a provider through a router or marketplace, with that platform's own account, key and billing. - [Enterprise](https://docs.serenityedge.ai/docs/access/enterprise.md): Committed capacity, service level agreements and contractual terms for Serenity Edge. - [OpenRouter onboarding](https://docs.serenityedge.ai/docs/access/openrouter.md): Status of the Serenity Edge onboarding on OpenRouter: what is ready, what will work once it is live, and what to use meanwhile. ## Sandboxes (private preview) - [Sandboxes](https://docs.serenityedge.ai/docs/sandboxes/overview.md): Serenity Edge Sandboxes, isolated microVMs for AI agents in private preview, compatible with the E2B API and SDKs: what they are, how to get access, what they cost and what the preview covers. - [Sandboxes quickstart](https://docs.serenityedge.ai/docs/sandboxes/quickstart.md): Install the official E2B SDK, point it at Serenity Edge, create a sandbox, run a command, read its output, pause, resume and kill it, in Python, JavaScript and curl. - [Sandboxes API reference](https://docs.serenityedge.ai/docs/sandboxes/api-reference.md): The endpoints and create fields that Serenity Edge Sandboxes support, what differs from the E2B API, the public template, the sandbox lifecycle, timeouts, pause and resume, commands and ports. - [Save a sandbox as a template](https://docs.serenityedge.ai/docs/sandboxes/templates.md): Save a sandbox you have set up as a private template of your account and create sandboxes from it: the SDK calls, what a template holds, names, limits, prices, data lifetime and errors. - [Sandbox errors](https://docs.serenityedge.ai/docs/sandboxes/errors.md): Every HTTP status and edge_ error code of the Serenity Edge sandbox API, what each one means, and whether to retry. - [Sandbox limits and quotas](https://docs.serenityedge.ai/docs/sandboxes/limits-and-quotas.md): The limits of Serenity Edge Sandboxes in the private preview: 48 running sandboxes and 60 creates per minute per account, 8 control API requests in flight and 120 per minute per key, site capacity, sandbox size, a 24-hour maximum run, how long a paused sandbox is kept and when its data is deleted. - [Sandbox pricing and usage](https://docs.serenityedge.ai/docs/sandboxes/pricing-and-usage.md): Prices of Serenity Edge Sandboxes per vCPU-hour, per GiB-hour of memory and per GiB-month paused, billed per second since 12 November 2026: what is billed when, a worked example and how usage is recorded. - [Sandbox network access and security](https://docs.serenityedge.ai/docs/sandboxes/network-and-security.md): What a Serenity Edge sandbox can reach, who can reach it, how sandboxes are isolated, what browsers keep apart, and what Serenity Edge logs and does not log about them. ## API reference - [OpenAPI specification](https://docs.serenityedge.ai/api/openapi.json): OpenAPI 3.1 description of every endpoint, request and answer (JSON). - [Serenity Edge API](https://docs.serenityedge.ai/docs/api/edge/serenity-edge-api.md): Serenity Edge exposes an OpenAI-compatible API for chat completions, responses (the Responses API), embeddings and model discovery, a rerank API, a redaction API for personal data, speech to text (audio transcriptions) and, in preview, decisions: typed, calibrated answers to typed questions. Requests are authenticated with a bearer API key and served from Substrate AI's own GPUs in the European Union. Prompts and completions are never written to disk or logs; prompt prefixes may stay in a volatile memory cache for at most 24 hours. - [Create chat completion](https://docs.serenityedge.ai/docs/api/edge/create-chat-completion.md): Creates a model response for the given conversation. Set `stream: true` to receive the response as a stream of server-sent events. The last chunk before `data: [DONE]` carries the `usage` object on every stream, whether or not `stream_options.include_usage` is set. An error after the stream has started (the API commits a stream that the model has not answered within 2 seconds, and keeps it alive with `: ping` comment lines) arrives as a final `data:` event whose JSON has an `error` member, the usual error object, followed by `data: [DONE]`; see the [streaming guide](https://docs.serenityedge.ai/docs/streaming#errors-during-a-stream). - [Create a model response](https://docs.serenityedge.ai/docs/api/edge/create-response.md): OpenAI's Responses API (`client.responses.create` in the OpenAI SDKs) over the same chat models as `POST /v1/chat/completions`, with the same keys, prices and limits. - [Create decision](https://docs.serenityedge.ai/docs/api/edge/create-decision.md): **Preview.** Answers typed questions about an input with calibrated probabilities instead of generated text, in the format of OpenAI's Decisions API (`client.decisions.create` in OpenAI's Python SDK). Each question is a `predicate` (yes or no), a `choice` (one of several typed values) or a `score` (one of 2 to 10 ordered levels); the answers come back in question order. - [Create decision (Jev format)](https://docs.serenityedge.ai/docs/api/edge/create-system-one-decision.md): **Preview.** The same decision models in the System One format of TypeSafe Jev (`POST /v1/systemone`), for callers and tools migrating from Jev: `state` is any JSON value, `questions` is an object keyed by your own ids, and the question types are `noul` (yes or no), `choice` and `score`, with the options or levels in `criteria`. The answers come back under the same ids. Add `'calibration': 'raw'` to get uncalibrated probabilities. - [Create embeddings](https://docs.serenityedge.ai/docs/api/edge/create-embedding.md): Turns text into vectors, in the format of OpenAI's embeddings API (`client.embeddings.create` in the OpenAI SDKs). `qwen3-embedding-0.6b` (alias `qwen/qwen3-embedding-0.6b`) returns one vector of 1024 numbers per input, for at most 512 inputs per request. - [Rerank documents](https://docs.serenityedge.ai/docs/api/edge/rerank-documents.md): Scores how relevant each document is to a query, in the format of the rerank APIs of Cohere and Jina, with `qwen3-reranker-0.6b` (alias `qwen/qwen3-reranker-0.6b`). At most 1000 documents per request, a query of at most 4096 characters and about 300,000 tokens (the estimate below); the model reads each document with the query up to 8,192 tokens. - [Redact personal data](https://docs.serenityedge.ai/docs/api/edge/redact-text.md): Finds personal data in text (names, email addresses, phone numbers, postal addresses, account numbers and more) and masks it, in the privacy filter's own format, with `privacy-filter` (alias `openai/privacy-filter`). `model` is optional. At most 256 inputs and a body of 192 KiB (196,608 bytes) per request. The text sent is processed in memory only: it is never written to disk or logs and never used for training. - [Create transcription](https://docs.serenityedge.ai/docs/api/edge/create-transcription.md): Transcribes one audio file, in the format of OpenAI's speech-to-text API (`client.audio.transcriptions.create` in the OpenAI SDKs), with `vibevoice-asr` (alias `microsoft/vibevoice-asr`). The request is a `multipart/form-data` form with the file and the model. With `verbose_json`, the answer adds the duration and the segments, each with its start, end and speaker. More than 50 languages are detected automatically. At most 5 minutes of audio and a body of 16 MiB per request. Audio, transcripts and prompts are processed in memory only: they are never written to disk or logs and never used for training. - [List models](https://docs.serenityedge.ai/docs/api/edge/list-models.md): Lists the models the API serves, as a catalogue document in the OpenRouter provider schema 2.4: one entry per model id with its name, context length, maximum output, prices per token (decimal strings in US dollars), streaming support and supported parameters. The `id` of each entry is the value to send as `model` in a chat completion. No API key is needed, and the endpoint answers cross-origin requests from browsers, which is how the tables on [Models](https://docs.serenityedge.ai/docs/models) and [Pricing and limits](https://docs.serenityedge.ai/docs/pricing-and-limits) are filled. - [Read usage records](https://docs.serenityedge.ai/docs/api/edge/get-usage.md): Returns the usage records of the API key that makes the call, page by page, in the order they were written. Today the answer has one block, `sandboxes`: the usage records of the [Sandboxes](https://docs.serenityedge.ai/docs/sandboxes/overview/) created with this key, the records your sandbox invoice is computed from. Inference has no usage records to read: the `usage` object of each response is what is billed. ## Release notes - [Release 2026.11.19](https://docs.serenityedge.ai/release-notes/2026-11-19.md): Breaking changes - [Release 2026.11.18](https://docs.serenityedge.ai/release-notes/2026-11-18.md): Legal - [Release 2026.11.17](https://docs.serenityedge.ai/release-notes/2026-11-17.md): API changes - [Release 2026.11.14](https://docs.serenityedge.ai/release-notes/2026-11-14.md): API changes - [Release 2026.11.12](https://docs.serenityedge.ai/release-notes/2026-11-12.md): Sandboxes - [Release 2026.11.06](https://docs.serenityedge.ai/release-notes/2026-11-06.md): Website - [Release 2026.11.05](https://docs.serenityedge.ai/release-notes/2026-11-05.md): API changes - [Release 2026.10.30](https://docs.serenityedge.ai/release-notes/2026-10-30.md): API changes - [Release 2026.10.29](https://docs.serenityedge.ai/release-notes/2026-10-29.md): API changes - [Release 2026.10.28](https://docs.serenityedge.ai/release-notes/2026-10-28.md): API changes - [Release 2026.10.27](https://docs.serenityedge.ai/release-notes/2026-10-27.md): API changes - [Release 2026.10.14](https://docs.serenityedge.ai/release-notes/2026-10-14.md): API changes - [Release 2026.10.13](https://docs.serenityedge.ai/release-notes/2026-10-13.md): API changes - [Release 2026.09.22](https://docs.serenityedge.ai/release-notes/2026-09-22.md): First publication of the Serenity Edge documentation. ## Optional - [Acceptable Use Policy](https://docs.serenityedge.ai/terms/acceptable-use.md) - [Legal document changelog](https://docs.serenityedge.ai/terms/changelog.md) - [Cookie Policy](https://docs.serenityedge.ai/terms/cookie-policy.md) - [Data Processing Agreement](https://docs.serenityedge.ai/terms/data-processing-agreement.md) - [Legal notice](https://docs.serenityedge.ai/terms/legal-notice.md) - [Privacy Policy](https://docs.serenityedge.ai/terms/privacy-policy.md) - [Sub-processors](https://docs.serenityedge.ai/terms/sub-processors.md) - [Terms of Service](https://docs.serenityedge.ai/terms/terms-of-service.md)