Batch results are JSONL with per-request result.type: succeeded, errored, or expired. Each result includes custom_id for identification.
Selective Retry
With 1,000 requests: 940 succeeded, 45 errored, 15 expired. Selective resubmission of just 60 failures saves 94% versus resubmitting all 1,000.
Error Types Need Different Fixes
| Type | Count | Fix |
|---|---|---|
| Context exceeded | 40 | Chunk oversized documents |
| Invalid input | 5 | Correct malformed requests |
| Expired | 15 | Resubmit as-is (transient) |
Blind retry without fixing root causes produces the same errors. Chunk the oversized documents before resubmitting. Fix the malformed inputs. Only transient failures (expired) can be retried as-is.
The Process
- Parse JSONL results
- Filter by
result.type(errored/expired) - Match by
custom_idto original requests - Categorize error types
- Apply targeted fixes per category
- Resubmit only the fixed failures as a new batch
One-liner: Parse batch results by status, match failures by custom_id, fix root causes per error type (chunk oversized, fix malformed, retry expired), and resubmit only the failures — not the whole batch.