Pay-as-you-go pricing for API usage
New users get a free quota to try models at no cost. See Free quota for details.
For featured model pricing and discounts, visit the Pricing page. For the full catalog, see the Model Marketplace.
Text generation
Billed per million tokens. Input and output are priced separately.
Tiered pricing: Some models use tiered pricing — the rate depends on the total input tokens in a single request. All tokens in that request are billed at the matched tier.
Tiered pricing example
Tiered pricing example
Suppose a model has two tiers: 0 < tokens ≤ 32K and 32K < tokens ≤ 128K. If a single request contains 100K input tokens, it falls in the second tier (32K < 100K ≤ 128K), so ALL tokens are billed at the second-tier rate — not the first 32K at tier 1 and the remaining 68K at tier 2.
- Batch API — Input and output token rates are 50% of real-time pricing. Learn more →
- Context caching — Cached input tokens receive a discount; the exact discount varies by model. Learn more →
- Thinking mode — Thinking tokens count as output tokens and are billed at the output rate. Learn more →
- Batch and cache discounts cannot be combined on the same request.
Image generation
Billed per input image and per successfully generated output image. Models that don't specify an input image price charge output only.
Billing formula:
- Some models tier output pricing by output image resolution.
- Text-to-image has no input images, so no input charge applies.
- Failed requests are not charged.
Image generation billing example
Image generation billing example
Suppose a model bills input and output images separately: $0.003/image for input, and output is tiered by resolution — $0.03/image at 1k, $0.075/image at 2k.Example 1: Image-to-image, 1k output, 1 image generated
- Input fee: $0.003 × 1 = $0.003
- Output fee: $0.03 × 1 = $0.03
- Total: $0.033
- Output fee: $0.075 × 2 = $0.15
- Total: $0.15
Video generation
Input is not charged. Output is billed per second of generated video.
Billing formula:
- Some models price by output resolution (e.g., 720P vs 1080P).
- Some models price by output mode (e.g., standard vs professional).
- Some models price by aspect ratio (e.g., 1:1 vs 3:4).
- Some models use a flat rate regardless of resolution, mode, or aspect ratio.
- Failed requests are not charged.
Video generation billing example
Video generation billing example
Suppose a model charges $0.10/sec at 720P. You generate a 5-second video:
- Fee: $0.10 × 5 = $0.50
- Fee: $0.15 × 5 = $0.75
Text to speech
Billed per 10,000 input characters. Output is not charged.
Character counting rules:
- One Chinese character (simplified, traditional, Japanese kanji, Korean hanja) counts as 2 characters.
- All other characters (letters, digits, punctuation, spaces, Japanese kana, Korean letters) count as 1 character.
- When using SSML, only the text content is counted — SSML tags are excluded.
Speech to text
Billed per second of audio input. Output is not charged. Applies to both real-time recognition and audio file transcription.
Speech to speech
Speech-to-speech models (Qwen-Omni series) handle text, audio, and image/video in a single call. Billed per million tokens, with different rates per modality.
Multi-turn billing: Like text models, the model maintains full conversation context. Historical turns are billed as input in subsequent rounds, so input token counts grow with each turn.
Token conversion rates vary by model. See Token counting → for details.
Embedding & reranking
Billed per million input tokens. Output is not charged.
Factors that affect billing: Models that support Batch API are billed at 50% of real-time input pricing.
Built-in tools
Some built-in tools incur per-call fees in addition to model token costs.
| Tool | Fee | Notes |
|---|---|---|
| Web Search | $10 / 1K calls | |
| Web Extractor | FREE | Limited time |
| Code Interpreter | FREE | Limited time |
| Image Search | $8 / 1K calls | Text-to-image and image-to-image |
Save on costs
- Batch API — 50% off for async workloads. Learn more →
- Context caching — Reuse long prompts at reduced cost. Learn more →
- Model selection — Match model tier to task complexity. Compare models →
Learn more
- Free quota — Eligibility and activation
- Cost optimization — Advanced strategies
- Token Plan — Credits-based pricing for AI coding tools
- Coding Plan — Fixed monthly pricing for AI coding tools
- Billing FAQ — Common questions
- Bill management — View usage and invoices