For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportStatusTry now
DocumentationAPI Reference
DocumentationAPI Reference
    • API Overview
  • API Guides
    • Authentication
    • Concurrency & Rate Limits
    • Batch Processing
    • Webhooks
  • Generate API
    • POSTCreate Generation
    • POSTCreate Generation with Files
    • GETGet Generation
    • GETList Generations
    • POSTEstimate Cost
  • Batch API
    • POSTCreate Batch
    • GETGet Batch
    • GETList Batches
  • Assets API
    • GETList Assets
    • GETGet Asset
  • Models API
    • GETList Models
  • Webhooks Payload Reference
LogoLogo
SupportStatusTry now
Batch API

List Batches

GET
/v2/batch
GET
/v2/batch
$curl https://api.sync.so/v2/batch \
> -H "x-api-key: <apiKey>"
1[
2 {
3 "id": "batch_abc123",
4 "created_at": "2024-01-15T10:30:00Z",
5 "status": "COMPLETED",
6 "metrics": {
7 "total_generations": 5,
8 "success_count": 4,
9 "failed_count": 1,
10 "pending_count": 0
11 },
12 "outputUrl": "https://api.sync.so/v2/batches/batch_abc123/result",
13 "webhookUrl": "https://your-webhook-url.com/batch-webhook"
14 },
15 {
16 "id": "batch_def456",
17 "created_at": "2024-01-14T15:20:00Z",
18 "status": "PROCESSING",
19 "metrics": {
20 "total_generations": 10,
21 "success_count": 3,
22 "failed_count": 0,
23 "pending_count": 7
24 },
25 "outputUrl": "",
26 "webhookUrl": null
27 }
28]

List all batches for your organization with optional filtering by status and creation date. Results are ordered by creation date (newest first).

Was this page helpful?
Previous

List Assets

Next
Built with

Authentication

x-api-keystring
API Key authentication via header

Query parameters

statusenumOptional
Filter batches by status
Allowed values:
created_afterdatetimeOptional

Filter batches created after this datetime (ISO 8601 format)

created_beforedatetimeOptional

Filter batches created before this datetime (ISO 8601 format)

Response

This endpoint returns a list of objects.
idstring
A unique identifier for the batch.
created_atdatetime
The date and time the batch was created.
statusenum
The current status of the batch.
Allowed values:
metricsobject
Metrics about the batch processing progress.
outputUrlstring

The URL to download the batch results file (available when completed).

webhookUrlstring
The webhook URL for batch status notifications.

Errors

401
Unauthorized Error
500
Internal Server Error