openapi: 3.2.0 info: title: LiteLLM Batch API description: 'Proxy Server to call 100+ LLMs in the OpenAI format. **Customize Swagger Docs** 👉 ```LiteLLM Admin Panel on /ui```. Create, Edit Keys with SSO. Having issues? Try ```Fallback Login``` 💸 ```LiteLLM Model Cost Map```. 🔎 ```LiteLLM Model Hub```. See available models on the proxy. **Docs**' version: 1.102.1 tags: - name: Batch paths: /batches: post: tags: - Batch summary: Create Batch description: 'Create large batches of API requests for asynchronous processing. This is the equivalent of POST https://api.openai.com/v1/batch Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch Example Curl ``` curl http://localhost:4000/v1/batches -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d ''{ "input_file_id": "file-abc123", "endpoint": "/v1/chat/completions", "completion_window": "24h" }'' ```' operationId: create_batch_batches_post security: - APIKeyHeader: [] parameters: - name: provider in: query required: false schema: anyOf: - type: string - type: 'null' title: Provider responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Batch summary: List Batches description: 'Lists This is the equivalent of GET https://api.openai.com/v1/batches/ Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/list Example Curl ``` curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```' operationId: list_batches_batches_get security: - APIKeyHeader: [] parameters: - name: provider in: query required: false schema: anyOf: - type: string - type: 'null' title: Provider - name: limit in: query required: false schema: anyOf: - type: integer - type: 'null' title: Limit - name: after in: query required: false schema: anyOf: - type: string - type: 'null' title: After - name: target_model_names in: query required: false schema: anyOf: - type: string - type: 'null' title: Target Model Names responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/batches: post: tags: - Batch summary: Create Batch description: 'Create large batches of API requests for asynchronous processing. This is the equivalent of POST https://api.openai.com/v1/batch Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch Example Curl ``` curl http://localhost:4000/v1/batches -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d ''{ "input_file_id": "file-abc123", "endpoint": "/v1/chat/completions", "completion_window": "24h" }'' ```' operationId: create_batch_v1_batches_post security: - APIKeyHeader: [] parameters: - name: provider in: query required: false schema: anyOf: - type: string - type: 'null' title: Provider responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Batch summary: List Batches description: 'Lists This is the equivalent of GET https://api.openai.com/v1/batches/ Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/list Example Curl ``` curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```' operationId: list_batches_v1_batches_get security: - APIKeyHeader: [] parameters: - name: provider in: query required: false schema: anyOf: - type: string - type: 'null' title: Provider - name: limit in: query required: false schema: anyOf: - type: integer - type: 'null' title: Limit - name: after in: query required: false schema: anyOf: - type: string - type: 'null' title: After - name: target_model_names in: query required: false schema: anyOf: - type: string - type: 'null' title: Target Model Names responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /{provider}/v1/batches: post: tags: - Batch summary: Create Batch description: 'Create large batches of API requests for asynchronous processing. This is the equivalent of POST https://api.openai.com/v1/batch Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch Example Curl ``` curl http://localhost:4000/v1/batches -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d ''{ "input_file_id": "file-abc123", "endpoint": "/v1/chat/completions", "completion_window": "24h" }'' ```' operationId: create_batch__provider__v1_batches_post security: - APIKeyHeader: [] parameters: - name: provider in: path required: true schema: anyOf: - type: string - type: 'null' title: Provider responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Batch summary: List Batches description: 'Lists This is the equivalent of GET https://api.openai.com/v1/batches/ Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/list Example Curl ``` curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```' operationId: list_batches__provider__v1_batches_get security: - APIKeyHeader: [] parameters: - name: provider in: path required: true schema: anyOf: - type: string - type: 'null' title: Provider - name: limit in: query required: false schema: anyOf: - type: integer - type: 'null' title: Limit - name: after in: query required: false schema: anyOf: - type: string - type: 'null' title: After - name: target_model_names in: query required: false schema: anyOf: - type: string - type: 'null' title: Target Model Names responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /batches/{batch_id}: get: tags: - Batch summary: Retrieve Batch description: 'Retrieves a batch. This is the equivalent of GET https://api.openai.com/v1/batches/{batch_id} Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/retrieve Example Curl ``` curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```' operationId: retrieve_batch_batches__batch_id__get security: - APIKeyHeader: [] parameters: - name: batch_id in: path required: true schema: type: string title: Batch ID to retrieve description: The ID of the batch to retrieve description: The ID of the batch to retrieve - name: provider in: query required: false schema: anyOf: - type: string - type: 'null' title: Provider responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/batches/{batch_id}: get: tags: - Batch summary: Retrieve Batch description: 'Retrieves a batch. This is the equivalent of GET https://api.openai.com/v1/batches/{batch_id} Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/retrieve Example Curl ``` curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```' operationId: retrieve_batch_v1_batches__batch_id__get security: - APIKeyHeader: [] parameters: - name: batch_id in: path required: true schema: type: string title: Batch ID to retrieve description: The ID of the batch to retrieve description: The ID of the batch to retrieve - name: provider in: query required: false schema: anyOf: - type: string - type: 'null' title: Provider responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /{provider}/v1/batches/{batch_id}: get: tags: - Batch summary: Retrieve Batch description: 'Retrieves a batch. This is the equivalent of GET https://api.openai.com/v1/batches/{batch_id} Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/retrieve Example Curl ``` curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```' operationId: retrieve_batch__provider__v1_batches__batch_id__get security: - APIKeyHeader: [] parameters: - name: provider in: path required: true schema: anyOf: - type: string - type: 'null' title: Provider - name: batch_id in: path required: true schema: type: string title: Batch ID to retrieve description: The ID of the batch to retrieve description: The ID of the batch to retrieve responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /batches/{batch_id}/cancel: post: tags: - Batch summary: Cancel Batch description: 'Cancel a batch. This is the equivalent of POST https://api.openai.com/v1/batches/{batch_id}/cancel Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/cancel Example Curl ``` curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -X POST ```' operationId: cancel_batch_batches__batch_id__cancel_post security: - APIKeyHeader: [] parameters: - name: batch_id in: path required: true schema: type: string title: Batch Id - name: provider in: query required: false schema: anyOf: - type: string - type: 'null' title: Provider responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /v1/batches/{batch_id}/cancel: post: tags: - Batch summary: Cancel Batch description: 'Cancel a batch. This is the equivalent of POST https://api.openai.com/v1/batches/{batch_id}/cancel Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/cancel Example Curl ``` curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -X POST ```' operationId: cancel_batch_v1_batches__batch_id__cancel_post security: - APIKeyHeader: [] parameters: - name: batch_id in: path required: true schema: type: string title: Batch Id - name: provider in: query required: false schema: anyOf: - type: string - type: 'null' title: Provider responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /{provider}/v1/batches/{batch_id}/cancel: post: tags: - Batch summary: Cancel Batch description: 'Cancel a batch. This is the equivalent of POST https://api.openai.com/v1/batches/{batch_id}/cancel Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/cancel Example Curl ``` curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -X POST ```' operationId: cancel_batch__provider__v1_batches__batch_id__cancel_post security: - APIKeyHeader: [] parameters: - name: batch_id in: path required: true schema: type: string title: Batch Id - name: provider in: path required: true schema: anyOf: - type: string - type: 'null' title: Provider responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError securitySchemes: APIKeyHeader: type: apiKey description: Bearer token in: header name: x-litellm-api-key