Skip to main content
POST
/
openai
/
v1
/
batches
/
{batch_id}
/
cancel
Cancel batch job (OpenAI format)
curl --request POST \
  --url http://localhost:8080/openai/v1/batches/{batch_id}/cancel
{
  "id": "<string>",
  "object": "<string>",
  "status": "validating",
  "request_counts": {
    "total": 123,
    "completed": 123,
    "failed": 123,
    "succeeded": 123,
    "expired": 123,
    "canceled": 123,
    "pending": 123
  },
  "cancelling_at": 123,
  "cancelled_at": 123,
  "extra_fields": {
    "request_type": "<string>",
    "provider": "openai",
    "model_requested": "<string>",
    "model_deployment": "<string>",
    "latency": 123,
    "chunk_index": 123,
    "raw_request": {},
    "raw_response": {},
    "cache_debug": {
      "cache_hit": true,
      "cache_id": "<string>",
      "hit_type": "<string>",
      "provider_used": "<string>",
      "model_used": "<string>",
      "input_tokens": 123,
      "threshold": 123,
      "similarity": 123
    }
  }
}

Path Parameters

batch_id
string
required

Batch job ID to cancel

Query Parameters

provider
string

Provider for the batch

Response

Successful response

id
string
object
string
status
enum<string>
Available options:
validating,
failed,
in_progress,
finalizing,
completed,
expired,
cancelling,
canceled,
ended
request_counts
object
cancelling_at
integer<int64>
cancelled_at
integer<int64>
extra_fields
object

Additional fields included in responses