> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Daftar Batch

> Mendaftar pekerjaan batch untuk organisasi kunci API saat ini.

## Ikhtisar

Endpoint ini adalah bagian dari Batch API yang kompatibel dengan OpenAI dari TokenLab. Pekerjaan batch menggunakan file JSONL yang diunggah, dijalankan secara asinkron, dan dapat mengembalikan file output/error nanti.

## Catatan

* File input batch harus menggunakan `purpose=batch`.
* `completion_window` saat ini adalah `24h`.
* Urutan output tidak dijamin; selalu cocokkan dengan `custom_id`.
* Streaming tidak didukung di dalam item batch.

## Contoh

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.tokenlab.sh/v1/batches?limit=20" \
    -H "Authorization: Bearer sk-your-api-key"
  ```
</RequestExample>

## Permintaan / Respons

Gunakan panel OpenAPI interaktif di atas untuk skema yang tepat.

## Tips Operasional

* Gunakan `custom_id` untuk rekonsiliasi downstream yang idempotent.
* Harapkan `output_file_id` dan `error_file_id` hanya setelah pekerja menyelesaikan batch.
* Harga batch mungkin berbeda dari harga sinkron karena aturan diskon `isBatchRequest=true` berlaku.

## Contoh respons

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "object": "list",
    "data": [{ "id": "batch_abc123", "object": "batch", "status": "completed" }]
  }
  ```
</ResponseExample>

## Field penting

<ResponseField name="object" type="string">Tipe object respons.</ResponseField>
<ResponseField name="data" type="array">Daftar atau payload yang dikembalikan respons ini.</ResponseField>
<ResponseField name="status" type="string">Status lifecycle saat ini untuk resource ini.</ResponseField>
