Skip to main content

Documentation 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.

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 both @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 npm or pnpm
  • Python 3.11 or later, with pip
The network does the GPU work. Your machine only sends the request and receives a URL.

First Call

1

Send a POST request

The community gateway accepts unauthenticated POSTs at /text-to-image. Pick your client below.
curl -X POST https://dream-gateway.livepeer.cloud/text-to-image \
  -H "Content-Type: application/json" \
  -d '{
    "model_id": "ByteDance/SDXL-Lightning",
    "prompt": "A coffee shop at sunset, photorealistic",
    "width": 1024,
    "height": 1024
  }'
2

Inspect the response

The gateway returns a JSON object with an images array. Each image has a hosted URL, a deterministic seed, and an NSFW classifier flag.
{
  "images": [
    {
      "url": "https://dream-gateway.livepeer.cloud/stream/d0fc1fc6/8fdf5a94.png",
      "seed": 2562822894,
      "nsfw": false
    }
  ]
}
The url is publicly fetchable.
3

Download the image

curl -O https://dream-gateway.livepeer.cloud/stream/d0fc1fc6/8fdf5a94.png
Open the downloaded .png. That image was generated on a GPU run by an independent orchestrator on the Livepeer network.

SDK Path

The same call works through the official SDKs. Pick the language that matches your project.
Install the package:
npm install @livepeer/ai
Call the gateway:
import { Livepeer } from '@livepeer/ai';

const livepeer = new Livepeer({
  serverURL: 'https://dream-gateway.livepeer.cloud',
});

const result = await livepeer.generate.textToImage({
  modelId: 'ByteDance/SDXL-Lightning',
  prompt: 'A coffee shop at sunset, photorealistic',
  width: 1024,
  height: 1024,
});

console.log(result.imageResponse?.images[0]?.url);
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 by ai-runner. Two models are kept warm on the network and respond immediately:
ModelNotes
ByteDance/SDXL-LightningFast, four-step inference. Recommended default
SG161222/RealVisXL_V4.0_LightningPhotorealistic, four-step variant
Other supported models (cold-start on first request, then warm):
  • stabilityai/stable-diffusion-xl-base-1.0
  • SG161222/Realistic_Vision_V6.0_B1_noVAE
  • runwayml/stable-diffusion-v1-5
  • prompthero/openjourney-v4
  • stabilityai/sd-turbo, stabilityai/sdxl-turbo (limited-commercial licence)
A cold model takes between 30 seconds and a few minutes for the first response while an orchestrator loads it into GPU memory. For all available pipelines (image-to-image, image-to-video, audio-to-text, LLM, and more), see .

Common Errors

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.
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.
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.
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.
The community gateway is shaped for experimentation. Production workloads should run against a paid gateway or a self-hosted gateway. See .
You now have a working inference call against the Livepeer network. The AI pipelines page documents all nine batch endpoints with request schemas and curl examples for each.

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.
Last modified on May 19, 2026