Skip to main content
LLM Gateway 2.0 supports both the OpenAI and Anthropic batch APIs, so the OpenAI and Anthropic software development kits (SDKs) work unchanged. Batch is off by default because it opens a file upload and spend surface to callers.

Enable batch

Enable Batch on the Settings page. It takes effect without a restart.

Batch endpoints

  • OpenAI: /v1/files, /v1/batches, and /v1/batches/{id}, including cancel and long-poll with ?wait=true.
  • Anthropic: /anthropic/v1/messages/batches and its retrieve, results, cancel, and delete routes.
The model on every line is a gateway alias, and every line in a batch must use the same alias.

How the gateway runs a batch

Batches to OpenAI, Azure OpenAI, or Anthropic aliases go to the vendor’s own batch API and get the vendor’s batch discount. Batches to every other provider, including Domino-hosted models, Bedrock, and Vertex, run line by line through the gateway with no discount. Input and output guardrails apply to every line in both modes. The gateway excludes a blocked line from the batch and reports it in the error file by its custom_id.

Submit a batch

Read both files. A batch can finish as completed with no output file if every line failed. With the Anthropic SDK, authenticate with auth_token=, not api_key=, or the gateway returns 401.

Limits

  • Streaming and fallback chains don’t apply inside a batch.
  • One bring your own token (BYOT) key applies to the whole batch.
  • Bedrock and Vertex batches don’t get the AWS or Google discount.
  • The gateway keeps input files for 7 days and output files for 30 days by default.
Last modified on October 15, 2026