DeepInfra pricing guide
DeepInfra pricing, spending limits, and usage tracking
DeepInfra bills language models per token while charging for most other models based on inference execution time, with no long-term contracts or upfront setup fees. Base rates range from $0.02 per million input tokens on Meta-Llama-3.1-8B-Instruct-Turbo up to $25.00 per million output tokens on claude-opus-5, alongside dedicated GPU instances starting at $1.49 per GPU-hour.
You only pay for what you consume, drawing down a pre-paid balance or paying once at the start of the next month if your account is invoiced. Because accounts default to 200 concurrent requests without automatic budget caps, setting a spending limit in the dashboard is the primary way to stop a runaway script from draining your card.
How DeepInfra charges: tokens versus execution time
DeepInfra splits its catalog into two primary billing categories. Some language models are billed per token, while most other models are billed for inference execution time. There are no upfront commitments, so you can test endpoints without paying platform fees.
Every token in your API request counts toward your bill. When you send a request, the input token count covers everything inside the prompt payload:
- System instructions
- Conversation history
- Context chunks retrieved from a RAG pipeline
- Function definitions, tool arguments, or structured JSON
Output pricing applies to whatever the model returns, including generated text, code, or structured JSON tool calls.
Some models support prompt caching for byte-identical text segments that DeepInfra hashes and reuses across calls. When cache hits occur, you pay a lower cached-input rate. The formula for completion cost with cached inputs is:
((T_in - T_cache) P_in + T_cache P_cache + T_out * P_out) / 10^6
Here, T_in is total input tokens, T_cache is cached input tokens, T_out is generated output tokens, and the prices (P_in, P_cache, P_out) are calculated per million tokens. If you are comparing this structure to aggregators or direct providers, see our guides on What does OpenRouter charge on top of model prices? and What does the DeepSeek API cost?.
Responses from DeepInfra's OpenAI-compatible completions endpoint (https://api.deepinfra.com/v1/openai) return a usage object. That object exposes prompt_tokens, completion_tokens, total_tokens, estimated_cost, and a prompt_tokens_details structure that contains cached_tokens. That means your application can inspect estimated_cost directly in the response payload after every call.
Per-token rates for language and multimodal models
Token pricing varies widely depending on the architecture, context size, and whether the model is proprietary or open-weights.
The table below outlines context windows, input rates, cached rates where supported, and output rates across popular models hosted on DeepInfra. All token rates are listed per one million tokens.
| Model | Context Window | Input / 1M Tokens | Cached Input / 1M Tokens | Output / 1M Tokens |
|---|---|---|---|---|
| Meta-Llama-3.1-8B-Instruct-Turbo | 128k | $0.02 | None | $0.04 |
| phi-4 | 16k | $0.07 | None | $0.14 |
| Mistral-Small-3.2-24B-Instruct-2506 | 125k | $0.075 | None | $0.20 |
| Qwen3-32B | 40k | $0.08 | None | $0.28 |
| gemma-3-27b-it | 128k | $0.08 | None | $0.16 |
| DeepSeek-V4-Flash | 1024k | $0.09 | $0.018 | $0.18 |
| Llama-4-Scout-17B-16E | 320k | $0.10 | None | $0.30 |
| Llama-3.3-70B-Instruct-Turbo | 128k | $0.10 | None | $0.32 |
| GLM-5.3-Flash | 1024k | $0.15 | $0.03 | $0.50 |
| DeepSeek-V3.2 | 160k | $0.26 | $0.13 | $0.38 |
| gemini-2.5-flash | 976k | $0.30 | None | $2.50 |
| Qwen3.5-397B-A17B | 256k | $0.45 | $0.22 | $3.00 |
| DeepSeek-R1-0528 | 160k | $0.50 | $0.35 | $2.15 |
| Kimi-K2.6 | 256k | $0.75 | $0.15 | $3.50 |
| gemini-2.5-pro | 976k | $1.25 | None | $10.00 |
| DeepSeek-V4-Pro | 1024k | $1.30 | $0.10 | $2.60 |
| Kimi-K3 | 1024k | $2.85 | $0.285 | $14.25 |
| claude-sonnet-5 | 976k | $3.00 | None | $15.00 |
| claude-opus-5 | 976k | $5.00 | None | $25.00 |
Outside text generation, DeepInfra charges fixed rates for embeddings, audio, and image generation:
- Embeddings models cost either $0.005 per 1M input tokens (such as bge-base-en-v1.5 and all-MiniLM-L6-v2) or $0.01 per 1M input tokens (such as bge-m3 and bge-large-en-v1.5).
- Speech and audio processing are priced by input duration. Nemotron-3.5-ASR-Streaming-Multilingual-0.6b runs at $0.00020 per minute of audio. Voxtral-Mini-3B-2507 runs at $0.00100 per minute, while Voxtral-Small-24B-2507 costs $0.00300 per minute.
- Image generation models charge per image. FLUX-2-pro costs $0.015 per image, FLUX-1.1-pro costs $0.04 per image, and FLUX-2-max costs $0.07 per image.
Service tiers: Standard, Priority, and Flex
DeepInfra provides three scheduling tiers that adjust how inference traffic is routed during high load. These tiers change the base token price:
- Standard: The default tier. It uses best-effort scheduling during peak demand and charges 1x the base price.
- Priority: Schedules requests ahead of standard traffic to reduce time-to-first-token during peak volume. This tier is billed at 1.5x the base price. You can enable it per request by passing
service_tier: "priority", though model availability varies. - Flex: Built for background or non-production jobs that do not need immediate responses. It runs at 0.8x the base price, but trades off responsiveness with slower completions and occasional unavailability.
If you run background batch workflows where latency is secondary, Flex cuts 20% off your token bill. If your app serves real-time user interfaces, Standard is the default, while Priority is an option if queue times spike.
Dedicated GPU instances for custom LLMs
If you want to host custom LLMs instead of shared endpoints, DeepInfra offers dedicated GPU hardware.
These dedicated instances are billed in minute granularity and invoiced weekly:
- A100 (80GB): $1.49 / GPU-hour
- H100 (80GB): $2.90 / GPU-hour
- H200 (141GB): $3.49 / GPU-hour
- B200 (180GB): $4.89 / GPU-hour
- B300 (270GB): $5.89 / GPU-hour
If your project requires dedicated instances or large DGX H100, B200, and B300 clusters running across 3.2Tbps bandwidth, you cannot deploy them solely through self-serve provisioning; you must contact dedicated@deepinfra.com directly.
Setting a spending limit and billing rules
To use DeepInfra, you must add a payment card or pre-pay funds into your balance. Pre-paid accounts draw down their balance in real time as requests complete. Invoiced accounts accumulate charges throughout the calendar month and are billed once at the start of the following month.
By default, every account has a concurrency limit of 200 requests. If you exceed 200 simultaneous calls, additional requests are throttled unless you drop them a line to ask for an increase.
However, a concurrency ceiling is not a budget stop. If an automated script or looping worker sends 150 concurrent requests continuously all weekend, your card will be charged for all generated tokens.
DeepInfra allows you to configure a spending limit directly inside your account dashboard. Setting this value creates a hard stop that blocks further billed activity once your month-to-date expenditure hits the threshold. Because this protection exists natively in the dashboard, setting it immediately after creating an account is the most reliable way to prevent accidental bills.
Tracking month-to-date usage via the billing API
You do not need to rely solely on the web UI to monitor how much you have spent. DeepInfra exposes an HTTP billing endpoint that returns exact itemized usage and costs for any given timeframe.
Endpoint and authentication
To query your billing numbers, send an authenticated GET request to:
GET https://api.deepinfra.com/payment/usage
The endpoint requires a standard header: Authorization: Bearer
If you authenticate using an API key rather than an active browser session token, that API key must have the billing:read scope. Keys without this scope cannot access payment data.
Query parameters
The endpoint supports two query parameters to define the billing window:
from(required): The start of the period. AcceptsYYYY.MM,current(-N), or a UTC Unix timestamp in seconds.to(optional): The end of the period, accepting the same formats. If omitted, the API returns data for the single month specified infrom.
For example, to fetch current usage for the current calendar month:
curl --request GET \
--url "https://api.deepinfra.com/payment/usage?from=current" \
--header "Authorization: Bearer $DEEPINFRA_TOKEN"Parsing the response
The endpoint returns a JSON payload containing an initial_month string and a months array. Inside months, each object represents a billing window with properties including period, interval, invoice_id, total_cost, and an items array.
Within items, DeepInfra details each individual workload:
model: Name of the model deployed or queriedunits: Total volume of usage consumedrate: Unit price appliedcost: Total calculated spend for that itempricing_type: How the model is billedinterval: Measurement windowdiscount: Any applied discount credits
When checking ongoing charges mid-month, invoice_id will display "NOT_FINAL", indicating that the period remains active.
Monitoring DeepInfra with Costbrake
If you run multiple infrastructure providers alongside DeepInfra, managing individual dashboard limits becomes tedious. Costbrake watches what you spend across cloud, AI, and SaaS platforms, alerting you before small leaks become painful invoices.
Costbrake tracks your DeepInfra spend by querying the /payment/usage endpoint using an API key scoped strictly to billing:read. That read-only key cannot query models or run completions, keeping your production workloads isolated. Stored credentials are encrypted with AES-256-GCM. Because DeepInfra's spending limit can only be set in its own web dashboard, Costbrake does not offer brakes for DeepInfra accounts, so set a spending limit there as a hard stop. Instead, it tracks the rise in cost between checks and alerts you through external channels.
Spend checks run hourly on the Free plan, every 5 minutes on Pro and Team, and every 2 minutes if an active spike occurs. Costbrake alerts you when:
- An hour costs more than 3x the 7-day baseline and at least $5 more than usual (spike alert).
- Month-to-date spend reaches 50%, 80%, or 100% of your configured budget.
- Current spend plus the 72-hour run rate is projected to cross your budget before month-end (forecast alert).
- A new service appears on your bill above $1.
Alerts route to email on the Free plan ($0 for 2 connections, 3 budgets, and 30 days of history). The Pro plan costs $12 a month ($120 a year) and adds 10 connections, 5-minute checks, Slack, Discord, signed webhooks, and reversible brakes for supported providers. The Team plan is $39 a month ($390 a year) for 50 connections, PagerDuty, and REST API access. Every new workspace includes a 14-day Pro trial with no credit card required. To connect your account in minutes, see our agent setup guide or learn more about How do I monitor spend across OpenAI, Anthropic, Gemini and other AI APIs in one place?.
Questions and answers
Does DeepInfra have a hard spending limit?
Yes. DeepInfra allows you to configure a spending limit directly inside your account dashboard to stop further charges once reached.
How do I check my current month's usage on DeepInfra?
You can view your usage in the dashboard or call the billing API via GET https://api.deepinfra.com/payment/usage?from=current using an API token with the billing:read scope.
Can an API token read billing data by default?
No. Newly created API tokens on DeepInfra do not include billing permissions unless you explicitly assign the billing:read scope in the dashboard.
How does DeepInfra handle concurrency limits?
Accounts are limited to 200 concurrent requests by default. If your workload requires higher volume, you must contact DeepInfra support to request an increase.
What is the difference between Priority and Flex tiers?
Priority costs 1.5x the base token rate and prioritizes request routing for lower time-to-first-token during peak hours. Flex costs 0.8x the base rate but is subject to slower responses and occasional downtime.
Sources
Updated