Inference APIs

Frequently asked questions

Short, specific answers about this API: compatibility, model ids, billing, limits, streaming, audio formats, data handling and migration. Each question also has its own page you can link to.

Is the API OpenAI-compatible?

Yes. POST /v1/chat/completions, /v1/audio/speech, /v1/audio/transcriptions and GET /v1/models use the OpenAI request and response shapes, including streaming (stream: true), tools, tool_choice, response_format and usage. The official OpenAI SDKs work by setting base_url to https://api.inferenceapis.com/v1. /openai/v1/… is accepted as well, so Groq-style base URLs need only the host changed. The Responses API (/v1/responses) and embeddings are not yet supported.

Which model ids are accepted?

Each model has a canonical id (for example openai/gpt-oss-120b) plus aliases that other providers use for the same weights, such as gpt-oss-120b, llama-3.3-70b-versatile (Groq), whisper-1 (OpenAI) and kokoro. GET /v1/models lists every accepted id with its canonical field. Unknown ids return 404 model_not_found.

How is usage billed?

Per request, from a prepaid balance. Chat models bill prompt plus completion tokens at the model's per-1M rate (reasoning tokens count as completion tokens). Text-to-speech bills per input character. Transcription bills per minute of audio, measured from the uploaded file before processing. Every request is logged with its units and cost; there is no per-request fee, subscription or minimum.

Are there rate limits or daily caps?

There are no free-tier daily caps and no tiers to unlock. Usage is limited by your balance: when it reaches zero, requests return 402 insufficient_balance until you add credits. A per-key burst limit exists to protect the service and is well above interactive use; if you need sustained high concurrency, tell us and we will raise it.

Why is the reply empty on GPT-OSS, DeepSeek or GLM?

They are reasoning models: they think before they answer, and the thinking consumes max_tokens. If the budget is small (say 20–50 tokens) it is spent entirely on reasoning and content comes back empty while the reasoning field is populated. Set max_tokens to a few hundred or more. usage.completion_tokens_details.reasoning_tokens shows how many tokens went to reasoning.

Does streaming include token usage?

Yes. With stream: true the final chunk before data: [DONE] carries a usage object with prompt and completion token counts, so you can meter streamed responses without counting tokens yourself.

What audio formats can I upload for transcription?

mp3, mp4, m4a, wav, webm, ogg and flac, up to 100 MB per request. Duration is read with ffprobe for billing. For very long recordings, splitting into chunks of 20–30 minutes keeps latency predictable; transcription runs at roughly 0.04–0.05× real time (a 20-minute file in under a minute).

Which text-to-speech formats and voices are available?

Output is mp3 (default), wav or raw PCM. Kokoro 82M has 54 voices across eight languages (ids like af_heart, bm_george, jf_alpha); Orpheus has eight expressive English voices. GET /v1/voices?model=hexgrad/Kokoro-82M returns the list.

Do you store my prompts or audio?

No. Requests are proxied to the inference backend and the response is returned; prompt text, audio uploads and generated audio are not retained. What is stored per request is metering data: model id, unit counts (tokens, characters or minutes), cost and timestamp.

Where do the models run?

Chat, speech and transcription models run on Together AI's serverless GPU fleet in the United States, behind our gateway (authentication, metering, aliasing, error normalisation). OmniParser runs on our own hardware. If you need a specific region, contact us.

How do I handle errors?

Errors use the OpenAI envelope {"error": {"message", "type", "code"}}. 401 missing or invalid key · 402 insufficient_balance · 404 model_not_found · 400 wrong_endpoint (for example a speech model sent to chat) · 413 input too large · 503 model_unavailable (model being enabled) · 502 upstream error. Retry 502 and 503 with backoff; the others are deterministic.

Can I use tool calling and JSON mode?

Yes, on GPT-OSS 120B, DeepSeek V4 / V4.1 Flash, GLM 5.3 Flash and Llama 3.3 70B. Pass tools in the OpenAI format and read tool_calls from the response; pass response_format: {"type": "json_object"} for JSON mode. Streamed tool calls arrive as delta.tool_calls fragments.

How do I migrate from Groq?

Change the base URL from https://api.groq.com/openai/v1 to https://api.inferenceapis.com/v1 (or keep /openai/v1 — both work) and swap the key. Model ids Groq used, including retired ones such as llama-3.3-70b-versatile, are accepted as aliases. openai/gpt-oss-120b is served under the same id.

Is there a free trial?

Every new account starts with free credit that covers testing each model. There is no time limit on it. When it is used, add credits on the Billing page; there is no minimum top-up beyond what the payment processor requires.

Not answered here? See the API documentation, the provider error reference, or ask us.