POST
/v1/batches/{batch_id}/cancel

Path Parameters

batch_id*string
Formatuuid

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/batches/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel"
{
  "id": "string",
  "status": "pending",
  "window": "24h",
  "request_count": 0,
  "created_at": "string",
  "updated_at": "string",
  "completed_at": "string",
  "total_prompt_tokens": 0,
  "total_completion_tokens": 0,
  "total_tokens": 0,
  "total_cost_micros": 0
}
{
  "status_code": 400,
  "detail": "Bad Request",
  "extra": {}
}
GET
/v1/batches

Response Body

application/json

curl -X GET "https://example.com/v1/batches"
{
  "items": [
    {
      "id": "string",
      "status": "pending",
      "window": "24h",
      "request_count": 0,
      "created_at": "string",
      "updated_at": "string",
      "completed_at": "string",
      "total_prompt_tokens": 0,
      "total_completion_tokens": 0,
      "total_tokens": 0,
      "total_cost_micros": 0
    }
  ]
}
POST
/v1/batches

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/batches" \  -H "Content-Type: application/json" \  -d '{    "requests": [      {        "body": {          "property1": null,          "property2": null        }      }    ]  }'
{
  "id": "string",
  "status": "pending",
  "window": "24h",
  "request_count": 0,
  "created_at": "string",
  "updated_at": "string",
  "completed_at": "string",
  "total_prompt_tokens": 0,
  "total_completion_tokens": 0,
  "total_tokens": 0,
  "total_cost_micros": 0
}
{
  "status_code": 400,
  "detail": "Bad Request",
  "extra": {}
}
GET
/v1/batches/{batch_id}

Path Parameters

batch_id*string
Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/batches/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "id": "string",
  "status": "pending",
  "window": "24h",
  "request_count": 0,
  "created_at": "string",
  "updated_at": "string",
  "completed_at": "string",
  "total_prompt_tokens": 0,
  "total_completion_tokens": 0,
  "total_tokens": 0,
  "total_cost_micros": 0
}
{
  "status_code": 400,
  "detail": "Bad Request",
  "extra": {}
}
GET
/v1/batches/{batch_id}/results

Path Parameters

batch_id*string
Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/batches/497f6eca-6276-4993-bfeb-53cbbbba6f08/results"
{
  "batch_id": "string",
  "status": "pending",
  "output_url": "string",
  "completed_at": "string",
  "results": [
    {
      "property1": null,
      "property2": null
    }
  ]
}
{
  "status_code": 400,
  "detail": "Bad Request",
  "extra": {}
}
GET
/v1/batches/{batch_id}/results.jsonl

Path Parameters

batch_id*string
Formatuuid

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/batches/497f6eca-6276-4993-bfeb-53cbbbba6f08/results.jsonl"
"string"
{
  "status_code": 400,
  "detail": "Bad Request",
  "extra": {}
}