Skip to main content
POST
Create batch async tasks
Submit up to 500 async tasks in a single HTTP request instead of one API call per task. Each task accepts the same fields as a single async task: taskType, payload, and optionally priority, idempotencyKey, and webhook.
  • Partial success: each task is validated independently, so one invalid task does not block the others.
  • Per-task results: the response includes a results array with success or failure details for each task, preserving the original input order by index.
  • Per-task webhook delivery: each task fires its own webhook as soon as it completes — you don’t wait for the full batch. Webhooks arrive in completion order, not submission order.
For submitting a single task, see the async requests guide.

Request constraints

The queue capacity check is all-or-nothing and runs before any task is processed: if the batch would exceed your queue limit, every task is rejected with a 429. If the body is not a valid JSON array or is empty, you get a 422 Unprocessable Entity instead, also before any task-level processing.

Per-task error codes

When a task fails validation within a batch, its result includes one of these error codes:

Example usage

Submit a batch of tasks

Response with partial success

Use cases

Bulk monitoring across providers

Send the same prompt to several providers to compare responses:

Scheduled batch jobs

Process a recurring list of queries in one request:

Handling partial failures

Check results and retry only the failed tasks:

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Required array length: 1 - 500 elements
taskType
enum<string>
required

The AI provider to use for this task.

Available options:
AIMODE,
GOOGLE,
GOOGLE_NEWS,
GEMINI,
CHATGPT,
COPILOT,
PERPLEXITY,
GROK
Example:

"CHATGPT"

payload
object
required

Provider-specific request payload. Must include at least prompt (or query for Google Search).

Example:
priority
integer
default:1

Task priority level (1-10). Higher numbers are processed first. Defaults to 1.

Required range: 1 <= x <= 10
Example:

5

idempotencyKey
string

Unique string to prevent duplicate task creation. Must be unique across your account.

Example:

"batch-chatgpt-001"

webhook
object

Webhook configuration for task completion notification.

Response

Batch processed. Check the summary and individual results for per-task success or failure.

success
boolean
required

Always true for a successfully processed batch (individual tasks may still fail).

Example:

true

summary
object
required

Aggregate counts for the batch.

results
object[]
required

Per-task results preserving the original input order by index.