Delete a batch
⚠️
Preview — this feature is being built; the design below is the spec.
DELETE https://app.syntic.ai/v1/batches/{batch_id}Delete an ended batch together with its output and error files. Use it to remove results that contain personal data as soon as you have stored them. The input file is not deleted; it may be used by other batches.
For how this fits into a full workflow, see Batches.
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <key>: a private inference key (sk_live_...). See Authentication. |
Path parameters
| Parameter | Type | Description |
|---|---|---|
batch_id | string | Starts with batch_. |
Response
200 OK, Content-Type: application/json
{
"id": "batch_01JBXF3P8K",
"object": "batch",
"deleted": true,
"files_deleted": [
"file_01JBXG7Q",
"file_01JBXG8R"
]
}Examples
curl -sS -X DELETE "https://app.syntic.ai/v1/batches/batch_01JC3D5F7H9K1M3P5R7T" \
-H "Authorization: Bearer $SYNTIC_API_KEY"Errors
Errors use the error envelope and carry a request_id. Codes specific to this operation:
| Status | type | code | When |
|---|---|---|---|
| 409 | conflict_error | batch_in_progress | Cancel the batch and wait for it to end first. |
| 404 | not_found_error | batch_not_found | No batch with this id. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown, revoked or expired. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Was this page helpful?