Batch requests and jobs

Many GETs in one call. Slow calls come back as a job.

POST /v1/batch runs up to 100 GET requests in one call. Each item names a path and its parameters, the same as a call on its own. The answer has one envelope per item, in order, under data.results. The batch's credits_charged is the sum. A failed item costs nothing and does not fail the others. Credits are held up front so the items cannot overdraw the balance. Each item still counts toward the rate limit.

If you retry a POST, send an Idempotency-Key (a fresh UUID per operation). The same key and the same request return the first answer, with x-idempotent-replay: true, and cost nothing the second time. Keys are kept for 24 hours. The same key with a different body answers 409 conflict. Server errors, 429 and 402 are not stored, so they can be retried with the same key.

Most calls finish in a second or two. One still running after about 25 seconds answers 202 with a job. Poll data.poll_url with your key. Polling is free. When the job finishes you get the final envelope and the charge, once. A failed job has credits_charged: 0. Results are kept for 24 hours.

Full detail: Batch and jobs.