Send chat completions to any Gumloop-supported model from the terminal.
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.
gumloop chat completions create "Capital of Canada?" -m claude-sonnet-4-5
By default, output streams to your terminal when stdout is a TTY. When it isn’t, for example when piped to a file or another command, the CLI buffers the output into a single response. Pass --stream or --no-stream to be explicit. A structured request can also set stream; explicit flags take precedence.
Flag
Description
-m, --model
Required. Model slug (for example claude-sonnet-4-5, gpt-4o-mini, gemini-2.5-pro). Chat needs a concrete model, so gumloop-chew (the Autorouter) isn’t valid here. Preview a choice with POST /models/route first, then complete.
-s, --system
System message prepended to the conversation. Repeatable.
--message-stdin -
Read the user message from stdin instead of the positional argument.
--max-completion-tokens
Cap on completion tokens.
--temperature
Sampling temperature.
--modality
Output modality. Repeatable, for example --modality image --modality text for image-generation models.
--schema-file
Path to a JSON Schema file. Sent as response_format={"type": "json_schema", ...} for structured output.
--schema-name
Name to attach to the schema (defaults to schema).
--args-file, --args-json, --args -
Full SDK request as a JSON object, from a file, inline JSON, or stdin. Choose one source.
--stream / --no-stream
Force or suppress streaming. When neither a flag nor the request JSON specifies streaming, streams only if stdout is a TTY and --json is absent. Explicit flags override the request JSON.
--json
Print the response as JSON. With --stream, emits newline-delimited JSON (one chunk per line).
gumloop chat completions create "Return JSON with the capital of Canada." \ -m claude-sonnet-4-5 \ --schema-file ./capital.schema.json \ --schema-name capital \ --json
gumloop chat completions create "A red maple leaf on white" \ -m gpt-image-2.5-flare \ --modality image --modality text \ --json
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.Human output prints text. Use --json to retain images, including choices[0].delta.images in streamed chunks. Image generation options belong in image_config in a structured request.
Replace the placeholders with a vision-capable model ID and an encoded image. Vision analyzes an input image. Text-to-image generation uses an image-capable model and the image output modalities described above.Reference-image editing additionally requires the backend image-input adapter and a supported image-generation model. Supply inline base64 image_url content with image output modalities. Remote image URLs and storage paths are refused by that adapter; MIME, decoded size, and model limits apply. This capability depends on backend deployment rather than the CLI installation alone.