Skip to main content

DeepInfra

DeepInfra is available on the Spanway gateway through the deepinfra/ model prefix. You register a DeepInfra model once in the gateway's config.yaml (or through the Admin UI), and every application then calls it through the gateway's OpenAI-compatible API with a Spanway virtual key. The provider credential stays on the gateway, and every request is authenticated, rate limited, logged and costed in the same way as any other provider.

The gateway translates requests and responses for DeepInfra natively, so provider specific parameters and errors are mapped to the OpenAI format for you.

Supported endpoints​

The gateway's endpoint support matrix lists the following endpoints for DeepInfra. Each link explains the request shape and the gateway features that apply to that endpoint.

Model types​

The bundled price map lists 134 DeepInfra models across these modes: Chat. The mode decides which gateway endpoint a model is meant for, and it is also used by the gateway's health checks to send the right kind of test request.

Environment variables​

The DeepInfra integration reads the following environment variables. Variables marked as required are the ones the gateway's environment validation checks for this provider. You can also pass any of these values directly in spanway_params (for example api_key or api_base), and the per-model value wins over the environment.

VariableRequiredPurpose
DEEPINFRA_API_KEYYesCredential the gateway sends to the provider
DEEPINFRA_API_BASENoOverrides the provider base URL

Reference a variable from config.yaml with the os.environ/ prefix so that the secret never appears in the file itself. Secrets can also come from a secret manager, see secret managers.

Register a model on the gateway​

Add an entry to model_list in config.yaml. The model_name is the public name your applications send, and spanway_params.model tells the gateway which provider and upstream model to call.

model_list:
- model_name: Kimi-K3
spanway_params:
model: deepinfra/moonshotai/Kimi-K3
api_key: os.environ/DEEPINFRA_API_KEY

Start the gateway with this file:

export DEEPINFRA_API_KEY="..."
spanway --config config.yaml
Private preview

Spanway is in private preview. The container images and Helm charts will be published soon. To request access, write to sales@spanway.ai, and preview customers receive download instructions in their onboarding pack.

To add the model without a restart, call POST /model/new with the same model_name and spanway_params, or use the Models + Endpoints page in the Admin UI. See model management for details.

Call the model through the gateway​

Send requests to the gateway's /v1/chat/completions endpoint with a virtual key. The gateway maps the public model name to the DeepInfra deployment, translates the request, and returns the response in the OpenAI format.

curl -X POST http://localhost:4000/v1/chat/completions \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Kimi-K3",
"messages": [{"role": "user", "content": "Summarize what an AI gateway does in two sentences."}]
}'

The same request works from any OpenAI SDK by setting the base URL to http://localhost:4000 and the API key to a Spanway virtual key. Create keys with POST /key/generate as described in virtual keys.

Models and pricing​

The table lists every DeepInfra model in the gateway's bundled price map. Prices are shown in US dollars per 1 million tokens, computed from the per-token values the gateway uses for spend tracking. Context window sizes are the provider limits recorded in the same file. Capabilities are the supports_* flags set for each model.

info

Prices come from the price map bundled with this Spanway build. They are used to calculate the spend recorded for each request, key, team and user. Your negotiated rates may differ, and you can override them per deployment with custom pricing.

Model (model value)ModeMax input tokensMax output tokensInput per 1M tokensOutput per 1M tokensOther pricingCapabilities
deepinfra/allenai/olmOCR-7B-0725-FP8Chat16,38416,384$0.27$1.50
deepinfra/anthropic/claude-3-7-sonnet-latestChat200,000200,000$3.30$16.50tools
deepinfra/anthropic/claude-4-opusChat200,000200,000$16.50$82.50tools
deepinfra/anthropic/claude-4-sonnetChat200,000200,000$3.30$16.50tools
deepinfra/anthropic/claude-fable-5Chat1,000,000$10.00$50.00tools, vision, reasoning, structured output
deepinfra/anthropic/claude-haiku-4-5Chat200,000$1.00$5.00tools, vision, reasoning, structured output
deepinfra/anthropic/claude-opus-4-7Chat1,000,000$5.00$25.00tools, vision, reasoning, structured output
deepinfra/anthropic/claude-opus-4-8Chat1,000,000$5.00$25.00tools, vision, reasoning, structured output
deepinfra/anthropic/claude-opus-5Chat1,000,000$5.00$25.00tools, vision, reasoning, structured output
deepinfra/anthropic/claude-sonnet-4-6Chat1,000,000$3.00$15.00tools, vision, reasoning, structured output
deepinfra/anthropic/claude-sonnet-5Chat1,000,000$2.00$10.00tools, vision, reasoning, structured output
deepinfra/ByteDance/Seed-1.8Chat256,000$0.25$2.00tools, vision, reasoning, prompt caching, structured output
deepinfra/ByteDance/Seed-2.0-codeChat256,000$0.5$3.00tools, vision, reasoning, prompt caching, structured output
deepinfra/ByteDance/Seed-2.0-miniChat256,000$0.1$0.4tools, vision, reasoning, prompt caching, structured output
deepinfra/ByteDance/Seed-2.0-proChat256,000$0.5$3.00tools, vision, reasoning, prompt caching, structured output
deepinfra/deepseek-ai/DeepSeek-R1Chat163,840163,840$0.7$2.40tools
deepinfra/deepseek-ai/DeepSeek-R1-0528Chat163,840163,840$0.5$2.15tools
deepinfra/deepseek-ai/DeepSeek-R1-0528-TurboChat32,76832,768$1.00$3.00tools
deepinfra/deepseek-ai/DeepSeek-R1-Distill-Llama-70BChat131,072131,072$0.2$0.6
deepinfra/deepseek-ai/DeepSeek-R1-Distill-Qwen-32BChat131,072131,072$0.27$0.27tools
deepinfra/deepseek-ai/DeepSeek-R1-TurboChat40,96040,960$1.00$3.00tools
deepinfra/deepseek-ai/DeepSeek-V3Chat163,840163,840$0.32$0.89tools
deepinfra/deepseek-ai/DeepSeek-V3-0324Chat163,840163,840$0.24$0.9tools, prompt caching
deepinfra/deepseek-ai/DeepSeek-V3.1Chat163,840163,840$0.25$0.95tools, reasoning
deepinfra/deepseek-ai/DeepSeek-V3.1-TerminusChat163,840163,840$0.27$1.00tools
deepinfra/deepseek-ai/DeepSeek-V3.2Chat163,840$0.26$0.38tools, prompt caching, structured output
deepinfra/deepseek-ai/DeepSeek-V4-FlashChat1,048,576$0.09$0.18tools, reasoning, prompt caching, structured output
deepinfra/deepseek-ai/DeepSeek-V4-Flash-0731Chat1,048,576$0.08$0.18tools, reasoning, prompt caching, structured output
deepinfra/deepseek-ai/DeepSeek-V4-ProChat1,048,576$1.30$2.60tools, prompt caching, structured output
deepinfra/deepseek-ai/DeepSeek-V4-Pro-0813Chat1,048,576$1.30$2.60tools, prompt caching, structured output
deepinfra/google/gemini-2.5-flashChat1,000,0001,000,000$0.3$2.50tools, vision, reasoning, structured output, audio in
deepinfra/google/gemini-2.5-proChat1,000,0001,000,000$1.25$10.00tools, vision, reasoning, structured output, audio in
deepinfra/google/gemini-3.1-flash-liteChat1,000,000$0.25$1.50tools, vision, reasoning, structured output, audio in
deepinfra/google/gemini-3.1-proChat1,000,000$2.00$12.00tools, vision, reasoning, structured output, audio in
deepinfra/google/gemini-3.5-flashChat1,000,000$1.50$9.00tools, vision, reasoning, structured output, audio in
deepinfra/google/gemini-3.7-flashChat1,000,000$0.75$3.75tools, vision, reasoning, structured output, audio in
deepinfra/google/gemma-3-4b-itChat131,072131,072$0.05$0.1tools
deepinfra/google/gemma-3-12b-itChat131,072131,072$0.05$0.15tools
deepinfra/google/gemma-3-27b-itChat131,072131,072$0.08$0.16tools
deepinfra/google/gemma-4-26B-A4B-itChat262,144$0.07$0.34tools, vision, reasoning, structured output
deepinfra/google/gemma-4-31B-itChat262,144$0.13$0.38tools, vision, reasoning, structured output
deepinfra/google/gemma-4-31B-it-turboChat262,144$0.09$0.34tools, vision, reasoning, prompt caching
deepinfra/google/gemma-4-31B-it-UltraChat131,072$0.27$0.76tools, vision, reasoning, structured output
deepinfra/google/gemma-4-E4B-itChat131,072$0.02$0.1tools, reasoning
deepinfra/Gryphe/MythoMax-L2-13bChat4,0964,096$0.4$0.4tools
deepinfra/inclusionAI/Ling-3.0-flashChat131,072$0.06$0.18tools, reasoning, prompt caching, structured output
deepinfra/meta-llama/Llama-3.2-3B-InstructChat131,072131,072$0.02$0.02tools
deepinfra/meta-llama/Llama-3.2-11B-Vision-InstructChat131,072131,072$0.049$0.049
deepinfra/meta-llama/Llama-3.3-70B-InstructChat131,072131,072$0.23$0.4tools
deepinfra/meta-llama/Llama-3.3-70B-Instruct-TurboChat131,072131,072$0.1$0.32tools
deepinfra/meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8Chat1,048,5761,048,576$0.2$0.8tools
deepinfra/meta-llama/Llama-4-Scout-17B-16E-InstructChat327,680327,680$0.1$0.3tools
deepinfra/meta-llama/Llama-Guard-3-8BChat131,072131,072$0.055$0.055
deepinfra/meta-llama/Llama-Guard-4-12BChat163,840163,840$0.18$0.18
deepinfra/meta-llama/Meta-Llama-3-8B-InstructChat8,1928,192$0.03$0.06tools
deepinfra/meta-llama/Meta-Llama-3.1-8B-InstructChat131,072131,072$0.03$0.05tools
deepinfra/meta-llama/Meta-Llama-3.1-8B-Instruct-TurboChat131,072131,072$0.02$0.04tools
deepinfra/meta-llama/Meta-Llama-3.1-70B-InstructChat131,072131,072$0.4$0.4tools
deepinfra/meta-llama/Meta-Llama-3.1-70B-Instruct-TurboChat131,072131,072$0.4$0.4tools
deepinfra/meta-models/Muse-Glimmer-30BChat131,072$0.3$1.20tools, vision, reasoning, prompt caching, structured output
deepinfra/microsoft/phi-4Chat16,38416,384$0.07$0.14tools
deepinfra/microsoft/WizardLM-2-8x22BChat65,53665,536$0.48$0.48
deepinfra/MiniMaxAI/MiniMax-M2.7Chat196,608$0.25$1.00tools, reasoning, prompt caching, structured output
deepinfra/MiniMaxAI/MiniMax-M2.7-TurboChat196,608$0.38$1.70tools, reasoning, prompt caching, structured output
deepinfra/MiniMaxAI/MiniMax-M3Chat524,288$0.28$1.10tools, vision, reasoning, prompt caching, structured output
deepinfra/mistralai/Mistral-Nemo-Instruct-2407Chat131,072131,072$0.019$0.03tools
deepinfra/mistralai/Mistral-Small-3.2-24B-Instruct-2506Chat128,000128,000$0.075$0.2tools
deepinfra/mistralai/Mistral-Small-24B-Instruct-2501Chat32,76832,768$0.05$0.08tools
deepinfra/mistralai/Mixtral-8x7B-Instruct-v0.1Chat32,76832,768$0.4$0.4tools
deepinfra/moonshotai/Kimi-K2-InstructChat131,072131,072$0.5$2.00tools
deepinfra/moonshotai/Kimi-K2-Instruct-0905Chat262,144262,144$0.5$2.00tools
deepinfra/moonshotai/Kimi-K2.5Chat262,144$0.45$2.25tools, vision, reasoning, prompt caching, structured output
deepinfra/moonshotai/Kimi-K2.6Chat262,144$0.75$3.50tools, vision, reasoning, prompt caching, structured output
deepinfra/moonshotai/Kimi-K2.7-CodeChat262,144$0.68$3.40tools, vision, reasoning, prompt caching, structured output
deepinfra/moonshotai/Kimi-K3Chat1,048,576$2.85$14.25tools, vision, prompt caching, structured output
deepinfra/NousResearch/Hermes-3-Llama-3.1-70BChat131,072131,072$0.7$0.7
deepinfra/NousResearch/Hermes-3-Llama-3.1-405BChat131,072131,072$1.00$1.00tools
deepinfra/nvidia/Llama-3.1-Nemotron-70B-InstructChat131,072131,072$0.6$0.6tools
deepinfra/nvidia/Llama-3.3-Nemotron-Super-49B-v1.5Chat131,072131,072$0.1$0.4tools
deepinfra/nvidia/Nemotron-3-Nano-30B-A3BChat262,144$0.05$0.2tools, reasoning, prompt caching
deepinfra/nvidia/Nemotron-Content-Safety-3.5Chat131,072$0.2$0.2vision
deepinfra/nvidia/NVIDIA-Nemotron-3-Super-120B-A12BChat262,144$0.085$0.4tools, reasoning, structured output
deepinfra/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55BChat262,144$0.5$2.20tools, vision, reasoning, prompt caching, structured output
deepinfra/nvidia/NVIDIA-Nemotron-3.5-LightningChat262,144$0.08$0.2tools, reasoning, prompt caching
deepinfra/nvidia/NVIDIA-Nemotron-Nano-9B-v2Chat131,072131,072$0.04$0.16tools
deepinfra/openai/gpt-oss-20bChat131,072131,072$0.03$0.14tools
deepinfra/openai/gpt-oss-120bChat131,072131,072$0.037$0.17tools
deepinfra/openai/gpt-oss-120b-TurboChat131,072$0.15$0.6tools, reasoning, structured output
deepinfra/openai/gpt-oss-120b-UltraChat131,072$0.2$0.95tools, reasoning, structured output
deepinfra/Qwen/Qwen2.5-7B-InstructChat32,76832,768$0.04$0.1
deepinfra/Qwen/Qwen2.5-72B-InstructChat32,76832,768$0.36$0.4tools
deepinfra/Qwen/Qwen2.5-VL-32B-InstructChat128,000128,000$0.2$0.6tools, vision
deepinfra/Qwen/Qwen3-14BChat40,96040,960$0.12$0.24tools
deepinfra/Qwen/Qwen3-30B-A3BChat40,96040,960$0.12$0.5tools
deepinfra/Qwen/Qwen3-32BChat40,96040,960$0.08$0.28tools
deepinfra/Qwen/Qwen3-235B-A22BChat40,96040,960$0.18$0.54tools
deepinfra/Qwen/Qwen3-235B-A22B-Instruct-2507Chat262,144262,144$0.09$0.55tools
deepinfra/Qwen/Qwen3-235B-A22B-Thinking-2507Chat262,144262,144$0.3$2.90tools
deepinfra/Qwen/Qwen3-Coder-480B-A35B-InstructChat262,144262,144$0.4$1.60tools
deepinfra/Qwen/Qwen3-Coder-480B-A35B-Instruct-TurboChat262,144262,144$0.3$1.00tools, prompt caching
deepinfra/Qwen/Qwen3-MaxChat256,000$1.20$6.00tools, prompt caching, structured output
deepinfra/Qwen/Qwen3-Max-ThinkingChat256,000$1.20$6.00tools, prompt caching, structured output
deepinfra/Qwen/Qwen3-Next-80B-A3B-InstructChat262,144262,144$0.09$1.10tools
deepinfra/Qwen/Qwen3-Next-80B-A3B-ThinkingChat262,144262,144$0.14$1.40tools
deepinfra/Qwen/Qwen3-VL-30B-A3B-InstructChat262,144$0.15$0.6tools, vision, structured output
deepinfra/Qwen/Qwen3-VL-235B-A22B-InstructChat262,144$0.2$0.88tools, vision, prompt caching, structured output
deepinfra/Qwen/Qwen3.5-9BChat262,144$0.1$0.15tools, vision, structured output
deepinfra/Qwen/Qwen3.5-27BChat262,144$0.26$2.60tools, vision, reasoning, structured output
deepinfra/Qwen/Qwen3.5-35B-A3BChat262,144$0.14$1.00tools, vision, reasoning, prompt caching, structured output
deepinfra/Qwen/Qwen3.5-122B-A10BChat262,144$0.29$2.40tools, vision, reasoning, structured output
deepinfra/Qwen/Qwen3.5-397B-A17BChat262,144$0.45$3.00tools, vision, reasoning, prompt caching, structured output
deepinfra/Qwen/Qwen3.6-27BChat262,144$0.32$3.20tools, vision, reasoning, structured output
deepinfra/Qwen/Qwen3.6-35B-A3BChat262,144$0.1$0.95tools, vision, reasoning, structured output
deepinfra/Qwen/Qwen3.7-MaxChat256,000$2.50$7.50tools, prompt caching, structured output
deepinfra/Qwen/Qwen3.8-2.4T-A95BChat262,144$2.00$6.00tools, reasoning, prompt caching, structured output
deepinfra/Qwen/Qwen3.8-27BChat262,144$0.4$3.00tools, vision, reasoning, prompt caching, structured output
deepinfra/Qwen/Qwen3.8-MaxChat256,000$1.65$4.95tools, prompt caching, structured output
deepinfra/Qwen/QwQ-32BChat131,072131,072$0.15$0.4tools
deepinfra/Sao10K/L3-8B-Lunaris-v1-TurboChat8,1928,192$0.04$0.05
deepinfra/Sao10K/L3.1-70B-Euryale-v2.2Chat131,072131,072$0.85$0.85
deepinfra/Sao10K/L3.3-70B-Euryale-v2.3Chat131,072131,072$0.65$0.75
deepinfra/stepfun-ai/Step-3.7-FlashChat262,144$0.2$1.15tools, vision, prompt caching
deepinfra/tencent/Hy3Chat262,144$0.14$0.58tools, reasoning, prompt caching, structured output
deepinfra/thinkingmachines/InklingChat524,288$0.95$4.05tools, vision, reasoning, prompt caching, structured output
deepinfra/thinkingmachines/Inkling-SmallChat524,288$0.45$1.20tools, vision, reasoning, prompt caching, structured output
deepinfra/XiaomiMiMo/MiMo-V2.5Chat262,144$0.4$2.00tools, vision, reasoning, prompt caching, structured output
deepinfra/XiaomiMiMo/MiMo-V2.5-ProChat1,048,576$1.00$3.00tools, reasoning, prompt caching, structured output
deepinfra/zai-org/GLM-4.5Chat131,072131,072$0.4$1.60tools
deepinfra/zai-org/GLM-4.6Chat202,752$0.5$2.00tools, reasoning, prompt caching, structured output
deepinfra/zai-org/GLM-4.7Chat202,752$0.4$1.75tools, reasoning, prompt caching, structured output
deepinfra/zai-org/GLM-4.7-FlashChat202,752$0.06$0.4tools, reasoning, prompt caching, structured output
deepinfra/zai-org/GLM-5Chat202,752$0.6$2.08tools, reasoning, prompt caching, structured output
deepinfra/zai-org/GLM-5.1Chat202,752$1.05$3.50tools, reasoning, prompt caching, structured output
deepinfra/zai-org/GLM-5.2Chat1,048,576$0.75$2.40tools, reasoning, prompt caching, structured output