Cancel a batch
Cancel an in-progress OpenAI-compatible batch. Already completed requests are not affected.
Authentication
AuthorizationBearer
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, OpenAI or Azure OpenAI provider credentials go in Settings -> Providers or the request body credential_override field, not in this auth field.
Path parameters
batch_id
Batch ID.
Headers
X-Data-Respan-Params
Base64-encoded JSON object of Respan request parameters. Legacy X-Data-Keywordsai-Params is still accepted.
Request
This endpoint expects an object.
Response
Batch cancellation initiated.
id
Batch ID.
status
object
endpoint
input_file_id
output_file_id
Output file ID, available when the batch completes.
error_file_id
Error file ID, when provider errors are available.
completion_window
created_at
Unix timestamp.
in_progress_at
expires_at
finalizing_at
completed_at
failed_at
expired_at
cancelling_at
cancelled_at
request_counts
metadata
errors
Provider error details, when available.
Errors
400
Bad Request Error
401
Unauthorized Error
404
Not Found Error