- Individual flags (highest priority)
- The
--bodyflag with a JSON string - Stdin piping
Individual flags
Use a dedicated flag for each field. This is the most discoverable option and the easiest to use with shell tab-completion:--help shows every flag the command accepts, along with required ones and enum options.
The --body flag
Send the full request body as a single JSON string. Useful when you already have the body formed — for example, from another tool or a test fixture:
Stdin piping
Pipe JSON into any command that accepts a body. This is the right pick for scripting, chaining commands, or reading bodies out of files:Priority chain
When more than one source supplies the same field, the higher-priority source wins:| Priority | Source | Typical use |
|---|---|---|
| 1 (highest) | Individual flags | One-off tweaks, scripted parameters |
| 2 | --body flag | Inline-formed JSON body |
| 3 (lowest) | Stdin | Piped or file-sourced JSON |
Chain commands together
Because each command prints JSON to stdout (when you pass--output-format json), you can feed one call into the next:
--output-format and --jq.
File inputs
File-upload commands (llm files upload, llm speech transcribe, llm extract extract, and similar) take a path with --file.
The CLI reads the file and sends it as multipart form data:
llm speech speak) support --output-file to write the payload to a path instead of printing it:
--output-b64 when you want the binary base64-encoded on stdout instead.