Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
CLICommands

orl chat-completions create

Generate a chat completion, part of the orl CLI for OpenRelay GPU VMs, pods, batches and billing. Usage, every flag and an example.

orl chat-completions create --messages <messages> --model <model>

Generates a model response for a conversation in the OpenAI Chat Completions shape, from any model whose supported APIs include chat completions. The hand-written orl chat is the friendlier front for this operation: model name completion, a readable transcript, and streaming output rendered to the terminal.

Requires a funded balance. Set "stream" to true to receive the completion incrementally as Server-Sent Events, ending with a data: [DONE] sentinel. The request body is capped at 10 MiB.

Flags

FlagTypeRequired
--max-completion-tokensintnoUpper bound on the number of tokens to generate.
--messagesjsonyesThe conversation so far: {role, content} objects (system, user, assistant).
--modelstringyesAn OpenRelay public model id, e.g. openrelay/gpt-oss-120b.
--streamboolnoStream the response as Server-Sent Events.
--max-costfloat64norefuse (exit 8) when the worst-case cost exceeds this many dollars (default: ORL_MAX_COST_USD)
--bodystringnoa JSON object of request body fields, merged under any of this command's own flags that are also set, e.g. {"key":"value"}
--body-filestringnoread the --body JSON object from a file (- for stdin)

This wraps the createChatCompletion API operation.

On this page