The time frame within which the batch should be processed.
created_at
integer
required
The Unix timestamp (in seconds) for when the batch was created.
endpoint
string
required
The OpenAI API endpoint used by the batch.
id
string
required
The unique identifier for the batch.
job_id
string
required
ID of the Job definition this batch belongs to.
input_file_id
string
required
The ID of the input file for the batch.
request_counts
RequestCountsModel · object
required
The request counts for different statuses within the batch.
Show child attributes
status
enum<string>
required
The current status of the batch.
Available options:
validating,
failed,
in_progress,
finalizing,
completed,
expired,
cancelling,
cancelled
cancelled_at
integer | null
The Unix timestamp (in seconds) for when the batch was cancelled.
cancelling_at
integer | null
The Unix timestamp (in seconds) for when the batch started cancelling.
completed_at
integer | null
The Unix timestamp (in seconds) for when the batch was completed.
error_file_id
string | null
The ID of the file containing the outputs of requests with errors.
errors
BatchErrorsModel · object | null
The errors encountered during batch processing.
Show child attributes
expired_at
integer | null
The Unix timestamp (in seconds) for when the batch expired.
expires_at
integer | null
The Unix timestamp (in seconds) for when the batch will expire.
failed_at
integer | null
The Unix timestamp (in seconds) for when the batch failed.
finalizing_at
integer | null
The Unix timestamp (in seconds) for when the batch started finalizing.
in_progress_at
integer | null
The Unix timestamp (in seconds) for when the batch started processing.
metadata
Metadata · object
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
Show child attributes
model
string
default:""
The model used for this batch run.
object
string
default:batch
The object type, which is always batch.
Allowed value: "batch"
output_file_id
string | null
The ID of the file containing the outputs of successfully executed requests.
price_1m_tokens
number | null
default:0
Effective price in USD per 1,000,000 tokens. While cost_status is pending, this is the price so far, computed over the batch's parts priced yet. Null before any part is priced. Only returned for customers who are shown pricing.
processing_cost
number | null
default:0
Total processing cost in USD. While cost_status is pending, this is the cost so far: the sum of the batch's parts priced yet. Null before any part is priced. Only returned for customers who are shown pricing.
cost_status
enum<string>
pending while processing_cost can still change, so it holds the cost so far. final once it never will, about 1–2.5 minutes after the batch's last part ends. Only returned for customers who are shown pricing.
Available options:
pending,
final
usage
CompletionUsageModel · object
Usage statistics for the completion request.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Impala AI Documentation","colors":{"primary":"#2563eb","light":"#7aa7f5","dark":"#1d4ed8"},"logo":{"light":"https://mintcdn.com/impalaai/56GIWcAxVIuqqB4N/LOGO.png?fit=max\u0026auto=format\u0026n=56GIWcAxVIuqqB4N\u0026q=85\u0026s=bfa04414e9e206d4d746cb5c14c65b64","dark":"https://mintcdn.com/impalaai/iKjilE4KzmFvYW-p/LOGO-LIGHT.png?fit=max\u0026auto=format\u0026n=iKjilE4KzmFvYW-p\u0026q=85\u0026s=89996dfd863a19b2b7f3e1a23d3cd900"},"favicon":"https://mintcdn.com/impalaai/CT_7X33viTgR4c3n/favicon-flipped.png?fit=max\u0026auto=format\u0026n=CT_7X33viTgR4c3n\u0026q=85\u0026s=3274696fdf43018c47e87fe4465d6453","background":{"decoration":"gradient"},"navbar":{"links":[{"href":"/changelog","label":"Product updates"},{"href":"https://www.getimpala.ai/blog","label":"Blog"},{"href":"mailto:orel@getimpala.ai","label":"Support"}]},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/impala-ai","website":"https://www.getimpala.ai/"}},"fonts":{"family":"rethink sans"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"impalaai","hasAudioNarration":false,"actualSubdomain":"impalaai","customDomains":["docs.getimpala.ai"],"gitSource":{"type":"github","owner":"orel-impala","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af9ac18dc65debd1bc21b1b","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API reference","count":11},{"language":"default","tag":"Files","count":5},{"language":"default","tag":"Introduction","count":4},{"language":"default","tag":"Serverless inference","count":4},{"language":"default","tag":"Batch inference","count":4},{"language":"default","tag":"Batches","count":4},{"language":"default","tag":"Bring your own cloud (BYOC)","count":3},{"language":"default","tag":"Reference","count":3},{"language":"default","tag":"Bring your own model","count":3},{"language":"default","tag":"Integrations","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/batches/cancel-batch","slug":"/api-reference/batches/cancel-batch","pageMetadata":{"title":"Cancel Batch","description":"Cancel a batch.","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json post /v1/batches/{batch_id}/cancel","href":"/api-reference/batches/cancel-batch","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Cancel a batch.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cancel Batch","description":"Cancel a batch.","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json post /v1/batches/{batch_id}/cancel","href":"/api-reference/batches/cancel-batch","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Batches"],"summary":"Cancel Batch","description":"Cancel a batch.","operationId":"cancel_batch_v1_batches__batch_id__cancel_post","parameters":["224f5a25-ec51-4eae-89f6-f9ac7e938667"],"responses":{"200":"827877dc-5fe5-4891-9fcd-533cb89dae8e","404":"f5957a93-f35a-4e44-a8e7-00d8b40be12f","422":"66f3543e-398c-4ca8-bd73-a0b9f2b042cc"},"method":"post","type":"path","servers":[],"security":[],"path":"/v1/batches/{batch_id}/cancel","baseUrlOptions":[],"title":"Cancel Batch","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"224f5a25-ec51-4eae-89f6-f9ac7e938667":{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"responses":{"827877dc-5fe5-4891-9fcd-533cb89dae8e":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"completion_window":{"type":"string","title":"Completion Window","description":"The time frame within which the batch should be processed.","isRequired":true,"uniqueKey":"completion_window","typeLabel":"string"},"created_at":{"type":"integer","title":"Created At","description":"The Unix timestamp (in seconds) for when the batch was created.","isRequired":true,"uniqueKey":"created_at","typeLabel":"integer"},"endpoint":{"type":"string","title":"Endpoint","description":"The OpenAI API endpoint used by the batch.","isRequired":true,"uniqueKey":"endpoint","typeLabel":"string"},"id":{"type":"string","title":"Id","description":"The unique identifier for the batch.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"job_id":{"type":"string","title":"Job Id","description":"ID of the Job definition this batch belongs to.","isRequired":true,"uniqueKey":"job_id","typeLabel":"string"},"input_file_id":{"type":"string","title":"Input File Id","description":"The ID of the input file for the batch.","isRequired":true,"uniqueKey":"input_file_id","typeLabel":"string"},"request_counts":{"properties":{"completed":{"type":"integer","title":"Completed","description":"Number of requests that have been completed successfully.","isRequired":true,"uniqueKey":"request_counts.completed","typeLabel":"integer"},"failed":{"type":"integer","title":"Failed","description":"Number of requests that have failed.","isRequired":true,"uniqueKey":"request_counts.failed","typeLabel":"integer"},"total":{"type":"integer","title":"Total","description":"Total number of requests in the batch.","isRequired":true,"uniqueKey":"request_counts.total","typeLabel":"integer"}},"type":"object","required":["completed","failed","total"],"title":"RequestCountsModel","description":"The request counts for different statuses within the batch.","isRequired":true,"uniqueKey":"request_counts","typeLabel":"RequestCountsModel · object"},"status":{"type":"string","enum":["validating","failed","in_progress","finalizing","completed","expired","cancelling","cancelled"],"title":"BatchStatus","description":"The current status of the batch.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"cancelled_at":{"oneOf":[{"type":"integer","title":"Cancelled At","description":"The Unix timestamp (in seconds) for when the batch was cancelled.","uniqueKey":"cancelled_at.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Cancelled At","description":"The Unix timestamp (in seconds) for when the batch was cancelled.","uniqueKey":"cancelled_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"cancelled_at","typeLabel":"integer | null"},"cancelling_at":{"oneOf":[{"type":"integer","title":"Cancelling At","description":"The Unix timestamp (in seconds) for when the batch started cancelling.","uniqueKey":"cancelling_at.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Cancelling At","description":"The Unix timestamp (in seconds) for when the batch started cancelling.","uniqueKey":"cancelling_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"cancelling_at","typeLabel":"integer | null"},"completed_at":{"oneOf":[{"type":"integer","title":"Completed At","description":"The Unix timestamp (in seconds) for when the batch was completed.","uniqueKey":"completed_at.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Completed At","description":"The Unix timestamp (in seconds) for when the batch was completed.","uniqueKey":"completed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"completed_at","typeLabel":"integer | null"},"error_file_id":{"oneOf":[{"type":"string","title":"Error File Id","description":"The ID of the file containing the outputs of requests with errors.","uniqueKey":"error_file_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Error File Id","description":"The ID of the file containing the outputs of requests with errors.","uniqueKey":"error_file_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"error_file_id","typeLabel":"string | null"},"errors":{"oneOf":[{"type":"object","title":"BatchErrorsModel","description":"The errors encountered during batch processing.","required":["data"],"properties":{"data":{"items":{"properties":{"code":{"type":"string","title":"Code","description":"An error code identifying the error type.","isRequired":true,"uniqueKey":"errors.oneOf.0.data.items.[INDEX].code","typeLabel":"string"},"line":{"oneOf":[{"type":"integer","title":"Line","description":"The line number of the input file where the error occurred, if applicable.","isRequired":true,"uniqueKey":"errors.oneOf.0.data.items.[INDEX].line.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Line","description":"The line number of the input file where the error occurred, if applicable.","isRequired":true,"uniqueKey":"errors.oneOf.0.data.items.[INDEX].line.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"errors.oneOf.0.data.items.[INDEX].line","typeLabel":"integer | null"},"message":{"type":"string","title":"Message","description":"A human-readable message providing more details about the error.","isRequired":true,"uniqueKey":"errors.oneOf.0.data.items.[INDEX].message","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The name of the parameter that caused the error, if applicable.","isRequired":true,"uniqueKey":"errors.oneOf.0.data.items.[INDEX].param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The name of the parameter that caused the error, if applicable.","isRequired":true,"uniqueKey":"errors.oneOf.0.data.items.[INDEX].param.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"errors.oneOf.0.data.items.[INDEX].param","typeLabel":"string | null"}},"type":"object","required":["code","line","message","param"],"title":"BatchErrorModel","uniqueKey":"errors.oneOf.0.data.items.[INDEX]","typeLabel":"BatchErrorModel · object"},"type":"array","title":"Data","description":"A list of errors encountered during batch processing.","isRequired":true,"uniqueKey":"errors.oneOf.0.data","typeLabel":"BatchErrorModel · object[]"},"object":{"type":"string","const":"list","title":"Object","description":"The object type, which is always `list`.","default":"list","uniqueKey":"errors.oneOf.0.object","typeLabel":"string"}},"uniqueKey":"errors.oneOf.0","typeLabel":"BatchErrorsModel · object"},{"type":"null","description":"The errors encountered during batch processing.","uniqueKey":"errors.oneOf.1","typeLabel":"null"}],"uniqueKey":"errors","typeLabel":"BatchErrorsModel · object | null"},"expired_at":{"oneOf":[{"type":"integer","title":"Expired At","description":"The Unix timestamp (in seconds) for when the batch expired.","uniqueKey":"expired_at.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Expired At","description":"The Unix timestamp (in seconds) for when the batch expired.","uniqueKey":"expired_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"expired_at","typeLabel":"integer | null"},"expires_at":{"oneOf":[{"type":"integer","title":"Expires At","description":"The Unix timestamp (in seconds) for when the batch will expire.","uniqueKey":"expires_at.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Expires At","description":"The Unix timestamp (in seconds) for when the batch will expire.","uniqueKey":"expires_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"expires_at","typeLabel":"integer | null"},"failed_at":{"oneOf":[{"type":"integer","title":"Failed At","description":"The Unix timestamp (in seconds) for when the batch failed.","uniqueKey":"failed_at.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Failed At","description":"The Unix timestamp (in seconds) for when the batch failed.","uniqueKey":"failed_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"failed_at","typeLabel":"integer | null"},"finalizing_at":{"oneOf":[{"type":"integer","title":"Finalizing At","description":"The Unix timestamp (in seconds) for when the batch started finalizing.","uniqueKey":"finalizing_at.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Finalizing At","description":"The Unix timestamp (in seconds) for when the batch started finalizing.","uniqueKey":"finalizing_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"finalizing_at","typeLabel":"integer | null"},"in_progress_at":{"oneOf":[{"type":"integer","title":"In Progress At","description":"The Unix timestamp (in seconds) for when the batch started processing.","uniqueKey":"in_progress_at.oneOf.0","typeLabel":"integer"},{"type":"null","title":"In Progress At","description":"The Unix timestamp (in seconds) for when the batch started processing.","uniqueKey":"in_progress_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"in_progress_at","typeLabel":"integer | null"},"metadata":{"additionalProperties":{"type":"string","uniqueKey":"metadata.additionalProperties","typeLabel":"string"},"type":"object","title":"Metadata","description":"Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.","uniqueKey":"metadata","typeLabel":"Metadata · object"},"model":{"type":"string","title":"Model","description":"The model used for this batch run.","default":"","uniqueKey":"model","typeLabel":"string"},"object":{"type":"string","const":"batch","title":"Object","description":"The object type, which is always `batch`.","default":"batch","uniqueKey":"object","typeLabel":"string"},"output_file_id":{"oneOf":[{"type":"string","title":"Output File Id","description":"The ID of the file containing the outputs of successfully executed requests.","uniqueKey":"output_file_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Output File Id","description":"The ID of the file containing the outputs of successfully executed requests.","uniqueKey":"output_file_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"output_file_id","typeLabel":"string | null"},"price_1m_tokens":{"oneOf":[{"type":"number","title":"Price 1M Tokens","description":"Effective price in USD per 1,000,000 tokens. While `cost_status` is `pending`, this is the price so far, computed over the batch's parts priced yet. Null before any part is priced. Only returned for customers who are shown pricing.","default":0,"uniqueKey":"price_1m_tokens.oneOf.0","typeLabel":"number"},{"type":"null","title":"Price 1M Tokens","description":"Effective price in USD per 1,000,000 tokens. While `cost_status` is `pending`, this is the price so far, computed over the batch's parts priced yet. Null before any part is priced. Only returned for customers who are shown pricing.","default":0,"uniqueKey":"price_1m_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"price_1m_tokens","typeLabel":"number | null"},"processing_cost":{"oneOf":[{"type":"number","title":"Processing Cost","description":"Total processing cost in USD. While `cost_status` is `pending`, this is the cost so far: the sum of the batch's parts priced yet. Null before any part is priced. Only returned for customers who are shown pricing.","default":0,"uniqueKey":"processing_cost.oneOf.0","typeLabel":"number"},{"type":"null","title":"Processing Cost","description":"Total processing cost in USD. While `cost_status` is `pending`, this is the cost so far: the sum of the batch's parts priced yet. Null before any part is priced. Only returned for customers who are shown pricing.","default":0,"uniqueKey":"processing_cost.oneOf.1","typeLabel":"null"}],"uniqueKey":"processing_cost","typeLabel":"number | null"},"cost_status":{"type":"string","enum":["pending","final"],"title":"Cost Status","description":"`pending` while `processing_cost` can still change, so it holds the cost so far. `final` once it never will, about 1–2.5 minutes after the batch's last part ends. Only returned for customers who are shown pricing.","uniqueKey":"cost_status","typeLabel":"enum\u003cstring>"},"usage":{"properties":{"prompt_tokens":{"type":"number","title":"Prompt Tokens","description":"Number of tokens in the prompt (total input tokens processed).","default":0,"uniqueKey":"usage.prompt_tokens","typeLabel":"number"},"completion_tokens":{"type":"number","title":"Completion Tokens","description":"Number of tokens in the generated completion.","default":0,"uniqueKey":"usage.completion_tokens","typeLabel":"number"},"total_tokens":{"type":"number","title":"Total Tokens","description":"Total number of tokens used in the request (prompt + completion).","default":0,"uniqueKey":"usage.total_tokens","typeLabel":"number"}},"type":"object","title":"CompletionUsageModel","description":"Usage statistics for the completion request.","uniqueKey":"usage","typeLabel":"CompletionUsageModel · object"}},"type":"object","required":["completion_window","created_at","endpoint","id","job_id","input_file_id","request_counts","status"],"title":"BatchModel","uniqueKey":"","typeLabel":"BatchModel · object"},"examples":{"Example":{"title":"Example","value":{"completion_window":"\u003cstring>","created_at":123,"endpoint":"\u003cstring>","id":"\u003cstring>","job_id":"\u003cstring>","input_file_id":"\u003cstring>","request_counts":{"completed":123,"failed":123,"total":123},"status":"validating","cancelled_at":123,"cancelling_at":123,"completed_at":123,"error_file_id":"\u003cstring>","errors":{"data":[{"code":"\u003cstring>","line":123,"message":"\u003cstring>","param":"\u003cstring>"}],"object":"list"},"expired_at":123,"expires_at":123,"failed_at":123,"finalizing_at":123,"in_progress_at":123,"metadata":{},"model":"","object":"batch","output_file_id":"\u003cstring>","price_1m_tokens":0,"processing_cost":0,"cost_status":"pending","usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}}},"exampleType":"generated"}},"exampleType":"generated"},"f5957a93-f35a-4e44-a8e7-00d8b40be12f":{"content":{"application/json":{"schema":{"properties":{"error":{"properties":{"message":{"type":"string","title":"Message","description":"A human-readable error message.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","title":"Type","description":"The type of error.","isRequired":true,"uniqueKey":"error.type","typeLabel":"string"},"param":{"oneOf":[{"type":"string","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.0","typeLabel":"string"},{"type":"null","title":"Param","description":"The parameter that caused the error, if applicable.","uniqueKey":"error.param.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.param","typeLabel":"string | null"},"code":{"oneOf":[{"type":"string","title":"Code","description":"An error code, if applicable.","uniqueKey":"error.code.oneOf.0","typeLabel":"string"},{"type":"null","title":"Code","description":"An error code, if applicable.","uniqueKey":"error.code.oneOf.1","typeLabel":"null"}],"uniqueKey":"error.code","typeLabel":"string | null"}},"type":"object","required":["message","type"],"title":"ErrorDetail","description":"The error details.","isRequired":true,"uniqueKey":"error","typeLabel":"ErrorDetail · object"}},"type":"object","required":["error"],"title":"ErrorResponseModel","uniqueKey":"","typeLabel":"ErrorResponseModel · object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"\u003cstring>","type":"\u003cstring>","param":"\u003cstring>","code":"\u003cstring>"}}}},"exampleType":"generated"}},"description":"Not Found","exampleType":"generated"},"66f3543e-398c-4ca8-bd73-a0b9f2b042cc":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{}},"originalFileLocation":"openai-api-swagger.json"},"subdomain":"impalaai","siteName":"Impala AI Documentation","title":"Cancel Batch - Impala AI Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T12:57:22.863Z","originalFileLocation":"api-reference/batches/cancel-batch.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Cancel a batch.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Impala AI Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel Batch - Impala AI Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Cancel a batch.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Impala AI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.getimpala.ai/api-reference/batches/cancel-batch\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://impalaai.mintlify.site/_mintlify/api/og/v2?division=Batches\u0026amp;title=Cancel+Batch\u0026amp;description=Cancel+a+batch.\u0026amp;theme=6b61ed0062b27ba13c4e93e6\u0026amp;signature=29ceb2126a677b01e26614d5743f517efcf5218df220c8e4a47d8ec8fada0e3d\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Cancel Batch - Impala AI Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Cancel a batch.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://impalaai.mintlify.site/_mintlify/api/og/v2?division=Batches\u0026amp;title=Cancel+Batch\u0026amp;description=Cancel+a+batch.\u0026amp;theme=6b61ed0062b27ba13c4e93e6\u0026amp;signature=29ceb2126a677b01e26614d5743f517efcf5218df220c8e4a47d8ec8fada0e3d\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/impalaai/U-hxjL9MrmCEu7hF/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Impala AI Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563eb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.getimpala.ai/api-reference/batches/cancel-batch\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/batches/cancel-batch.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.getimpala.ai/#organization\",\"name\":\"Impala AI Documentation\",\"url\":\"https://docs.getimpala.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/impalaai/56GIWcAxVIuqqB4N/LOGO.png?fit=max\u0026auto=format\u0026n=56GIWcAxVIuqqB4N\u0026q=85\u0026s=bfa04414e9e206d4d746cb5c14c65b64\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.getimpala.ai#website\",\"name\":\"Impala AI Documentation\",\"url\":\"https://docs.getimpala.ai\",\"publisher\":{\"@id\":\"https://docs.getimpala.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.getimpala.ai/api-reference/batches/cancel-batch#webpage\",\"url\":\"https://docs.getimpala.ai/api-reference/batches/cancel-batch\",\"name\":\"Cancel Batch\",\"description\":\"Cancel a batch.\",\"dateModified\":\"2026-10-28T12:57:22.863Z\",\"isPartOf\":{\"@id\":\"https://docs.getimpala.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.getimpala.ai/api-reference/batches/cancel-batch#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.getimpala.ai/api-reference/batches/cancel-batch#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API reference\",\"item\":\"https://docs.getimpala.ai/api-reference/system/health\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Batches\",\"item\":\"https://docs.getimpala.ai/api-reference/batches/list-batches\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cancel Batch\",\"item\":\"https://docs.getimpala.ai/api-reference/batches/cancel-batch\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.getimpala.ai/api-reference/batches/cancel-batch#apireference\",\"headline\":\"Cancel Batch\",\"name\":\"Cancel Batch\",\"description\":\"Cancel a batch.\",\"url\":\"https://docs.getimpala.ai/api-reference/batches/cancel-batch\",\"mainEntityOfPage\":{\"@id\":\"https://docs.getimpala.ai/api-reference/batches/cancel-batch#webpage\"},\"dateModified\":\"2026-10-28T12:57:22.863Z\",\"publisher\":{\"@id\":\"https://docs.getimpala.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.getimpala.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Impala AI Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Impala AI Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/batches/cancel-batch.md","siteName":"Impala AI Documentation","nav":{"global":null,"groups":[{"group":"Introduction","icon":"compass","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Run async and open source","href":"/async-inference"},{"title":"Completion windows","href":"/completion-windows"},{"title":"Run in our cloud, or yours","href":"/deployment-options"}]},{"group":"Serverless inference","icon":"bolt","pages":[{"title":"Quickstart","href":"/impala-cloud-setup"},{"title":"Chat completions","href":"/send-a-request"},{"title":"Rate limit webhooks","href":"/rate-limit-webhooks"},{"title":"Billing API","href":"/billing-api"}]},{"group":"Batch inference","icon":"layer-group","pages":[{"title":"Run a batch","href":"/run-your-first-batch"},{"title":"Jobs","href":"/jobs-and-job-ids"},{"title":"Images","href":"/pass_images_with_image_url"},{"title":"Video","href":"/video-input"}]},{"group":"Agent orchestration","icon":"sitemap","pages":[{"title":"Impala Swarm","href":"/swarm"}]},{"group":"Optimization","icon":"gauge","pages":[{"title":"Impala Herd","href":"/impala-herd"}]},{"group":"Bring your own model","icon":"cube","pages":[{"title":"LoRA adapters","href":"/lora-adapters"},{"title":"LoRA adapters in batch","href":"/lora-batch"},{"title":"Impala Leap","href":"/weight-sync"}]},{"group":"Bring your own cloud (BYOC)","icon":"cloud","pages":[{"title":"Install Impala in your VPC","href":"/getting-started-infrastructure-setup"},{"title":"Expose the OpenAI API endpoint","href":"/exposing_the_openai_api_endpoint_service"},{"title":"Raise AWS service quotas","href":"/aws_service_quotas_for_Impala_data_plane_deployment"}]},{"group":"Integrations","icon":"plug","pages":[{"title":"LiteLLM","href":"/connect-litellm"},{"title":"Anthropic SDKs and Claude Code","href":"/anthropic-sdk"}]},{"group":"Reference","icon":"book","pages":[{"title":"Security \u0026 data handling","href":"/security"},{"title":"Further reading","href":"/further-reading"},{"title":"Glossary","href":"/glossary"}]},{"group":"API reference","icon":"code","pages":[{"group":"System","pages":[{"title":"Health","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json get /health","href":"/api-reference/system/health"},{"title":"Ready","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json get /ready","href":"/api-reference/system/ready"}]},{"group":"Files","pages":[{"title":"List Files","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json get /v1/files","href":"/api-reference/files/list-files"},{"title":"Upload File","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json post /v1/files","href":"/api-reference/files/upload-file"},{"title":"Get File","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json get /v1/files/{file_id}","href":"/api-reference/files/get-file"},{"title":"Delete File","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json delete /v1/files/{file_id}","href":"/api-reference/files/delete-file"},{"title":"Get File Content","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json get /v1/files/{file_id}/content","href":"/api-reference/files/get-file-content"}]},{"group":"Batches","pages":[{"title":"List Batches","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json get /v1/batches","href":"/api-reference/batches/list-batches"},{"title":"Create Batch","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json post /v1/batches","href":"/api-reference/batches/create-batch"},{"title":"Get Batch","description":"Retrieve a specific batch.","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json get /v1/batches/{batch_id}","href":"/api-reference/batches/get-batch"},{"title":"Cancel Batch","deprecated":null,"version":null,"openapi":"/openai-api-swagger.json post /v1/batches/{batch_id}/cancel","href":"/api-reference/batches/cancel-batch"}]}]}]},"basePath":"","title":"Cancel Batch - Impala AI Documentation","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js","Markdown-CX2QY19L.js","AssistantPageLink-CY3bFglh.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}