Example Usage
import { BatchSubmitBody } from "@openrouter/sdk/models";
let value: BatchSubmitBody = {
endpoint: "/v1/responses",
model: "Fiesta",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
callbackUrl | string | ➖ | HTTPS URL that receives a batch.completed, batch.failed, batch.cancelled or batch.expired webhook event when the batch reaches a terminal status. Must appear before requests in the request body. | |
completionWindow | models.BatchSubmitBodyCompletionWindow | ➖ | N/A | |
endpoint | models.Endpoint | ✔️ | N/A | |
input | models.BatchInputReference | ➖ | A batch input file in your own storage, named in place of requests. Available to allowlisted callers on Google Vertex BYOK endpoints only. | |
model | string | ✔️ | N/A | |
provider | models.BatchProviderPreferences | ➖ | Batch provider routing preferences. Only provider.only and provider.allow_fallbacks are supported. | { “only”: [ “google-vertex” ] } |
requests | models.RequestT[] | ➖ | The batch requests. Send exactly one of requests or input; requests must be the last field in the request body. |