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
| Flag | Type | Required | |
|---|---|---|---|
--max-completion-tokens | int | no | Upper bound on the number of tokens to generate. |
--messages | json | yes | The conversation so far: {role, content} objects (system, user, assistant). |
--model | string | yes | An OpenRelay public model id, e.g. openrelay/gpt-oss-120b. |
--stream | bool | no | Stream the response as Server-Sent Events. |
--max-cost | float64 | no | refuse (exit 8) when the worst-case cost exceeds this many dollars (default: ORL_MAX_COST_USD) |
--body | string | no | a JSON object of request body fields, merged under any of this command's own flags that are also set, e.g. {"key":"value"} |
--body-file | string | no | read the --body JSON object from a file (- for stdin) |
This wraps the createChatCompletion API operation.