AI Gateway pricing
AI Gateway bills model token usage in USD. Each plan includes a monthly usage allowance, separate from Data Extraction and other DWS products.
Plans and current prices
See the AI Gateway pricing page for current plan prices, monthly included usage, and pay-as-you-go rates. Use the dashboard pricing page(opens in a new tab) for your account’s available plans, billing settings, and current token rates.
Annual prices cover a year of billing; the included usage is monthly. Prices and account-specific rates can differ. Check the live pricing page before purchasing.
Token rates
Each model has separate USD rates per million input, cached input, and output tokens. See the dashboard pricing page(opens in a new tab) for current rates, or call GET /models with a live key for the rates available to your organization, including decision models. A test key reports zero rates, so it cannot provide a production cost estimate.
Estimate a request
For a request without cache writes or long-context adjustments, add these charges:
- Uncached input tokens × input rate ÷ 1,000,000.
- Cached input tokens × cached-input rate ÷ 1,000,000.
- Output tokens × output rate ÷ 1,000,000.
Cached input is part of total input; subtract it before calculating the uncached-input charge. Where a model reports cache-write usage and rates, account for that category separately. Actual charges use reported token usage. Model-specific long-context pricing can change the estimate.
Pay-as-you-go and quota
Requests draw on your monthly included usage first. When pay-as-you-go is enabled and available for your account, usage beyond the allowance is charged to the shared DWS wallet at your plan’s pay-as-you-go price per $1 of usage. Configure billing and spending controls in the dashboard. Without remaining included usage or authorized pay-as-you-go capacity, requests can return 402 insufficient_quota.
Test keys and streaming
Test keys do not consume your included usage. They are not a production tier.
Streaming requests also consume tokens. Disconnecting a client does not guarantee that generation or billing stops.
Next steps
- Errors and limits — Handle quota and rate-limit failures.