ChangelogNew

Batches now hold 10,000 tasks

API
10,000 tasks per batch, beside an open batch with its task counts by status and its items for ChatGPT, Gemini and Perplexity

One batch stores up to 10,000 tasks and runs them as your plan allows, and every paid plan now runs more tasks at once.

What you get

  • POST /v1/batches takes up to 10,000 items (32 MiB), each with its own taskType and payload, and answers 202 with the batch.
  • GET /v1/batches/:id reports progress as counts for pending, queued, processing, completed, failed and rejected.
  • GET /v1/batches/:id/items lists the items in submission order, and include=response adds each finished result.
  • Active tasks per plan are now Basic 25, Pro 150, Scale 500 and Max 1,000 (before: 10, 25, 50 and 100). Free stays at 2.
  • GET /v1/capabilities lists each engine's input fields, credit price and country policy. It needs no API key.

How it works

The batch keeps your items and starts them as tasks while your plan's active-task limit has room. Items that have to wait stay pending and start on their own, so you send the batch once.

Each item is checked on submission with the same rules as a single task. One invalid item rejects the whole batch with 400, lists up to 50 item indexes, and stores nothing. Repeating an idempotencyKey returns the first batch. An optional webhook.url receives each task's result and one signed batch.completed event when the batch finishes.

Where it helps

  • Track a full day of prompts across every engine with one submission.
  • Load a keyword list of thousands and read the results page by page.
  • Build engine and country pickers from /v1/capabilities.

Send a request

Send an items array. customId is your own label for an item and comes back with its result.

curl -X POST https://api.querying.ai/v1/batches \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "customId": "crm-chatgpt",
        "taskType": "CHATGPT",
        "payload": { "prompt": "best CRM for startups", "country": "US" }
      },
      {
        "customId": "crm-gemini",
        "taskType": "GEMINI",
        "payload": { "prompt": "best CRM for startups", "country": "US" }
      },
      {
        "customId": "crm-perplexity",
        "taskType": "PERPLEXITY",
        "payload": { "prompt": "best CRM for startups", "country": "US" }
      }
    ],
    "idempotencyKey": "daily-2026-10-09"
  }'

Response

The call answers 202 with the batch. Counts change as items are released and finished.

JSON
{
  "success": true,
  "batch": {
    "id": "…",
    "status": "OPEN",
    "total": 3,
    "counts": {
      "pending": 3,
      "queued": 0,
      "processing": 0,
      "completed": 0,
      "failed": 0,
      "rejected": 0
    },
    "idempotencyKey": "daily-2026-10-09",
    "createdAt": "…"
  }
}

Read the results page by page, in submission order. Each item shows its status, its task ID and, with include=response, its result.

curl "https://api.querying.ai/v1/batches/$BATCH_ID/items?include=response&limit=20" \
  -H "Authorization: Bearer $QUERYING_API_KEY"

Errors

An item refused with PLAN_CONCURRENCY_LIMIT, QUEUE_BACKPRESSURE or KEY_DAILY_CREDIT_LIMIT stays pending and the batch tries it again. Any other refusal ends that item as rejected with the code in error.

VALIDATION_ERRORHTTP 400
A field is missing or out of range. details names the field.
PAYLOAD_TOO_LARGEHTTP 413
The body is over 1 MiB, or over 8 MiB for a batch.
KEY_SCOPE_DENIEDHTTP 403
The engine is outside the key’s Allowed engines. Use another key, or add the engine in Manage key.
INSUFFICIENT_CREDITSHTTP 402
The balance is below the price of the task. Add credits or upgrade the plan, then send again.

Pricing

Each item costs the credits of a single task on its engine. The plan limits are listed at https://querying.ai/pricing.

More updates

Stay in the loop

Get new product updates in your inbox.

RSS feed