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

orl chat

Send one chat completion to a model and print the answer, part of the orl CLI for OpenRelay GPU VMs, pods, batches and billing.

orl chat [prompt]

Sends the prompt (the argument, or stdin when it is not a terminal) as a user message to POST /v1/chat/completions on the inference endpoint. --body sends a whole request instead (messages, tools, response_format, ...). Under --json the answer comes with the request id, latency, token usage and the server's cost for the request (cost_nano_usd); against a server that sends no cost, the list price of the usage instead (list_cost_nano_usd).

--max-cost (or ORL_MAX_COST_USD) refuses the call before it is sent when its worst case is over the cap; the worst case needs --max-tokens.

Flags

FlagTypeRequired
--modelstringnomodel id (orl models lists them)
--systemstringnoa system message before the prompt
--max-tokensintnocap on output tokens (needed for a cost cap)
--temperaturefloat64nosampling temperature
--bodyjsonnoa whole chat completion request instead of the prompt (--model overrides its model)
--max-costfloat64norefuse (exit 8) when the worst-case cost exceeds this many dollars (default: ORL_MAX_COST_USD)
--timeoutstringnogive up after this long (default 35m; over MCP at most 10m)
--streamboolnoprint the answer as it is generated (and report time to first token)

On this page