Documentation Index
Fetch the complete documentation index at: https://docs.livepeer.org/llms.txt
Use this file to discover all available pages before exploring further.
The
live-video-to-video (Cascade) pipeline operates as a persistent streaming session instead of a discrete request-response exchange. Standard per-pixel or per-request billing does not map naturally to this model. Instead, Livepeer uses per-second compute billing for live AI: the gateway pays for the time the orchestrator’s GPU is actively running inference for the session.
Fee Calculation
TheLivePaymentSender interface in go-livepeer handles per-second fee calculation and ticket generation for live AI sessions. It calculates the fee based on:
- Elapsed seconds since the last payment was sent
- Configured cost per hour advertised by the orchestrator
Configuring Pricing
Orchestrators set per-second pricing for AI pipelines inaiModels.json. The pricing field is price_per_unit, and for live AI the unit is one second of inference time:
price_per_unit is in wei per second. 1000000000000000 wei = 0.001 ETH per second = 3.6 ETH per hour.
Gateways set a maximum acceptable price via -maxPricePerUnit. Orchestrators whose price_per_unit exceeds this maximum are excluded from selection for that session.
State Management
Per-second billing requires stateful bookkeeping: the gateway must track how much time has elapsed since the last payment and how much ETH has been committed. In the remote signer model, this bookkeeping lives in the signer service instead of the gateway:- The gateway sends
signerState(the accumulated bookkeeping state from the previous signing call) with eachsignTicketrequest - The signer updates the state (records elapsed time, adjusts balance) and returns the updated
signerStatealongside the signed ticket - The gateway stores the returned state and sends it with the next request
Payment Intervals
The gateway sends payments at configurable intervals during the session, not per-frame. The interval is set to balance two concerns: payment frequency (more frequent = smaller per-ticket amounts, smaller ETH commitment per interval) and overhead (more frequent = more signing calls and on-chain submissions). For production live AI workloads, the go-livepeer default payment interval is adequate. Custom gateway implementations usinglivepeer-python-gateway inherit the interval logic from LivePaymentSender in the remote signer.
Per-second compute billing applies specifically to the
live-video-to-video pipeline. Batch AI pipelines (text-to-image, audio-to-text, etc.) use per-output-unit billing. See the individual pipeline reference pages for recommended pricing.Related Pages
Probabilistic Micropayments
How PM tickets and face values translate per-second fees to on-chain settlement.
Remote Signer
How the remote signer manages LivePaymentSender state for off-chain gateways.
Real-Time AI Overview
The Cascade pipeline that uses per-second compute billing.
Alt-Gateway Overview
Python gateway implementation that integrates with LivePaymentSender.