Skip to main content
Clients MAY send a JSON array of request objects (a JSON-RPC 2.0 batch). The server replies with an array containing exactly one response per request, in any order — so clients correlate by id.
Notice the middle member — a notification — produces no response entry, so a three-member batch yields a two-member array.

The rules

One member’s error never fails the others. Batching composes with capability gating and cancellation exactly as singleton requests do. Servers MAY cap batch size and reject an oversized batch with -32602.

Prefer array params for throughput

embed, embed/sparse, embed/multi, and rerank are inherently batched through their array parameters (inputs, passages). For high-throughput embedding or reranking, prefer those over wrapping many singleton calls in a JSON-RPC batch — they avoid per-request envelope overhead and let the server vectorise the whole set.