AI Help
When should I use the Batch API for an AI workload?
Use Batch for supported asynchronous work that can wait for its documented completion window. Check model, endpoint and data-policy compatibility.
Steps to follow
- Separate tasks needing an immediate response from offline jobs such as evaluation or catalog processing.
- Check supported endpoints, model availability, input limits and current pricing. Give every input a unique custom_id.
- Track job state and reconcile successful and failed items after completion before retrying any work.
Example in practice
Illustrative example. An overnight classification job can use Batch, while a live support chat generally needs an interactive request path.
Related AI help
- How do I find the request ID for a failed AI API call?
- How do I run a long AI request in the background without keeping the connection open?