Documentation

Tokenlane documentation: quickstart, guides and API reference for chat, embeddings, audio, rerank and OCR through one OpenRouter-compatible API in the EU.

Guides

  • Quickstart: From a new account to the first answer: unlock the organization, add credit, choose a model, create a key and send a request. The only guide with the complete request; the others link here.
  • Move from OpenRouter: Point an existing OpenRouter integration at Tokenlane: two values change, a few behaviors differ.
  • Authentication: Which key does what, how to protect, limit and replace it, and what its failures mean.
  • Organizations and workspaces: How Tokenlane groups people, credit and keys: the organization holds members and money, workspaces separate projects.
  • Text and chat: Send a conversation and get an answer: roles, parameters, limits, costs and errors of the chat endpoint.
  • Image understanding: Ask a vision model about one or more images: formats, limits, costs and errors.
  • PDFs and files: Ask a model about a document, natively or through OCR: formats, limits, costs and errors.
  • Audio transcription: Turn recorded speech into text: formats, limits, costs and errors of the transcription endpoint.
  • Embeddings: Turn text into vectors for search, retrieval and clustering: request format, limits, costs and errors.
  • Rerank: Order candidate documents by relevance to a query: request format, limits, costs and errors.
  • Streaming: Receive generated output incrementally with Server-Sent Events.
  • Tool calling: Let a model request a function that your application executes deliberately.
  • Structured outputs: Request a predictable JSON shape for results your application will process.
  • Reasoning: Control how much a model thinks with the same options on every provider.
  • Routing and fallbacks: Choose among eligible routes without weakening organization, workspace or key restrictions.
  • Privacy and compliance: Apply data requirements to the actual provider route, not only to the model's name.
  • Observability with Langfuse: Send every generation to your Langfuse project as a trace, with model, tokens, costs in USD, user, session and metadata, without your own mapping.
  • PDF parser: The settings of the file-parser plugin, which extracts text from inline or securely downloaded PDFs before inference.
  • JSON healing: Repair common JSON syntax problems without mistaking repair for schema validation.
  • PII redaction: Replace detected personal information before a request reaches an inference route.
  • OCR: Extract document text through a routed OCR model, independently of chat inference.
  • Direct PII redaction: Detect and mask personal information with a normal routed PII model.
  • Errors and retries: Diagnose a failure before deciding whether another request is appropriate.
  • Retry requests safely with idempotency: Keep one operation key across network retries to recover the same completed answer without another provider call or charge.
  • Costs and limits: Plan in EUR, bound each request and distinguish missing usage from zero cost.

API reference: Tokenlane API

API reference: Tokenlane Management API