Skip to content
Console
RUTY / DEVELOPERS

A small API. A lot of possibility.

Base URL: https://ruty.ai/v1. Authenticated requests use Authorization: Bearer YOUR_API_KEY. JSON bodies use Content-Type: application/json.

MethodEndpointOperation
GET/v1/catalogPublic model catalog
GET/v1/modelsYour available models
POST/v1/pricesCalculate a quote
POST/v1/imagesGenerate an image
GET/v1/images/{task_id}Retrieve an image task
GET/v1/imagesList image tasks
POST/v1/images/actionsMidjourney follow-up action
POST/v1/videosGenerate a video
GET/v1/videos/{task_id}Retrieve a video task
GET/v1/videosList video tasks

Create an image

terminal
curl https://ruty.ai/v1/images \
  -H "Authorization: Bearer $RUTY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "model_id": "gpt-image-2",
    "prompt": "A quiet observatory above the clouds",
    "resolution": "1K",
    "aspect_ratio": "16:9",
    "num_images": 1
  }'

Request parameters

All generation requests require model_id and a prompt or supported reference input. Image settings include resolution, aspect_ratio, num_images and image_urls. Video settings include duration, resolution, aspect_ratio and model-specific media inputs.

Read default_config and supported_features from the catalog. Capabilities differ by model; do not send unsupported fields. Image models currently return one output per request. Midjourney follow-up actions use a Ruty/ReelMind parent_task_id.

JavaScript

generate.mjs
const response = await fetch("https://ruty.ai/v1/images", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.RUTY_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID()
  },
  body: JSON.stringify({
    model_id: "gpt-image-2",
    prompt: "A quiet observatory above the clouds",
    resolution: "1K", num_images: 1
  })
});
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result));
console.log(result.data.task_id);

Response contract

Ruty preserves the existing response envelope: code, data, message and timestamp. A successful create returns a task ID; it does not mean generation has completed. Gateway failures use error.message and error.status. Inspect the HTTP status before reading data.

Pagination

Image history accepts limit, offset and optional status. Video history accepts page, limit and optional status. History and retrieval are scoped to the API key that created the task.

Download OpenAPI