Introduction
One API for chat, vision, speech and retrieval.
Larsa is an AI API provider: an OpenAI-compatible gateway in front of models we run on our own GPU hardware. There is no reseller in the path — the machine that answers your request is the machine this company owns.
One key and one base URL reach chat and reasoning, vision and OCR, speech to text (batch and realtime), text to speech, translation, embeddings, retrieval-grounded legal search over Iranian and Spanish/EU law, HTML-to-PDF rendering, a sandboxed Python interpreter, and tool-calling extensions — Skills, MCP servers and per-customer Knowledge Bases.
What you can build
Core
- [Chat & reasoning](/docs/chat) — chat completions with multi-turn conversation and system prompts, plus two retrieval-grounded models that answer only from indexed statute text: Iranian law and Spanish/EU (BOE) law.
- [Streaming](/docs/streaming) — the same endpoint, token by token, over server-sent events.
- Vision (/docs/vision) — images and documents in the same chat request, OCR included.
- Embeddings (/docs/embeddings) and translation (/docs/translation).
Audio
- Speech to text (/docs/speech-to-text) — batch transcription, and realtime transcription (/docs/realtime-transcription) over a live connection.
- Text to speech (/docs/text-to-speech) — Persian voiced by Aava, twenty-three other languages by Chatterbox.
Tools & agents
- [Function calling](/docs/function-calling), [file search](/docs/file-search) and [web search](/docs/web-search) as tools the model can call mid-conversation.
- A sandboxed [code interpreter](/docs/code-interpreter), reusable [Skills](/docs/skills), and [MCP servers](/docs/mcp) you register once and call by name — plus Knowledge Bases scoped to your organisation, managed from the console.
Output & platform
- [HTML to PDF](/docs/pdf) and [structured output](/docs/structured-output) for a response you can parse without a second pass.
- [Models](/docs/models), [rate limits](/docs/rate-limits), [errors](/docs/errors) and the [billing API](/docs/billing-api) — the reference pages every integration eventually needs.
The OpenAI-compatibility promise
Point an OpenAI client at our base URL, and it works: same request shape, same response shape, same bearer authentication, same server-sent-event framing when you stream. Nothing in your integration has to know it isn't talking to OpenAI.
Where it differs
- Unknown parameters are dropped, not rejected. A field your client sends that no backend model understands is silently ignored rather than causing a 400. That keeps a client written for a different provider from breaking here — it also means a misspelled parameter fails silently instead of loudly.
- Identical requests can be answered from a short cache. The gateway caches a response against its exact request body for up to ten minutes. Send the same body twice in that window and the second call can return the first call's completion verbatim, even at a temperature above zero. Change anything in the request if you need a fresh sample.
- `reasoning_effort` has one enforced value.
"none"turns internal reasoning off; other values are accepted but not guaranteed. See the chat reference for the measured difference. - A few endpoints have no OpenAI equivalent and extend past the spec under the same base URL and the same key:
/v1/pdf,/v1/tools,/v1/vector_stores,/v1/mcp/servers,/v1/skills. No official client library knows about these; reach them with plain HTTP.
Base URL
Every request goes to one host, under /v1, same as OpenAI's own SDKs expect:
https://api.console.larsa.larsima.com/v1Every request past this point needs an API key. Authentication covers headers, scoping and rotation.