Background mode
Run long requests asynchronously, then poll for the result instead of holding a connection open.
Background mode is for requests that take a long time, such as long reasoning or large outputs. You start the request, get an id back right away, and collect the result when it finishes, so a dropped connection or a timeout doesn't lose the work.
Start a background request
The request parameter that turns it on, which endpoints support it, and the response you get back.
Check its status
The states a request moves through, and how to poll for them.
Get the result
Where the finished response is, how long it is kept, and how failures are reported.
Cancel a request
How to cancel a request that hasn't finished.
Pricing
How background requests are priced against the live price, and how a max price applies while a request waits.
Limits
How long a request may run, and how many may be in flight at once.
How is this guide?