Skip to content

Get Status of a Batch

Retrieve the current progress and final results of a specific message batch.

Endpoint

GET https://llm.siraya.pro/v1/batches/{batch_id}

Path Parameters

Parameter Type Required Description
batch_id string Yes The unique identifier of the batch.

Example Request

curl https://llm.siraya.pro/v1/batches/batch_abc123 \
  -H "Authorization: Bearer <API_KEY>"
import requests

url = "https://llm.siraya.pro/v1/batches/batch_abc123"
headers = {"Authorization": "Bearer <API_KEY>"}

response = requests.get(url, headers=headers)
print(response.json())

Response Body

The response contains the current status, progress information, and the results if the batch is completed.

Status Description
pending The batch has been received and is waiting to start.
processing The batch is currently being processed by the underlying models.
completed All requests in the batch have been processed.
failed The batch encountered an error during processing.
cancelled The batch was manually cancelled by the user.

Completed Response Example

{
  "id": "batch_abc123",
  "status": "completed",
  "results": [
    {
      "custom_id": "request-1",
      "response": {
        "status": 200,
        "body": {
          "choices": [{"message": {"role": "assistant", "content": "Hello!"}}]
        }
      }
    }
  ]
}