VORQ Docs
Concepts

Pricing and payment

How rates, unit counts, the escrow cap and the payment authorization fit together.

Every order states its own price. There is no price list the client accepts implicitly: you bid a rate for each side of the job, and a provider whose ask your bid meets claims it.

Rates are scaled integers

A rate is atomic token units per 1 000 000 units of work. A unit of work is a token for text and embeddings, a pixel for images and a pixel-second for video. Atomic units are the payment token's smallest unit (for a 6-decimal token, one millionth of a token).

Rates are uint128 on chain, beyond what a JavaScript number holds exactly, so the SDK takes them as bigint (or a digits-only string) and sends them as decimal strings. A fractional value such as "0.03" is refused.

Omit both rates and submit takes the market: the first provider the coordinator ranks, at its own ask. Omit only one and that side is a bid of zero: the order is posted, no provider asking more claims it, and it expires.

Two sides, two unit counts

The order signs rateIn and rateOut, and two unit counts the SDK derives from the request before sealing:

  • units_in: the input. For text and embeddings, one unit per four bytes of the canonical JSON input. For image and video, the reference assets you attach, in pixel-seconds.
  • units_out: the most output the job may bill. For text, the output-token ceiling you set; for images, pixels per image times the image count; for video, frame pixels times seconds.

The exact rules are in Units. unitsOut on submit overrides the derived output count.

The cap and the payment

The signed terms fix the most a job can cost, its cap:

cap = ceil((rateIn × units_in + rateOut × units_out) / 1 000 000)     (at least 1)

At submission the coordinator quotes an amount, and the client signs an EIP-3009 ReceiveWithAuthorization for it in the deployment's USDC token. For a batch the client computes the same amount per line itself:

amount = cap + floor(cap × feeBps / 10 000) + gas fee

feeBps is the protocol fee from client.chainContext(), and the gas fee comes from the quote. The client derives every other member of the authorization itself: it is payable to the job registry, valid until the order's expiry, and single-use because its nonce is the job id. A quote describing any other authorization is refused.

What a result reports

Each result's .cost is computed locally from the signed rates and the unit counts the result reports (token usage, delivered pixels or pixel-seconds), divided by 1 000 000, as an exact decimal string in atomic token units. Divide by 10 ** decimals from chainContext() for whole tokens. It covers the rate charge only; the protocol fee and gas fee are not included.

Finding a price

  • client.asks({ model }) lists each provider's published rates per window.
  • client.floors({ model, sla }) gives the cheapest input and output rate per window. The two minima may come from different providers.

Both take the model's integer id (Number(model.vorq.model_id) from client.models.list()), not its name. See Chain and market reads.

On this page