LogoMkSaaS Docs
LogoMkSaaS Docs
Homepage

Getting started

Welcome to rlay.aiQuickstartMigrate from fal.ai

Endpoints

Generate imagesGenerate videosError codes
X (Twitter)

Quickstart

Sign up, grab a key, call any model — under 60 seconds

1. Sign up

Create a free account at /auth/register. Email or GitHub — $5 credit lands in your account immediately.

2. Grab an API key

In the dashboard, open API Keys and hit Create. Copy the rlay_sk_... token shown — it's only displayed once.

export RLAY_KEY="rlay_sk_..."

3. Call any model

curl https://api.rlay.ai/v1/images \
  -H "Authorization: Bearer $RLAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"flux-2","prompt":"a fox reading rust docs"}'
from rlay import Rlay

client = Rlay(api_key="rlay_sk_...")
image = client.images.generate(
    model="flux-2",
    prompt="a fox reading rust docs",
)
print(image.url)
import { Rlay } from 'rlay';

const client = new Rlay({ apiKey: 'rlay_sk_...' });
const image = await client.images.generate({
  model: 'flux-2',
  prompt: 'a fox reading rust docs',
});
console.log(image.url);

For long-running work (video, music) you'll get a jobId back instead of a direct result. Poll /v1/jobs/{jobId} until status === 'completed'.

Generate videos→

Async polling pattern for Veo / Sora / Kling

Migrate from fal.ai→

Drop-in SDK swap

Error codes→

Handle 401 / 402 / 429 / 5xx

Table of Contents

1. Sign up
2. Grab an API key
3. Call any model