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:
mka1 llm responses create \
  --model auto \
  --input '"Summarize the support queue for yesterday."'
--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:
mka1 llm responses create --body '{
  "model": "auto",
  "input": "Summarize the support queue for yesterday."
}'
Individual flags still override the body at the field level:
# Final body: {"model":"auto","input":"A different prompt"}
mka1 llm responses create \
  --body '{"model":"auto","input":"Original prompt"}' \
  --input '"A different prompt"'

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:
# From a JSON file
mka1 llm responses create < request.json

# From another command
curl -s https://example.com/prompt.json | mka1 llm responses create

# Generated inline
echo '{"model":"auto","input":"Hello"}' | mka1 llm responses create
Individual flags override stdin values as well:
# Final body: {"model":"auto","input":"Overridden"}
echo '{"model":"auto","input":"From stdin"}' \
  | mka1 llm responses create --input '"Overridden"'

Priority chain

When more than one source supplies the same field, the higher-priority source wins:
PrioritySourceTypical use
1 (highest)Individual flagsOne-off tweaks, scripted parameters
2--body flagInline-formed JSON body
3 (lowest)StdinPiped or file-sourced JSON
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:
mka1 llm files upload \
  --file ./support-manual.pdf \
  --purpose assistants \
  --output-format json \
  --jq '{file_id: .id, purpose: .purpose}' \
  | mka1 llm vector-stores create-file --vector-store-id vs_123
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:
mka1 llm files upload --file ./dataset.jsonl --purpose fine-tune
Binary responses (for example, llm speech speak) support --output-file to write the payload to a path instead of printing it:
mka1 llm speech speak \
  --text 'Hello, welcome to our service.' \
  --output-file ./welcome.wav
Use --output-b64 when you want the binary base64-encoded on stdout instead.