batch_wait
Poll a batch job's status until it reaches a terminal state: completed, failed, stopped, or deleted. Use it to wait for results and detect API key credit cap failures.
Instructions
Poll batch_status until the job reaches a terminal state (completed, failed, stopped, or deleted). A run that hits an API key credit cap ends as failed with failure_reason api_key_cap_reached.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | Batch job id | |
| timeout_ms | No | Max wait time in ms (default 600000) |