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

# Batch jobs

> Ask the same questions of thousands or millions of records, without managing concurrency or rate limits.

Use a batch when you don’t need answers right away: labeling a table, back-filling a field, or auditing last month’s decisions.

## 1. Write a JSONL file

One record per line. `custom_id` is yours; it comes back with each result.

```json theme={null}
{"custom_id": "ticket-88213", "state": "The charger got really hot and the casing melted near the plug.", "questions": {"safety": {"type": "noul", "instructions": "Does this describe a product safety risk?"}}}
{"custom_id": "ticket-88214", "state": "Where is my order? It was due Tuesday.", "questions": {"safety": {"type": "noul", "instructions": "Does this describe a product safety risk?"}}}
```

## 2. Submit it and wait

```python theme={null}
job = client.batches.create(model="tacet-alpha", input_file="tickets.jsonl")
job = client.batches.wait(job.id)   # polls until the job finishes

for row in client.batches.results(job.id):
    if row.answers["safety"].probs["yes"] > 0.9:
        flag_for_review(row.custom_id)
```

You can also check progress in the console or with `client.batches.get(job.id)`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.