Skip to main content
Every command that accepts a request body supports three ways of supplying it:
  1. Individual flags (highest priority)
  2. The --body flag with a JSON string
  3. Stdin piping
They can be combined — the CLI merges them and higher-priority sources overwrite lower-priority ones at the field level.

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:
Individual flags still override the body at the field level:

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:
Individual flags override stdin values as well:

Priority chain

When more than one source supplies the same field, the higher-priority source wins: The CLI merges object keys, so you can mix and match: pipe the bulk of the body through stdin, then override a single field with a flag.

Chain commands together

Because each command prints JSON to stdout (when you pass --output-format json), you can feed one call into the next:
See format and filter output for more on --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:
Binary responses (for example, llm speech speak) support --output-file to write the payload to a path instead of printing it:
Use --output-b64 when you want the binary base64-encoded on stdout instead.