4e064cf81dae

latestOpenAPI 3.1.02026-08-131831,331960.0 KB
openAiBatch

Cancel a batch

Cancel an in-progress OpenAI-compatible batch. Already completed requests are not affected.

post/api/v1/batches/{batch_id}/cancel

Path parameters

batch_idstring required

Batch ID.

Query parameters

provider_idstring required

Provider route with customer-owned credentials, for example openai or parasail.

Headers

Authorizationstring required

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, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

X-Data-Respan-Paramsstring

Base64-encoded JSON object of Respan request parameters. Legacy X-Data-Keywordsai-Params is still accepted.

Request body

object required

Response

Batch cancellation initiated.

idstring required

Batch ID.

objectstring
endpointstring
input_file_idstring
output_file_idstring nullable

Output file ID, available when the batch completes.

error_file_idstring nullable

Error file ID, when provider errors are available.

completion_windowstring
status'validating' | 'pending' | 'in_progress' | 'finalizing' | 'completed' | 'failed' | 'expired' | 'cancelling' | 'cancelled' required
created_atinteger

Unix timestamp.

in_progress_atinteger nullable
expires_atinteger nullable
finalizing_atinteger nullable
completed_atinteger nullable
failed_atinteger nullable
expired_atinteger nullable
cancelling_atinteger nullable
cancelled_atinteger nullable
metadataobject
{"stackTrail":"components:schemas:OpenAI Batch_cancelBatch_Response_200:properties:errors:oneOf","oasType":"schema","type":"unknown","description":"Any type","nullable":true}