A batch ended with some results marked expired. Which handling is correct?
Why A is the answer
Resubmit those requests in a new batch
Expired requests did not complete, and they are not billed. Rerun only those, using custom_id to find them. The 29 days is how long results stay downloadable, not extra processing time.
In detail
- Expired requests did not complete, and they are not billed.
- Rerun only those, using custom_id to find them.
- Alert if many requests expire, because it may point to the batch size or timing.
Use case
An illustrative scenario, not a real incident.
A batch ends with 30 expired requests. The job finds them by custom_id and submits a new batch of just those 30, and it pays nothing for the expired ones.
See it in different ways
sequenceDiagram participant J as Your job participant B as Batches API J->>B: Requests, each with a custom_id B-->>J: Results, in any order J->>J: Match each result on custom_id J->>B: Resubmit errored and expired ones
flowchart LR S0["Batch ended"] --> S1["Find expired by custom_id"] --> S2["New batch of those requests"] --> S3["Merge results"]
Key point: Expired requests are not billed, so rerun only those.
Why the other options are wrong
- B. Pay for them and read the partial text
- There is no partial text to read, and expired requests are not billed.
- C. Wait, because they finish within 29 days
- They will not finish later. The 29 days is the download window.
- D. Treat the whole batch as failed and rerun it
- Rerunning everything pays again for work that succeeded.

