API Reference Overview

All REST endpoints that power the EmpirioLabs AI platform

The EmpirioLabs API speaks OpenAI- and Anthropic-compatible request shapes so any client that talks to those providers works against https://api.empiriolabs.ai unchanged. All requests require a bearer token (Authorization: Bearer $EMPIRIOLABS_API_KEY or the Anthropic-style x-api-key header).

Endpoints

MethodPathDescription
GET/v1/modelsCatalog of every model with pricing, parameter schema, capability flags, regions, and API status
GET/v1/models/{model_id}Details for a single model (use this as the canonical parameter schema for that model)
POST/v1/chat/completionsOpenAI-compatible chat completions (streaming + non-streaming)
POST/v1/responsesOpenAI Responses-compatible endpoint
POST/v1/messagesAnthropic Messages-compatible endpoint
POST/v1/embeddingsOpenAI-compatible embeddings
POST/v1/images/generationsImage generation; returns hosted URLs and optional b64_json
POST/v1/videos/generationsAsync video generation; returns a job_id plus a polling URL
POST/v1/audio/speechText-to-speech; returns hosted URLs and optional b64_json
POST/v1/audio/transcriptionsAudio/video transcription (whisper-1, deepgram-nova-3, etc.); async — returns a job_id
POST/v1/searchSearch and research endpoint for Exa, Tavily, Linkup, Perplexity Search
POST/v1/files/uploadMultipart upload of an audio, image, or video file (returns a bunny:// storage path the other endpoints accept)
GET/v1/jobs/{job_id}Poll the status / final result of any async generation or transcription job

Models as the source of truth

GET /v1/models is the canonical schema. Every model returns:

  • pricing_rows[] — per-token, per-image, per-second, or per-call rates with any cache or volume discounts applied.
  • supported_parameters[] — name + type + default + range for every parameter the model accepts (including conditional parameters that only apply when another flag is set).
  • capabilities — flags for streaming, system_prompt, tool_calling, vision, audio_input, video_input, web_search, thinking, citations, etc.
  • input_modalities / output_modalities — distinct lists so multimodal models that accept video as input but only emit text are not mistaken for video generators.
$curl "https://api.empiriolabs.ai/v1/models" \
> -H "Authorization: Bearer $EMPIRIOLABS_API_KEY"

Universal disable_formatting flag

Every chat, search, and media endpoint accepts a disable_formatting=true flag (also accepted as raw=true, passthrough=true, or raw_response=true). When set, the worker skips EmpirioLabs server-side formatting (Markdown “Thinking…” headers, citation list reformatting, code-block wrapping, etc.) and returns the upstream payload shape verbatim. Use this when:

  • You render responses yourself and want full control of the markdown.
  • You feed the response into a downstream pipeline that expects the raw upstream shape.
  • You are debugging why a response looks different in the playground vs your app.

Tool calling

Tool / function calling propagates straight through. Pass standard OpenAI tools[] and tool_choice on /v1/chat/completions; the response carries message.tool_calls[] and a downstream role: "tool" message round-trips correctly. Anthropic-style tool blocks work the same way on /v1/messages.

Long-running requests

The platform’s inbound HTTP timeout is 15 minutes (the maximum a Railway edge connection holds open). Anything that needs longer must use the asynchronous POST /v1/jobs/... family:

  • /v1/audio/transcriptions returns a job_id immediately.
  • /v1/images/generations and /v1/videos/generations always create a job (image jobs typically complete in seconds; video jobs in 1-15 minutes).
  • Poll GET /v1/jobs/{job_id} every 2-10 seconds. Job state is retained for up to 1 hour after completion.

If a synchronous chat completion needs more than ~14 minutes of compute (deep reasoning, multi-step research), set stream=true so partial output is returned as it arrives.

Generated media retention

All generated images, videos, audio, and stored transcript files live on the EmpirioLabs media CDN at https://media.empiriolabs.ai. URLs returned by the API are signed with a 7-day expiry. The underlying objects are deleted after 30 days. Save anything you need to keep — both at the URL level and the file level — within that window.

Errors

Errors come back in OpenAI’s shape ({"error": {"message", "type", "code"}}) on chat/responses endpoints, and Anthropic’s shape on /v1/messages. Errors never leak the upstream provider name, internal hostnames, or provider request IDs — those are stripped by the gateway and worker layers before the response reaches you.

How to use the generated reference

  • Open API Reference in the top navigation tab.
  • Inspect endpoint details, required fields, and example payloads.
  • Use the example responses to align your integration with the documented contract.
  • Use AI Agent Access when you want an AI coding assistant to read the docs through llms.txt or machine-readable API schemas.

If you’re onboarding a new integration, start with Getting Started for a quick walkthrough, then move into the generated reference for full request and response details.