Skip to content

Bulk enrichment and retrieval

Submit up to 100 independent items and retrieve their jobs with stable retry identities.

enrichment.start accepts 1–100 items per request. Each item needs its own ID, input, question and output. A batch can contain different questions and output types. The batch is accepted atomically and returns batchId plus job records; acceptance does not mean every item found an answer.

Use the single-item example as a starting point, then add items with distinct IDs. If your data starts as CSV, parse the file in your application or AI client and map each record to an item. Keep your original record ID for joining answers back to the source. No app import is required.

Retrieve the same batch

bash
curl https://www.leadbase.io/api/v1/operations/enrichment.get \  -H "x-api-key: $LEADBASE_API_KEY" \  -H 'Content-Type: application/json' \  -d '{"batchId":"<BATCH_ID_FROM_START>"}'

Replace the placeholder with the returned UUID. Poll at a reasonable interval with backoff while jobs are queued or running. Check each job independently and continue reading billing state if it is not settled. Avoid rapid polling, which also uses your request allowance.

Retry without creating another logical request

Save the exact start payload and idempotencyKey before dispatch. If the response is lost, resubmit the identical payload with that same key. Do not generate a fresh key for recovery. Use a new key only for an intentionally new request, including a changed question or input.

For more than 100 items, split into batches of at most 100 and stay within the JSON body limit. Increase submission volume gradually based on observed throughput and cost. Batch size, request rate and concurrent execution are separate limits; submitting 100 items does not promise that all start together.

See Activity for result interpretation and Credits for settlement.