Drex
Cancel a batch
Authorization
bearerAuth AuthorizationBearer <token>
Your API key, sent as Authorization: Bearer nace_sk_...
- Where: the dashboard's API Keys page. It is shown once, when you create it.
- Format:
nace_sk_followed by 43 URL-safe characters (A-Z,a-z,0-9,_and-). - Limit: an account can hold at most 3 active keys.
- Wrong or missing key: returns
401 authentication_error.
In: header
Path Parameters
idstringrequired
The batch's id (batch_...).
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/batches/string/cancel"{ "id": "string", "object": "batch", "status": "in_progress", "model": "string", "price_factor": 0, "task_counts": { "total": 0, "queued": 0, "running": 0, "succeeded": 0, "errored": 0, "expired": 0, "cancelled": 0 }, "cost_usd": 0, "metadata": {}, "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "ended_at": "2019-08-24T14:15:22Z", "cancel_requested_at": "2019-08-24T14:15:22Z", "results_available": true}