By the end of this quickstart you’ll have run a text-to-image inference call against the Livepeer network, downloaded the generated image, and seen the same call work through bothDocumentation Index
Fetch the complete documentation index at: https://na-36-handover-docs-v2-into-docs-v2-dev-20260518.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
@livepeer/ai (TypeScript) and livepeer-ai-python. The path needs only a terminal or a runtime.
The path runs against dream-gateway.livepeer.cloud, the free Cloud SPE Community Gateway. It is off-chain, public, and shaped for experimentation. Production workloads should run against a paid gateway or a self-hosted one; see for the trade-offs.
Required Tools
Pick one of the three paths below. You need exactly one:curl(any modern shell)- Node.js 20 or later, with
npmorpnpm - Python 3.11 or later, with
pip
First Call
Send a POST request
The community gateway accepts unauthenticated POSTs at
/text-to-image. Pick your client below.- curl
- Node (fetch)
- Python (requests)
Inspect the response
The gateway returns a JSON object with an The
images array. Each image has a hosted URL, a deterministic seed, and an NSFW classifier flag.url is publicly fetchable.SDK Path
The same call works through the official SDKs. Pick the language that matches your project.- @livepeer/ai (TypeScript)
- livepeer-ai-python
Install the package:Call the gateway:The SDK wraps the same REST surface and handles request shaping, error types, and retries.
Pipeline Models
The text-to-image pipeline accepts any diffusion model supported byai-runner. Two models are kept warm on the network and respond immediately:
| Model | Notes |
|---|---|
ByteDance/SDXL-Lightning | Fast, four-step inference. Recommended default |
SG161222/RealVisXL_V4.0_Lightning | Photorealistic, four-step variant |
stabilityai/stable-diffusion-xl-base-1.0SG161222/Realistic_Vision_V6.0_B1_noVAErunwayml/stable-diffusion-v1-5prompthero/openjourney-v4stabilityai/sd-turbo,stabilityai/sdxl-turbo(limited-commercial licence)
Common Errors
No orchestrator available for model
No orchestrator available for model
No orchestrator on the network currently has capacity for the requested model. Retry after a short wait, or pick one of the warm models above. The pipeline reference page lists which models are kept warm.
Cold model load (slow first request)
Cold model load (slow first request)
The first request to a non-warm model triggers an orchestrator to load weights into GPU memory. Subsequent requests against the same model are fast. The community gateway does not stream progress; the request blocks until the model is ready.
Validation error on `width` or `height`
Validation error on `width` or `height`
Most SDXL-family models accept multiples of 64 between 512 and 1024. Drop down to 768 or 1024 squared if a request fails on dimensions.
Rate limit on the community gateway
Rate limit on the community gateway
The community gateway is shared infrastructure. High-volume callers should move to a paid gateway or self-host. A paid gateway accepts the same request shape; pass a Bearer token in the
Authorization header.Next Steps
AI Pipelines
The eleven native pipelines, request shapes, and what each one solves.
AI SDKs Overview
Full SDK surface: error types, retries, streaming, batching.
Model Support
Warm models per pipeline, VRAM requirements, custom-model paths.
AI Image Generation App
Wrap this quickstart in a working Next.js app.