# DeepInfra — Provider Research (Phase 0) Researched 2026-07-30 against official docs (https://docs.deepinfra.com — note: `deepinfra.com/docs/*` now 308-redirects there) and a live authenticated `GET /v1/openai/models` probe (`/tmp/zyquo-probe/deepinfra.json`, 174 models, mixed modalities). Each entry embeds `metadata.context_length`, `metadata.max_tokens`, and `metadata.pricing` (USD per 1M tokens) — authoritative for existence, context, and pricing. --- ## 1. Base URL & Endpoints - **OpenAI-compatible base URL:** `https://api.deepinfra.com/v1/openai` (what Zyquo Cloud uses) - `POST /v1/openai/chat/completions` - `POST /v1/openai/completions` - `GET /v1/openai/models` - `POST /v1/openai/embeddings` (out of scope) - **Native inference endpoints** also exist (`https://api.deepinfra.com/v1/inference/{model}`) with per-model schemas — documented for completeness only; Zyquo Cloud uses the OpenAI-compatible surface exclusively. Reference: https://docs.deepinfra.com/chat/overview ## 2. Authentication `Authorization: Bearer ` — standard Bearer. Confirmed by docs and live probe. ## 3. Chat Model Catalog (curated main chat models) Notable: DeepInfra proxies **Anthropic Claude** and **Google Gemini** models under its own billing — useful as a single-key fallback. Pricing/context below are from the live probe (`metadata`), USD per 1M tokens. `metadata.max_tokens` equals `context_length` for every chat entry (listing does not expose a distinct max-output figure — treat real max output as unverified per model). Caps legend: **V** vision, **T** tools, **R** reasoning, **J** JSON mode. All stream. Flags marked * inferred from model family, not individually verified on DeepInfra. ### Proxied frontier models | Model ID (exact) | Context | $ In | $ Out | $ Cached | Caps | |---|---|---|---|---|---| | `anthropic/claude-fable-5` | 1,000,000 | 10.00 | 50.00 | — | V* T R J* | | `anthropic/claude-opus-5` | 1,000,000 | 5.00 | 25.00 | — | V* T R J* | | `anthropic/claude-opus-4-8` | 1,000,000 | 5.00 | 25.00 | — | V* T R J* | | `anthropic/claude-opus-4-7` | 1,000,000 | 5.00 | 25.00 | — | V* T R J* | | `anthropic/claude-sonnet-5` | 1,000,000 | 2.00 | 10.00 | — | V* T R J* | | `anthropic/claude-sonnet-4-6` | 1,000,000 | 3.00 | 15.00 | — | V* T R J* | | `anthropic/claude-haiku-4-5` | 200,000 | 1.00 | 5.00 | — | V* T R J* | | `google/gemini-3.1-pro` | 1,000,000 | 2.00 | 12.00 | — | V* T R J* | | `google/gemini-3.5-flash` | 1,000,000 | 1.50 | 9.00 | — | V* T R J* | | `google/gemini-3.1-flash-lite` | 1,000,000 | 0.25 | 1.50 | — | V* T J* | | `google/gemini-2.5-pro` | 1,000,000 | 1.25 | 10.00 | — | V* T R J* | | `google/gemini-2.5-flash` | 1,000,000 | 0.30 | 2.50 | — | V* T R J* | ### Open-weight chat models | Model ID (exact) | Context | $ In | $ Out | $ Cached | Caps | |---|---|---|---|---|---| | `deepseek-ai/DeepSeek-V4-Pro` | 1,048,576 | 1.30 | 2.60 | 0.10 | T J R* | | `deepseek-ai/DeepSeek-V4-Flash` | 1,048,576 | 0.09 | 0.18 | 0.018 | T* J* | | `deepseek-ai/DeepSeek-V3.2` | 163,840 | 0.26 | 0.38 | 0.13 | T* J* R* | | `deepseek-ai/DeepSeek-V3.1-Terminus` | 163,840 | 0.27 | 0.95 | 0.13 | T* J* R (hybrid) | | `deepseek-ai/DeepSeek-V3.1` | 163,840 | 0.25 | 0.95 | 0.13 | T* J* R (hybrid) | | `deepseek-ai/DeepSeek-V3-0324` | 163,840 | 0.24 | 0.90 | 0.135 | T* J* | | `deepseek-ai/DeepSeek-R1-0528` | 163,840 | 0.50 | 2.15 | 0.35 | R | | `moonshotai/Kimi-K2.7-Code` | 262,144 | 0.74 | 3.50 | 0.15 | T J R* | | `moonshotai/Kimi-K2.6` | 262,144 | 0.75 | 3.50 | 0.15 | T J R* | | `moonshotai/Kimi-K2.5` | 262,144 | 0.45 | 2.25 | 0.07 | T J | | `zai-org/GLM-5.2` | 1,048,576 | 0.75 | 2.40 | 0.14 | T J R* | | `zai-org/GLM-5.1` | 202,752 | 1.05 | 3.50 | 0.205 | T* J* R* | | `zai-org/GLM-5` | 202,752 | 0.60 | 2.08 | 0.12 | T* J* R* | | `zai-org/GLM-4.7` | 202,752 | 0.40 | 1.75 | 0.08 | T* J* R* | | `zai-org/GLM-4.7-Flash` | 202,752 | 0.06 | 0.40 | 0.01 | T* J* R* | | `zai-org/GLM-4.6` | 202,752 | 0.50 | 2.00 | 0.10 | T* J* R* | | `Qwen/Qwen3.7-Max` | 256,000 | 2.50 | 7.50 | 0.50 | T* J* R* | | `Qwen/Qwen3.6-35B-A3B` | 262,144 | 0.10 | 0.95 | — | T* J* | | `Qwen/Qwen3.6-27B` | 262,144 | 0.32 | 3.20 | — | T* J* | | `Qwen/Qwen3.5-397B-A17B` | 262,144 | 0.45 | 3.00 | 0.22 | T* J* R* | | `Qwen/Qwen3.5-122B-A10B` | 262,144 | 0.29 | 2.40 | — | T* J* R* | | `Qwen/Qwen3.5-35B-A3B` | 262,144 | 0.14 | 1.00 | 0.05 | T* J* | | `Qwen/Qwen3.5-9B` | 262,144 | 0.10 | 0.15 | — | T* J* | | `Qwen/Qwen3-Max` | 256,000 | 1.20 | 6.00 | 0.24 | T* J* | | `Qwen/Qwen3-Max-Thinking` | 256,000 | 1.20 | 6.00 | 0.24 | R T* J* | | `Qwen/Qwen3-235B-A22B-Instruct-2507` | 262,144 | 0.09 | 0.55 | — | T* J* | | `Qwen/Qwen3-235B-A22B-Thinking-2507` | 262,144 | 0.23 | 2.30 | 0.20 | R T* J* | | `Qwen/Qwen3-Next-80B-A3B-Instruct` | 262,144 | 0.09 | 1.10 | — | T* J* | | `Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo` | 262,144 | 0.30 | 1.00 | 0.10 | T J | | `Qwen/Qwen3-VL-235B-A22B-Instruct` | 262,144 | 0.20 | 0.88 | 0.11 | V T* J* | | `Qwen/Qwen3-VL-30B-A3B-Instruct` | 262,144 | 0.15 | 0.60 | — | V T* J* | | `meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8` | 1,048,576 | 0.20 | 0.80 | — | V T J | | `meta-llama/Llama-4-Scout-17B-16E-Instruct` | 327,680 | 0.10 | 0.30 | — | V T J | | `meta-llama/Llama-3.3-70B-Instruct-Turbo` | 131,072 | 0.10 | 0.32 | — | T J | | `meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo` | 131,072 | 0.02 | 0.04 | — | T J | | `openai/gpt-oss-120b` | 131,072 | 0.037 | 0.17 | — | R T J (`reasoning_effort`) | | `openai/gpt-oss-120b-Turbo` | 131,072 | 0.15 | 0.60 | — | R T J | | `openai/gpt-oss-20b` | 131,072 | 0.03 | 0.14 | — | R T J | | `MiniMaxAI/MiniMax-M3` | 524,288 | 0.30 | 1.20 | 0.06 | T* J* R* | | `MiniMaxAI/MiniMax-M2.7` | 196,608 | 0.25 | 1.00 | 0.05 | T* J* R* | | `nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B` | 262,144 | 0.50 | 2.20 | 0.10 | T* J* R* | | `nvidia/NVIDIA-Nemotron-3-Super-120B-A12B` | 262,144 | 0.085 | 0.40 | — | T* J* R* | | `nvidia/Nemotron-3-Nano-30B-A3B` | 262,144 | 0.05 | 0.20 | 0.025 | R* | | `ByteDance/Seed-2.0-pro` | 256,000 | 0.50 | 3.00 | 0.10 | T* J* R* (unverified caps) | | `ByteDance/Seed-2.0-mini` | 256,000 | 0.10 | 0.40 | 0.02 | T* J* (unverified caps) | | `XiaomiMiMo/MiMo-V2.5` | 262,144 | 0.40 | 2.00 | 0.08 | R* (unverified caps) | | `XiaomiMiMo/MiMo-V2.5-Pro` | 1,048,576 | 1.00 | 3.00 | 0.20 | R* (unverified caps) | | `mistralai/Mistral-Small-3.2-24B-Instruct-2506` | 128,000 | 0.075 | 0.20 | — | V T* J* | | `mistralai/Mistral-Nemo-Instruct-2407` | 131,072 | 0.019 | 0.03 | — | — | | `google/gemma-4-31B-it` | 262,144 | 0.13 | 0.38 | — | V* T* J* | | `google/gemma-3-27b-it` | 131,072 | 0.08 | 0.16 | — | V* | | `tencent/Hy3` | 262,144 | 0.14 | 0.58 | 0.035 | (unverified caps) | | `stepfun-ai/Step-3.7-Flash` | 262,144 | 0.20 | 1.15 | 0.04 | (unverified caps) | | `thinkingmachines/Inkling` | 524,288 | 1.00 | 4.05 | 0.17 | T* J* R* | | `microsoft/phi-4` | 16,384 | 0.07 | 0.14 | — | — | Also present (skip or list under "more"): Hermes-3 405B/70B, Llama-Guard-4 (moderation), MythoMax, Sao10K roleplay models, gemma-4 turbo/ultra variants, `deepcogito`, `Qwen3-32B/30B-A3B/14B`, etc. ## 4. Request/Response Format **OpenAI-compatible.** Point any OpenAI SDK at `base_url=https://api.deepinfra.com/v1/openai`. Standard `choices[].message`, `usage`, `finish_reason`. Docs caveat: "We may not be 100% compatible with all OpenAI parameters" — unknown params are generally ignored. DeepInfra also has native per-model inference endpoints (`/v1/inference/{model}`) with different schemas — **not used by Zyquo Cloud**. Supported params include: `model`, `messages`, `max_tokens`, `temperature` (0–2), `top_p`, `stop`, `n`, `presence_penalty`, `frequency_penalty`, `stream`, `response_format` (JSON mode), `tools`/`tool_choice`, `reasoning_effort` (reasoning models). Reasoning models return chain-of-thought as `message.reasoning_content` (DeepSeek convention; verify per model in Phase 7 — unverified field name for non-DeepSeek models). ## 5. Streaming (https://docs.deepinfra.com/chat/streaming) - `stream: true` → OpenAI-style SSE: `data: {chunk}` lines with `choices[].delta.content`, final `data: [DONE]`. - **Usage is included automatically in the final chunk before `[DONE]`** (when `finish_reason` is populated; token counts match non-streaming). No `stream_options.include_usage` needed (parameter not documented; sending it is harmless). - On completion the delta becomes `{}` and `finish_reason` is set. ## 6. Special Parameters - `service_tier`: `"priority"` (faster TTFT/throughput, +50% price) or `"flex"` (−20% price, may queue up to ~10 min). Default tier if omitted. - `fail_fast: true` — reject immediately with HTTP 429 (`"engine_overloaded"` code) instead of queueing when capacity is exceeded; rejected requests are not billed. - Response continuation pattern: to continue a truncated answer, resend with the truncated assistant message appended (documented technique, not a parameter). - `reasoning_effort` supported on reasoning-capable models (gpt-oss etc.). - Prompt caching: automatic on supported models; discounted `cached_input_tokens` pricing appears in the model metadata (no request parameter required — unverified whether a cache-control knob exists). ## 7. Rate Limits & Errors (https://deepinfra.com/docs/advanced/rate-limits) - **200 concurrent requests per account** (the primary limit; no published RPM/TPM). Increases via Dashboard → Account request. - Exceeding it → HTTP 429 "Rate limited"; capacity overload with `fail_fast` → 429 `"engine_overloaded"`. - Errors are OpenAI-shaped JSON; branch on HTTP status (400/401/404/429/5xx). Retry with backoff on 429/5xx. ## 8. `/models` Listing `GET https://api.deepinfra.com/v1/openai/models` returns OpenAI shape `{"object":"list","data":[...]}` — but each model carries a rich non-standard `metadata` object: ```json { "id": "deepseek-ai/DeepSeek-V4-Pro", "object": "model", "owned_by": "deepinfra", "metadata": { "description": "...", "context_length": 1048576, "max_tokens": 1048576, "pricing": { "input_tokens": 1.3, "output_tokens": 2.6, "cached_input_tokens": 0.1 } } } ``` Ideal for dynamic refresh: filter entries where `metadata.context_length` and `pricing.output_tokens` are non-null (text-gen models); image/video/TTS/ASR entries have null context/pricing fields. No capability flags (vision/tools) — keep those in the built-in catalog.