Configure price caps for video and AI workloads on a Livepeer gateway. Covers maxPricePerUnit, maxPricePerCapability, Live AI interval pricing, USD conversion via Chainlink, and setting caps by operational mode.
Gateways pay Orchestrators. They do not charge clients. The flags on this page control configuration options for what controlling compute job costs.
Gateways set price caps that control the maximum amount paid to Orchestrators per job.
These caps apply regardless of operational mode - both on-chain and off-chain gateways configure the same pricing flags.
The Operational mode determines context: on-chain gateways filter Orchestrators from an open marketplace, while off-chain gateways set safety ceilings for known Orchestrators specified via -orchAddr.
Livepeer workload fees are denominated in ETH (wei), with an option to configure caps in USD (converted at runtime via a Chainlink price feed).Gateways set caps on prices they are willing to pay. When the Gateway selects an Orchestrator, it checks the Orchestrator’s advertised price against the cap.
Any Orchestrator above the cap is skipped for that job. If no Orchestrator is within the cap, the job fails unless -ignoreMaxPriceIfNeeded is enabled.
Video transcoding is priced per pixel. The gateway calculates fees based on the resolution and length of each transcoded segment. Video transcoding requires on-chain operational mode.Key flags:Fee calculation: The effective cap is maxPricePerUnit wei per pixelsPerUnit pixels. A 1920x1080 frame contains 2,073,600 pixels. With a cap of 1,000 wei per pixel and pixelsPerUnit of 1, that frame costs at most 2,073,600 wei (about 0.000002 ETH).Most operators leave pixelsPerUnit at the default of 1 and adjust only -maxPricePerUnit.
To configure caps in USD instead of wei, pass a USD value:
Copy
Ask AI
-maxPricePerUnit 0.02USD
This requires a Chainlink ETH/USD price feed configured via -priceFeedAddr. The gateway converts the USD cap to wei at runtime using the oracle price.
A gateway configured with a fixed wei cap pays more or less in USD terms as ETH price moves. USD-denominated pricing with a Chainlink feed stabilises the effective cost but requires the oracle to be reachable and accurate.
AI workloads are priced differently from video. Each pipeline and model can have its own price cap, and the unit of measurement varies by pipeline type. AI pricing applies to both on-chain and off-chain operational modes.
The AI payment system uses three models depending on the pipeline:The live-video-to-video pipeline uses interval-based payments controlled by -livePaymentInterval. All other AI pipelines use per-pixel or per-request models based on their output type.
Use -maxPricePerCapability to set per-pipeline caps as a JSON structure. This flag accepts either a JSON string directly or a path to a JSON file.Example maxPrices.json:
Use "model_id": "default" to apply a cap to all models in a pipeline. Specific model caps and a default fallback can coexist in the same file - the specific model match takes precedence.
Pipeline-specific units:
Image and video pipelines (text-to-image, image-to-image, image-to-video): price is per pixel (width x height x outputs).
Audio pipelines (audio-to-text): price is per millisecond of audio.
LLM pipelines: price is per token where supported.
Live video (live-video-to-video): interval-based; see below.
For the live-video-to-video pipeline, the gateway sends periodic payments instead of per-frame or per-request. The interval is configured with:
Copy
Ask AI
-livePaymentInterval 5s
The default is 5 seconds. Orchestrators receive a payment every interval for the duration of the live session. A shorter interval means more frequent, smaller payments; a longer interval means fewer, larger ones.
Discover current rates:Query Livepeer Explorer for the cheapest Orchestrators currently active on the required pipeline. Alternatively, use livepeer_cli to view connected Orchestrator pricing.
Set the cap with headroom:
Find the cheapest active Orchestrators on the required pipeline.
Set the cap 20 to 30 percent above their current rate. This provides headroom during gas spikes without overpaying.
Monitor job success rates. If jobs fail frequently, raise the cap. If all jobs succeed consistently, try lowering it gradually.
Orchestrator pricing behaviour:
Orchestrators can set per-gateway prices using -pricePerGateway, giving specific gateways custom rates based on relationships or volume.
Some Orchestrators enable autoAdjustPrice, which shifts their advertised rate based on current gas costs. A tight cap can briefly knock all Orchestrators out of range during a gas spike.
Set the cap based on agreed rates:
Confirm the pricing terms with the known Orchestrators.
Set the cap at or slightly above the agreed rate.
The cap prevents cost spikes if an Orchestrator raises prices unexpectedly. Jobs fail instead of overpaying.Using the community signer:When using the community remote signer at signer.eliteencoder.net for testing, Orchestrator pricing may be pre-negotiated. Set a reasonable cap and adjust based on job success rates.
Adjust pricing without restarting the gateway via the internal HTTP API:
Copy
Ask AI
# Set video pricingcurl -X POST http://127.0.0.1:5935/setBroadcastConfig \ -d "maxPricePerUnit=5000000&pixelsPerUnit=1"# Set AI pipeline cap at runtimecurl -X POST http://127.0.0.1:5935/setMaxPriceForCapability \ -d '{"pipeline":"text-to-image","model_id":"default","price_per_unit":4768371,"pixels_per_unit":1}'
Use the interactive CLI tool and select Option 16: Set broadcast config to update video pricing interactively.