This tutorial runs a complete local AI inference pipeline: a gateway receives a client request, routes it to a local orchestrator, the orchestrator processes it through an AI runner container, and the result returns to the caller. Estimated time: 2 to 3 hours (most of this is model download time). What you will verify:
- The gateway routes an inference request to the orchestrator
- The orchestrator processes it through the AI runner
- The response returns through the gateway to the caller
- Each step is visible in the respective logs
Pipeline architecture
Prerequisites
No ETH wallet, Arbitrum RPC, or on-chain registration required. This tutorial runs off-chain.Step 1: Download the model
Download the model weights before starting either process. Both the orchestrator and AI runner need the weights present at startup.Step 2: Write aiModels.json
price_per_unit sets the orchestrator’s sell-side price. The gateway’s buy-side cap must be at or above this value for the job to route. In Step 4 the gateway is started with no explicit price cap, so it accepts any price.
Step 3: Start the orchestrator
In a terminal, start the orchestrator in off-chain mode with the AI worker:Expected warm-model startup log
127.0.0.1:8935.
Step 4: Start the gateway
In a new terminal, start an off-chain AI gateway pointing at the local orchestrator. The community remote signer handles payment operations:-orchAddr http://127.0.0.1:8935- points directly at the local orchestrator (off-chain mode bypasses on-chain discovery)-httpIngest- enables the AI inference HTTP endpoints-remoteSignerAddr- community remote signer for payment ticket signing (no wallet needed)- Separate
-cliAddrand-httpAddrfrom the orchestrator’s ports (7936 and 8936 vs 7935 and 8935)
The remote signer at
signer.eliteencoder.net is a community-hosted service for testing. Check availability in #local-gateways on Discord before you start.Expected gateway startup log
{"status":"ok"}
Step 5: Send an inference request through the gateway
Send atext-to-image request through the gateway on port 8936. Keep port 8935 for the gateway-to-orchestrator hop:
pipeline-output.png: PNG image data with a non-zero file size.
Step 6: Trace the request through logs
The request left footprints in each component. Read the logs to understand what happened at each hop: Gateway log - shows routing decision and payment signing:Expected gateway log entries
Expected orchestrator log entries
What happened
The request completed the full Livepeer AI pipeline:- The curl request hit the gateway at
:8936on the/text-to-imageendpoint. - The gateway selected the local orchestrator at
:8935(the only option via-orchAddr), signed a payment ticket using the community remote signer, and forwarded the job request. - The orchestrator received the job, forwarded it to the AI runner container via Docker-out-of-Docker, and waited for the result.
- The AI runner loaded the SDXL-Lightning model from VRAM (it was pre-warmed), ran 4 diffusion steps, and returned a PNG.
- The orchestrator returned the result to the gateway and evaluated the payment ticket (in off-chain mode, settlement is handled by the remote signer instead of the Arbitrum TicketBroker).
- The gateway returned the PNG to the curl client.
Related pages
Gateway-Orchestrator Interface
Production combined deployment: port allocation, self-routing, and pricing alignment.
AI Inference Operations
Full aiModels.json reference and pipeline architecture concepts.
Gateway Relationships
How gateways discover and select orchestrators in production.
Realtime AI Tutorial
The live video-to-video pipeline - streaming AI instead of batch inference.