Submit
Submit a new batch job. Pass either a local JSONL path, which the CLI uploads for you withpurpose=batch-api, or the ID of a file you already uploaded. Each request names its model in its JSONL body. There is no model flag.
API is required and must be one of chat.completions, audio.transcriptions, or audio.translations. You can pass it positionally or with --api.
Parameters
On success, the command prints a job summary and the exact
tg batches get command for checking progress. Pass --json for the full create response (including any warning). If the API returns no job, the command exits with status 1.
List
List batch jobs, newest first.tg batches ls.
Parameters
Retrieve
Get details for a specific batch job.tg batches get.
The output shows the created and completed times, the API, the model, the output and error file IDs, and the status, with a progress bar while the job is VALIDATING or IN_PROGRESS. Once the job has finished and has files to download, the command prints the matching tg batches download command.
Download
Download the batch output file and, when present, the error file.--output to stream the output file to stdout. Pass --output with a file or directory path to save the files to disk instead. When the job has both an output and an error file, the error file is written as <stem>.errors<suffix> next to the output file so it never overwrites your results. With --json, --output is required, and the JSON response lists the saved paths.
Parameters
The job must have reached a terminal status (
COMPLETED, FAILED, EXPIRED, or CANCELLED) before you can download anything. Use tg batches get to check progress while itβs still running.
Cancel
Cancel a batch job.--json for the raw batch object instead.