Batches

List Batches

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" 
GET/batches
Authorization
Query parameters
Response

Successful Response

Body
any
Request
const response = await fetch('/batches', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "detail": [
    {
      "loc": [
        "text"
      ],
      "msg": "text",
      "type": "text"
    }
  ]
}

Create Batch

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"
}'
POST/batches
Authorization
Query parameters
Response

Successful Response

Body
any
Request
const response = await fetch('/batches', {
    method: 'POST',
    headers: {},
});
const data = await response.json();
Response
{
  "detail": [
    {
      "loc": [
        "text"
      ],
      "msg": "text",
      "type": "text"
    }
  ]
}

List Batches

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" 
GET/v1/batches
Authorization
Query parameters
Response

Successful Response

Body
any
Request
const response = await fetch('/v1/batches', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "detail": [
    {
      "loc": [
        "text"
      ],
      "msg": "text",
      "type": "text"
    }
  ]
}

Create Batch

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"
}'
POST/v1/batches
Authorization
Query parameters
Response

Successful Response

Body
any
Request
const response = await fetch('/v1/batches', {
    method: 'POST',
    headers: {},
});
const data = await response.json();
Response
{
  "detail": [
    {
      "loc": [
        "text"
      ],
      "msg": "text",
      "type": "text"
    }
  ]
}

Retrieve Batch

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" 
GET/batches/{batch_id}
Authorization
Path parameters
batch_id*Batch ID to retrieve

The ID of the batch to retrieve

Query parameters
Response

Successful Response

Body
any
Request
const response = await fetch('/batches/{batch_id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "detail": [
    {
      "loc": [
        "text"
      ],
      "msg": "text",
      "type": "text"
    }
  ]
}

Retrieve Batch

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" 
GET/v1/batches/{batch_id}
Authorization
Path parameters
batch_id*Batch ID to retrieve

The ID of the batch to retrieve

Query parameters
Response

Successful Response

Body
any
Request
const response = await fetch('/v1/batches/{batch_id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "detail": [
    {
      "loc": [
        "text"
      ],
      "msg": "text",
      "type": "text"
    }
  ]
}