Skip to contentOceanToken

Glossary term

What is a batch API?

Sending many requests as one job to be processed later, usually at a lower price.

Definition

A batch API accepts a file of many requests as one job, processes them in the background within a time window, often up to a day, and returns all the results together. Because the work is not urgent, providers that offer batching usually price it below the same requests sent one by one.

Why it matters

Batching suits work nobody is waiting on, such as classifying a large dataset, generating embeddings for an archive or running evaluations. It trades speed for cost and simpler rate-limit handling.

How it works on OceanToken

OceanToken does not offer a batch endpoint today: /v1/batches answers 501 not_supported. Send each request to its regular endpoint instead, with retries for 429; embedding endpoints take many inputs in one request.