Overview
One OpenAI-compatible API for text, image, video, speech, transcription and music.
OP Inference puts many models behind one API and one key. Text requests use the OpenAI chat completions format, so an OpenAI SDK works by changing its base URL. Media requests (image, video, speech, transcription and music) are jobs: you submit one, then poll it or get a webhook when it finishes.
Quickstart
Get a key and stream your first reply.
Media jobs
Submit a job, poll it, fetch the output.
Models
Every model, its inputs and its price.
API reference
Every endpoint, its request, its response and code samples.
What the API promises
These are rules the gateway enforces on every request, not settings you have to remember.
- You get the model you asked for. If an endpoint fails, the request may move to another
endpoint serving the same model. It never moves to a different model unless you list one in
models. - No switch after the first token. A request can fail over only before any content reaches you. Once the reply has started, a failure ends the stream with an error frame instead of splicing in another endpoint's answer. See Streaming.
- An empty reply is a failure. A
200that carries no output is treated as an error and can fail over. - Retention is per request. Every request runs under a retention class:
zdr,shortorstandard. A request can make its class stricter than your key's, never looser, and the class is enforced everywhere the request is stored or logged. See Data retention. - One key for every modality. Text, image, video, speech, transcription and music share one key, one balance and one bill.
Base URL
https://api.opinference.com/v1All requests authenticate with Authorization: Bearer <key>. See
Authentication and API keys.