Submit async tasks in a batch
Create as many as 500 async tasks in a single request. Tasks are validated one by one, so an invalid task does not stop the others from being accepted. The response lists a result for each task.
post/v1/async/task/batch
Request
- Base URL: https://api.answerline.dev
- URL: https://api.answerline.dev/v1/async/task/batch
- Auth: HTTP bearer
Request body
Example request
[
{
"taskType": "CHATGPT",
"payload": {
"prompt": "How is Northwind Traders reviewed by customers?",
"country": "US"
},
"priority": 5,
"idempotencyKey": "batch-chatgpt-001",
"webhook": {
"url": "https://your-app.com/webhook-handler"
}
}
]Response
The batch was processed. See the summary and each task's result to learn which tasks succeeded or failed.
Example response
{
"success": true,
"summary": {
"total": 3,
"succeeded": 2,
"failed": 1
},
"results": [
{
"success": true,
"task": {
"id": "b27a21e1-7c39-4aa2-a347-23e828c426f9",
"taskType": "CHATGPT",
"status": "QUEUED",
"priority": 1,
"createdAt": "2026-04-09T15:00:00.000Z",
"idempotencyKey": "batch-chatgpt-001"
},
"credits": {
"creditsToCharge": 0.00062
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.