LogoMkSaaS Docs
LogoMkSaaS Docs
Homepage

Getting started

Welcome to rlay.aiQuickstartMigrate from fal.ai

Endpoints

Generate imagesGenerate videosError codes
X (Twitter)

Generate images

Flux 2, GPT Image, Midjourney V7, Seedream

Image generation is synchronous — you get the result URL in the response body. No polling needed.

Endpoint

POST /v1/images

Request

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",
    "size": "1024x1024",
    "n": 1
  }'

Parameters

Prop

Type

Response

{
  "data": [
    {
      "url": "https://cdn.rlay.ai/...",
      "revised_prompt": "..."
    }
  ],
  "credits_used": 1.8
}

Available models

ModelBest forPrice
flux-2Photorealistic, 2K$0.018/img
gpt-imageText rendering, UI$0.025/img
midjourney-7Stylized, concept art$0.030/img
seedream-4Posters, CN scenarios$0.012/img
Generate videos→

Async polling pattern

Error codes→

401 / 402 / 429 / 5xx

Table of Contents

Endpoint
Request
Parameters
Response
Available models