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

# Toplu Oluştur

> Yüklenen bir girdi dosyasından OpenAI uyumlu bir toplu iş oluşturur.

## Genel Bakış

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

## Notlar

* Toplu girdi dosyaları `purpose=batch` kullanmalıdır.
* `completion_window` şu anda `24s`.
* Çıktı sıralaması garanti edilmez; her zaman `custom_id` ile eşleştirin.
* Toplu öğeler içinde akış desteği yoktur.
* Şu anda desteklenen toplu öğe uç noktaları `/v1/chat/completions` ve `/v1/embeddings`tir; native Responses toplu yürütücüsü hazır olana kadar `/v1/responses` toplu işleri reddedilir.

## Örnek

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.tokenlab.sh/v1/batches" \
    -H "Authorization: Bearer sk-your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "input_file_id": "file_abc123",
      "endpoint": "/v1/chat/completions",
      "completion_window": "24h"
    }'
  ```
</RequestExample>

## İstek / Yanıt

Tam şema 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.
* `output_file_id` ve `error_file_id`'yi yalnızca işçi toplu işi tamamladıktan sonra bekleyin.
* Toplu fiyatlandırma, `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",
    "endpoint": "/v1/chat/completions",
    "input_file_id": "file_abc123",
    "completion_window": "24h",
    "status": "validating",
    "output_file_id": null,
    "error_file_id": null,
    "created_at": 1706000000
  }
  ```
</ResponseExample>

## Önemli alanlar

<ResponseField name="id" type="string">Sonraki çağrılar ve support için kullanılan identifier.</ResponseField>
<ResponseField name="status" type="string">Bu kaynağın güncel lifecycle durumu.</ResponseField>
<ResponseField name="output_file_id" type="string|null">İlgili API’lerde kullanılan file identifier.</ResponseField>
