Pay-as-you-go pricing for API usage
New users in the Singapore region get a free quota to try models at no cost. Other regions have no free quota. See Free quota for details.
Prices differ by region and by service deployment scope, and so do the models available. The Model pricing reference lists unit prices in one tab per region: select the tab for the region whose endpoint you call. See Regions and endpoints. 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. Available in Singapore and China North 2 (Beijing). 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
Output is billed per second of generated video. Some models also charge for input video by the second; models without a listed input video price do not charge for input.
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.
- Reference-to-video, video editing, and Wan 3.0 video generation models also bill input video by the second at the same rate as output. This includes:
wan3.0-video,wan3.0-video-prime,wan2.7-r2vseries,wan2.6-r2vseries,wan2.7-videoedit, andhappyhorse-1.0-video-edit. Exception:wan2.1-vace-plusis a video editing model but does not charge for input. - Text-to-video, image-to-video, and other models without input video billing incur no input charge.
- 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
- Input fee: $0.10 × 3 = $0.30
- Output fee: $0.10 × 5 = $0.50
- Total: $0.80
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 (Batch is available in Singapore and China North 2 (Beijing)).
Built-in tools
Some built-in tools incur per-call fees in addition to model token costs. Tool fees differ by region. Prices are per 1,000 calls.
| Tool | Singapore | China North 2 (Beijing) | Germany (Frankfurt) | China (Hong Kong) | Japan (Tokyo) | US (Virginia) |
|---|---|---|---|---|---|---|
| Web Search | $10 | $0.573411 | $0.573411 | $0.573411 | $0.573411 | $0.573411 |
| Web Extractor | Free (limited time) | Free (limited time) | Free (limited time) | Free (limited time) | Free (limited time) | Free (limited time) |
| Code Interpreter | Free (limited time) | Free (limited time) | Free (limited time) | Free (limited time) | Free (limited time) | Free (limited time) |
| Image Search | $8 | $6.881 | - | - | - | - |
Save on costs
- Batch API — 50% off for async workloads (Singapore and China North 2 (Beijing)). Learn more →
- Context caching — Reuse long prompts at reduced cost. Learn more →
- Model selection — Match model tier to task complexity. Compare models →
Learn more
- Model pricing — Unit prices by region
- Regions and endpoints — Regions, service deployment scopes, and Base URLs
- Free quota — Eligibility and activation
- Cost optimization — Advanced strategies
- Token Plan — Credits-based pricing for AI coding tools
- Billing FAQ — Common questions
- Bill management — View usage and invoices