API reference
Chat Completions, Responses, Embeddings, and Models.
Four endpoints. One familiar client.
Use Responses for new text-generation integrations. Existing Chat Completions integrations can keep their message format. Both use the same organization key and prepaid balance.
https://www.cheapinference.dev/v1| Method | Path | Reference |
|---|---|---|
| POST | /responses | Text, reasoning, structured output, and client tools |
| POST | /chat/completions | Existing message-based integrations |
| POST | /embeddings | Text vectors for search and retrieval |
| GET | /models | Supported OpenAI model IDs |
Responses · Chat Completions · Embeddings · Download OpenAPI 3.1
Request contract
Send Authorization: Bearer YOUR_KEY on every inference request, including model listing. POST bodies must be JSON and no larger than 4 MB on the public domain. Console cookies and Google sign-in tokens are not inference API keys.
Use an ID from GET /models. Both gpt-5.4-mini and openai/gpt-5.4-mini are accepted; the prefix is removed before forwarding. Other providers are not supported. Sampling options are omitted upstream when you omit them; the model applies its own defaults.
Model-specific restrictions still apply. A model may reject temperature, a tool definition, output length, or a schema even when the endpoint supports that field generally.
The supported OpenAI subset
| Capability | Support |
|---|---|
| Responses and Chat Completions | Streaming and non-streaming |
| Text / image inputs / inline PDF inputs | On compatible OpenAI models |
| JSON mode and strict JSON Schema | response_format (Chat), text.format (Responses) |
| Reasoning | reasoning_effort (Chat), reasoning (Responses); encrypted item replay |
| Client tools | Function, custom, namespace, local shell, apply-patch; see tool guide |
| Predicted Outputs | Chat Completions; model-dependent |
| Text embeddings | Batch inputs, dimensions, float/base64 encoding |
| Stored conversations and provider files | Unsupported; send complete history and inline content |
| Hosted tools and media generation | Not enabled in this metered release |
| OpenRouter routing, plugins, BYOK, other providers | Outside this OpenAI-only API |
Responses, usage, and errors
Successful responses preserve OpenAI’s native JSON or SSE shape. The service does not add OpenRouter’s provider, usage.cost, or normalized finish-reason fields. Actual provider token usage drives credit settlement; your console contains the billed usage value.
x-request-id and x-relay-request-id identify the gateway request. x-upstream-request-id, when present, identifies the provider request. The OpenAI SDK’s request-ID helpers work with the standard header.
Read errors and limits and streaming before adding retries. A 200 status alone does not mean a streamed generation completed successfully.