Skip to main content
gumloop chat completions create is the terminal counterpart of the Python SDK call client.chat.completions.create(...). Every flag maps 1:1 to the matching SDK kwarg.

Create a completion

By default, output streams to your terminal when stdout is a TTY and is buffered into a single response when it isn’t (e.g. piped to a file or another command). Pass --stream or --no-stream to be explicit.

Pipe from stdin

Structured output

capital.schema.json:

Image generation

The response carries one or more image attachments on choices[0].message.images. Each entry is a data URL the caller can decode or render directly.

Streaming with machine output

--stream --json emits ndjson — one full chat.completion.chunk per line — so consumers can stitch deltas without re-parsing the full SSE wire format.
The CLI streams to TTYs by default. When redirecting stdout (> out.txt, | jq, CI pipes) it switches to unary so output is byte-stable.