LogoMkSaaS Docs
LogoMkSaaS Docs
Homepage

Getting started

Welcome to rlay.aiQuickstartMigrate from fal.ai

Endpoints

Generate imagesGenerate videosError codes
X (Twitter)

Migrate from fal.ai

Drop-in SDK replacement — change one line, save 30-50%

rlay.ai is API-compatible with fal.ai. The fastest migration is: change base_url, swap your key, keep everything else.

Python

# Before
from fal_client import submit
fal_key = "fal-..."

# After
from fal_client import submit
fal_key = "rlay_sk_..."
fal_base_url = "https://api.rlay.ai"

Node

// Before
import * as fal from '@fal-ai/client';
fal.config({ credentials: 'fal-...' });

// After
import * as fal from '@fal-ai/client';
fal.config({
  credentials: 'rlay_sk_...',
  apiUrl: 'https://api.rlay.ai',
});

OpenAI SDK

For LLM endpoints, point the OpenAI SDK at our base URL:

import OpenAI from 'openai';
const client = new OpenAI({
  apiKey: 'rlay_sk_...',
  baseURL: 'https://api.rlay.ai/v1',
});

Endpoint mapping

fal.ai endpointrlay endpoint
fal-ai/flux-pro/v1/images (model: flux-2)
fal-ai/veo-3/v1/videos (model: veo-3.1)
fal-ai/kling-video/v1/videos (model: kling-3)
fal-ai/suno-music/v1/music (model: suno-5.5)

Parameter names match wherever possible. See the models page for the full mapping.

Generate images→

Flux 2 + GPT Image + Midjourney

Generate videos→

Async polling pattern

Table of Contents

Python
Node
OpenAI SDK
Endpoint mapping