Developer preview

The Maraya API

Generate images and video from your own app, workflow, or bot with a single REST call. Same models that power the Maraya studio and the Telegram bot.

API keys

Scoped keys per project, rotate anytime.

Fast queueing

Priority lanes on Pro and Studio plans.

Image + video

One client for both generation types.

Quickstart

cURL
curl https://api.maraya.ai/v1/images/generate \
  -H "Authorization: Bearer $MARAYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "maraya-xl",
    "prompt": "a lighthouse made of stained glass, storm at sea",
    "aspect_ratio": "1:1",
    "n": 4
  }'
JavaScript
import Maraya from "@maraya/sdk";

const maraya = new Maraya({ apiKey: process.env.MARAYA_API_KEY });

const generation = await maraya.images.generate({
  model: "maraya-xl",
  prompt: "a lighthouse made of stained glass, storm at sea",
  aspectRatio: "1:1",
  n: 4,
});

console.log(generation.images);

Endpoints

POST/v1/images/generateGenerate one or more images from a text prompt.
POST/v1/images/editEdit or restyle an existing image with a prompt.
POST/v1/video/generateGenerate a short video clip from a text or image prompt.
GET/v1/generations/{id}Retrieve the status and output of a generation job.
GET/v1/modelsList available models and their capabilities.

Rate limits

Free keys are limited to 10 requests/min. Pro and Studio plans get higher throughput and priority queueing — see pricing.

Authentication

All requests use a bearer token. Create and manage keys from your account settings once you're signed in.

Looking for tutorials instead of raw endpoints? Check the guides.