> ## 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.

# Batch Al

> Bir batch'in mevcut durumunu, sayımlarını ve sonuç dosyalarını alır.

## Genel Bakış

Bu uç nokta, TokenLab'nın OpenAI uyumlu Batch API'sinin bir parçasıdır. Batch işleri, yüklenen JSONL dosyalarını kullanır, asenkron olarak çalışır ve daha sonra çıktı/hata dosyalarını döndürebilir.

## Notlar

* Batch giriş dosyaları `purpose=batch` kullanmalıdır.
* `completion_window` şu anda `24h`'dir.
* Çıktı sıralaması garanti edilmez; her zaman `custom_id` ile eşleştirin.
* Batch öğeleri içinde akış desteği yoktur.

## Örnek

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

## İstek / Yanıt

Kesin şemayı almak için yukarıdaki etkileşimli OpenAPI panelini kullanın.

## Operasyonel İpuçları

* İdempotent aşağı akış uzlaştırması için `custom_id` kullanın.
* Çalışan batch'i tamamladıktan sonra yalnızca `output_file_id` ve `error_file_id` bekleyin.
* Batch fiyatlandırması, `isBatchRequest=true` indirim kuralları uygulandığı için senkron fiyatlandırmadan farklı olabilir.

## Yanıt örneği

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "id": "batch_abc123",
    "object": "batch",
    "status": "completed",
    "input_file_id": "file_abc123",
    "output_file_id": "file_out123",
    "error_file_id": null,
    "request_counts": { "total": 100, "completed": 98, "failed": 2 }
  }
  ```
</ResponseExample>

## Önemli alanlar

<ResponseField name="request_counts" type="object">Bu yanıtta dönen liste veya payload.</ResponseField>
<ResponseField name="output_file_id" type="string|null">İlgili API’lerde kullanılan file identifier.</ResponseField>
<ResponseField name="error_file_id" type="string|null">İlgili API’lerde kullanılan file identifier.</ResponseField>
