Create Batch

Go to Product

Creates and executes a batch from an uploaded file of requests

Options

Body

Request body which must comply to the following JSON Schema:

{
  "required" : [ "completion_window", "endpoint", "input_file_id" ],
  "type" : "object",
  "properties" : {
    "input_file_id" : {
      "type" : "string",
      "description" : "The ID of an uploaded file that contains requests for the new batch.\n\nSee [upload file](/docs/api-reference/files/create) for how to upload a file.\n\nYour input file must be formatted as a [JSONL file](/docs/api-reference/batch/request-input), and must be uploaded with the purpose `batch`. The file can contain up to 50,000 requests, and can be up to 100 MB in size.\n"
    },
    "endpoint" : {
      "type" : "string",
      "description" : "The endpoint to be used for all requests in the batch. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported. Note that `/v1/embeddings` batches are also restricted to a maximum of 50,000 embedding inputs across all requests in the batch.",
      "enum" : [ "/v1/chat/completions", "/v1/embeddings", "/v1/completions" ]
    },
    "completion_window" : {
      "type" : "string",
      "description" : "The time frame within which the batch should be processed. Currently only `24h` is supported.",
      "enum" : [ "24h" ]
    },
    "metadata" : {
      "type" : "object",
      "additionalProperties" : {
        "type" : "string"
      },
      "description" : "Optional custom metadata for the batch.",
      "nullable" : true
    }
  }
}
Result Format

Specify how the response should be mapped to the table output. The following formats are available:

Raw Response: Returns the raw response in a single row with the following columns:

  • body: Response body
  • status: HTTP status code

Input Ports

Icon
Configuration data.

Output Ports

Icon
Result of the request depending on the selected Result Format.
Icon
Configuration data (this is the same as the input port; it is provided as passthrough for sequentially chaining nodes to declutter your workflow connections).

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.