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

orl estimate

Bound what a batch file or a token count will cost, before anything runs, part of the orl CLI for OpenRelay GPU VMs, pods, batches and billing.

orl estimate

Reads a batch input (a local JSONL file, or an uploaded file id) or a token count and prices it from the public price list, which is what billing charges. Prompt tokens are bounded the way the gateway bounds them (request bytes / 3, plus 2,048 per image) and output tokens by each record's max_tokens. A standard batch bills half of each line; expedited bills the online rate. A record with openrelay.tool_config has no bound: the batch worker calls the model once per tool round.

With --max-cost it is a guard: exit 8 when the bound exceeds the cap or cannot be computed.

Flags

FlagTypeRequired
--input-filestringnolocal batch input (JSONL, one request per line)
--input-file-idstringnoan uploaded batch input file id (file-...)
--modelstringnomodel id, to price a token count instead of a file
--input-tokensintnoprompt tokens, with --model
--output-tokensintnooutput tokens, with --model
--prioritystandard, expeditednobatch tier (a file is always a batch; a token count is online unless this is set)
--assume-output-tokensintnooutput tokens to assume for records that set no max_tokens (otherwise their cost has no bound)
--max-costfloat64nofail (exit 8) when the bound exceeds this many dollars

On this page