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

orl async job create

Create an async job, part of the orl CLI for OpenRelay GPU VMs, pods, batches and billing. Usage, every flag and an example.

orl async job create --completion-window <completion-window>

Submit requests as a job, for delivery within 1 hour (20% off the Sync price) or within 24 hours (50% off Sync). Send them inline (requests, up to 1,000) or as an uploaded input file (input_file_id); provide exactly one of the two. Each line names its url (/v1/chat/completions, /v1/messages or /v1/embeddings) and the body that endpoint takes, and a job may mix models and endpoints. Every line is checked when the job is created, with the Batch API's record rules: a line that breaks one is rejected and the rest are accepted. The answer counts the rejections in rejected_count, lists the first 100 in rejected_records, and rejected_records_file_id names a file holding all of them; a rejected line never runs, is never billed, and counts as failed. When no line can run, the answer is 400 no_valid_records and nothing is created. A request not started before deadline_at expires at no charge; one that started finishes and is charged. A 1-hour job holds up to 10,000 requests and a 24-hour job up to 50,000.

Flags

FlagTypeRequired
--idempotency-keystringnoMakes a retried create safe. Choose one value per create you mean to make, 1 to 512 bytes (bytes, not characters), such as a UUID, and send it again on every retry of that create. The first request with a key runs, and a 2xx answer is kept for 24 hours: a repeat with the same key and the same body gets that answer back, with the same status and the header Idempotent-Replayed: true, and creates nothing. A batch create compares the body byte for byte; a VM or pod create compares the fields it decodes, so whitespace and key order do not count. A repeat while the first request is still running answers 409; repeat it a second later. The same key with a different body answers 422. An answer other than a 2xx is not kept, so a retry after a 4xx or a 5xx runs again. A 2xx too large to keep holds the key without it: every repeat answers 409 and creates nothing. Keys are scoped to the organization and the operation.
--completion-window1h, 24hyesThe delivery window, which sets the price tier.
--input-file-idstringnoId of an uploaded JSONL input file (purpose batch).
--metadatamap[string]stringnoKey-value pairs echoed back on the job, at most 32 pairs.
--requestsjsonnoInline request lines, an alternative to input_file_id.
--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 createAsyncJob API operation.

On this page