Sync Batch
Force a sync with the provider to check for batch results. Useful when you do not want to wait for the hourly automatic poll.
Force an immediate check with the batch provider (Anthropic or Bedrock) for results. By default, batches are polled automatically every hour. Use this endpoint when you need results sooner or want to verify the current provider-side status.
Call sync when you need results before the next hourly poll. A typical pattern is to submit documents in batch mode, wait a few hours, then call sync to check if results are ready. If the batch is still processing, the response reflects the current provider-side status without changing anything.
The response returns the full batch object with updated counts. If results are ready, status transitions to completed and succeeded_count, errored_count, and expired_count are populated. If the batch is still processing on the provider side, status remains submitted and counts stay at zero.
Syncing an accumulating batch has no effect since it has not been submitted to the provider yet. Syncing a completed or cancelled batch is safe but returns the same data. Pair with GET /v1/batches/:id to inspect per-item results after the sync completes.
/v1/batches/:id/syncResponse
Response fields
Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "submitted",
"provider": "anthropic",
"item_count": 142,
"succeeded_count": 0,
"errored_count": 0,
"expired_count": 0,
"submitted_at": "2024-10-01T06:00:00.000Z",
"completed_at": null,
"error_message": null,
"created_at": "2024-10-01T05:45:00.000Z",
"updated_at": "2024-10-01T06:01:00.000Z",
"links": { "self": "/v1/batches/a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
}Errors
Error responses