Skip to main content
Use dry run mode to estimate the cost of a request without executing it. This validates your request parameters and returns pricing information so you can make informed decisions before generating.

Making a dry run request

Add ?dryRun=true as a query parameter to any request (chat completions, image generation, or image editing):
Dry run mode works with chat completions, image generation, and image editing endpoints.

Response format

Dry run requests return a cost estimate instead of generated images:

Response fields

Cost components

Each component in the components array contains:

Converting micros to dollars

Costs are returned in micros (millionths of a dollar) for precision. To convert to dollars:
For example, 80000 micros equals $0.08.

Notes

Cost estimates are approximate. Effective pricing is calculated after the request runs, because final costs may depend on outputs (such as token counts or the number of images generated).
Dry run requests:
  • Validate your request parameters
  • Do not execute the request (no text generation or image creation)
  • Do not affect your account balance
  • Return quickly since no generation occurs