For developers

API & MCP

Generate video, images and audio from your scripts, n8n and Make workflows or right from AI agents — Claude, Cursor and others. Same models, settings and prices as on the site; credits come from your account balance.

Get an API key
MCPhttps://genomake.io/mcp
RESThttps://genomake.io/api/v1

Quick start

  1. Sign in and open Settings → API & MCP. Create a key — it is shown only once, save it.
  2. Connect your AI agent to the MCP server (next section) — or call the REST API:
Start a generation
curl https://genomake.io/api/v1/generations \
  -H "Authorization: Bearer gm_live_…" \
  -H "Content-Type: application/json" \
  -d '{"model": "seedream-5-flash:text-to-image", "prompt": "Рыжий кот в скафандре на Луне"}'
Response 202
{"data": {"id": 28409, "status": "processing", "model": "seedream-5-flash:text-to-image",
          "model_name": "Seedream 5.0 Flash - Text to Image", "type": "image",
          "credits_charged": 7, "balance": 11327, "callback_url": null, "warnings": []}}
Result: waits up to 30 seconds and returns the status
curl "https://genomake.io/api/v1/generations/28409?wait=30" -H "Authorization: Bearer gm_live_…"
{"data": {"id": 28409, "status": "completed", "type": "image",
          "model": "seedream-5-flash:text-to-image", "model_name": "Seedream 5.0 Flash - Text to Image",
          "prompt": "Рыжий кот в скафандре на Луне",
          "results": ["https://tempfile.aiquickdraw.com/seedream5flash/1794906829684-j7xlut2xeu.jpg"],
          "cover_url": null, "error": null, "credits_charged": 7, "created_at": "2026-11-17T12:13:31+00:00"}}

Result links are temporary — download the file if you need to keep it. If a generation fails, credits are refunded automatically and credits_charged becomes 0.

MCP for AI agents

MCP (Model Context Protocol) is the standard AI agents use to plug in external tools. Connect GENOMAKE once and the agent finds a model, checks the price, generates an image or video and waits for the result by itself. Great for content pipelines and for generating assets while coding.

URL
https://genomake.io/mcp
TransportStreamable HTTP (stateless, JSON responses)
AuthAuthorization: Bearer gm_live_…
Claude Code
claude mcp add --transport http genomake https://genomake.io/mcp --header "Authorization: Bearer gm_live_…"
Cursor / Windsurf — mcp.json
{
  "mcpServers": {
    "genomake": {
      "url": "https://genomake.io/mcp",
      "headers": { "Authorization": "Bearer gm_live_…" }
    }
  }
}

n8n: AI Agent node → “MCP Client Tool”, HTTP Streamable transport, URL https://genomake.io/mcp, Bearer auth with your key.

Tools the agent gets:

get_accountBalance, key limits, tasks running now
list_modelsModels with starting price and accepted files
get_modelExact model params, defaults, file slots
estimate_costPrice in credits for these settings (free)
generateStart a generation, spends credits; waits up to wait_seconds
get_generationStatus and result links
list_generationsGeneration history
upload_fileRe-host a file from a public URL
list_tools / get_toolReady-made site tools and their fields
run_tool / get_tool_runRun a tool (spends credits) and its status

Tools that spend credits are marked as non-read-only, so Claude and Cursor ask for confirmation before running them unless you allowed it in advance.

Authentication

Every request carries the key in Authorization: Bearer gm_live_… (or X-Api-Key: gm_live_…). The key spends your balance: keep it like a password and never put it into website or mobile app code your users can see.

  • Up to 10 active keys per account — e.g. one per workflow.
  • A key can have a daily credit limit — protection from a looping agent.
  • A revoked key stops working immediately.
  • Model parameter labels and provider error texts follow Accept-Language or ?lang=ru; API service messages are in English.

Models and parameters

A model is addressed by key: family:variant (kling-3-0:standard) or a plain name (runway). List them with GET /api/v1/models, filter ?type=image|video|audio.

Model list item
{"model": "kling-3-0:standard", "name": "Kling 3.0 — Standard (HD)", "type": "video",
 "description": "Standard quality generation", "price_from": 151, "prompt": "required",
 "files": {"image": {"min": 0, "max": 2}}}

GET /api/v1/models/{model} returns everything a request needs: parameters with allowed values (params), provider-level extras (advanced_params — seed, negative_prompt, etc.), file slots, defaults and which parameters affect the price.

GET /api/v1/models/kling-3-0:standard (shortened)
{
  "params": {
    "duration": {"type": "string", "enum": ["3", "4", "5", "…", "15"], "default": "5"},
    "aspect_ratio": {"type": "string", "enum": ["16:9", "9:16", "1:1"], "default": "16:9"},
    "sound": {"type": "boolean", "default": false}
  },
  "file_slots": [
    {"slot": "start_image", "title": "Start Frame", "accepts": ["image"], "max_files": 1, "required": false},
    {"slot": "end_image", "title": "End Frame", "accepts": ["image"], "max_files": 1, "required": false}
  ],
  "prompt": {"supported": true, "required": true, "max_length": 2500},
  "price": {"from": 151, "depends_on": ["duration", "sound"]}
}
  • Pass parameters in params under the same names; omitted ones use defaults. Unknown names are dropped with a note in warnings; invalid values return 422 with the allowed list.
  • Text-to-… / image-to-… pairs switch automatically: attach a file to the text variant and the request goes to the file variant, and vice versa (same as the site). The response notes it in warnings.
  • URLs that files does not fill (e.g. the mask_url mask of Ideogram Edit) are listed in file_params — pass them in params. Other URLs in params are not accepted: files go through files only.
  • Exact price for specific settings — POST /api/v1/estimate with the same body as a launch. Free.

Input files

Images, video and audio are passed as public URLs in files — in two ways:

As a list — like chat attachments on the site
"files": ["https://example.com/photo.jpg"]

"files": [{"url": "https://example.com/clip.mp4", "type": "video", "duration": 8}]
By slot from get_model.file_slots — start and end frame, mask, etc.
"files": {
  "start_image": "https://example.com/first-frame.jpg",
  "end_image": "https://example.com/last-frame.jpg"
}
  • File type comes from the extension; add type if the URL has none.
  • For input video and audio pass duration in seconds. If the model prices by input length (price.input_duration_required in the model description), requests without it are rejected. The final charge is reconciled with the provider’s actual usage.
  • A result URL of one generation can go straight into the next one: image → video.
  • A local file: POST /api/v1/files (multipart, field file, up to 100 MB) or {"url": "…"} — returns a URL for files.

Generations

POST /api/v1/generations charges credits and immediately answers 202 with an id. Images usually take 10–60 seconds, video 1–10 minutes. Get the result by polling, waiting or a callback.

FieldDescription
modelModel key — required
promptPrompt text; required by most models
paramsModel parameters
filesInput files
callback_urlWhere to POST the result when the task finishes
  • Statuses: processing → completed or failed.
  • GET /api/v1/generations/{id}?wait=0..45 — waits for completion up to that many seconds. For video, repeat while the status is processing. When the server is busy the answer may come earlier — just repeat.
  • The Idempotency-Key header prevents double charges: a retry with the same key returns the first response instead of starting a second generation.
  • API generations show up in the site history like regular ones.
Python
import requests

API = "https://genomake.io/api/v1"
H = {"Authorization": "Bearer gm_live_…"}

start = requests.post(f"{API}/generations", headers=H, json={
    "model": "kling-3-0:standard",
    "prompt": "Кот в скафандре медленно машет в камеру, Земля в небе",
    "params": {"duration": "5", "aspect_ratio": "9:16"},
    "files": {"start_image": "https://example.com/cat.jpg"},
}).json()["data"]

while True:
    gen = requests.get(f"{API}/generations/{start['id']}", headers=H, params={"wait": 45}).json()["data"]
    if gen["status"] != "processing":
        break

print(gen["status"], gen["results"], gen["error"])
JavaScript
const API = "https://genomake.io/api/v1";
const headers = { Authorization: "Bearer gm_live_…", "Content-Type": "application/json" };

const { data: start } = await (await fetch(`${API}/generations`, {
  method: "POST",
  headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
  body: JSON.stringify({ model: "seedream-5-flash:text-to-image", prompt: "Flat icon of a rocket" }),
})).json();

let gen;
do {
  ({ data: gen } = await (await fetch(`${API}/generations/${start.id}?wait=45`, { headers })).json());
} while (gen.status === "processing");

console.log(gen.results);

Completion callback

Instead of polling, pass callback_url when starting a generation or a tool. When the task finishes we POST the same JSON as the status endpoint there. Handy for n8n and Make: a Webhook node receives the finished clip and passes it down the workflow.

POST https://your-server.example/genomake-hook
Content-Type: application/json
User-Agent: GENOMAKE-Webhooks/1.0
X-Genomake-Event: generation.completed
X-Genomake-Delivery: 25
X-Genomake-Timestamp: 1794914215
X-Genomake-Signature: sha256=5f0c…

{"event": "generation.completed", "delivery_id": 25,
 "data": {"id": 28429, "status": "completed", "type": "image", "results": ["https://…"], "…": "…"}}
  • Events: generation.completed, generation.failed, tool_run.completed, tool_run.failed.
  • Only public https URLs. Reply 2xx within 10 seconds; otherwise we retry after 1 min, 5 min, 30 min and 2 h (5 attempts total). Redirects are not followed.
  • A notice may arrive twice — use delivery_id to skip duplicates.

Verifying the signature. Each key has a signing secret (Settings → API & MCP). The signature is sha256= + HMAC-SHA256 of X-Genomake-Timestamp + "." + raw body. Reject stale timestamps to block replays.

PHP
$body = file_get_contents('php://input');
$ts = $_SERVER['HTTP_X_GENOMAKE_TIMESTAMP'] ?? '';
$expected = 'sha256=' . hash_hmac('sha256', $ts . '.' . $body, $secret);

if (!hash_equals($expected, $_SERVER['HTTP_X_GENOMAKE_SIGNATURE'] ?? '') || abs(time() - (int) $ts) > 300) {
    http_response_code(401);
    exit;
}

$event = json_decode($body, true);
Node.js
import crypto from "node:crypto";

// rawBody — тело запроса как строка, до JSON.parse
function verify(rawBody, headers, secret) {
  const ts = headers["x-genomake-timestamp"];
  const expected = "sha256=" + crypto.createHmac("sha256", secret).update(`${ts}.${rawBody}`).digest("hex");
  const got = headers["x-genomake-signature"] || "";
  return got.length === expected.length
    && crypto.timingSafeEqual(Buffer.from(got), Buffer.from(expected))
    && Math.abs(Date.now() / 1000 - Number(ts)) < 300;
}
Python
import hashlib, hmac, time

def verify(raw_body: bytes, headers, secret: str) -> bool:
    ts = headers.get("X-Genomake-Timestamp", "")
    expected = "sha256=" + hmac.new(secret.encode(), ts.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, headers.get("X-Genomake-Signature", "")) and abs(time.time() - int(ts or 0)) < 300

Tools

Tools are the site’s ready-made pipelines: background removal, upscaling, product covers, try-on and more. One run may include several steps with different models.

GET  /api/v1/tools                       → id, slug, title, description
GET  /api/v1/tools/removebackground      → fields, presets, price_from
POST /api/v1/tools/removebackground/runs → {"images": {"photo": ["https://…/photo.jpg"]}}
GET  /api/v1/tool-runs/{run_id}?wait=45  → status, steps, results

Text and select fields go to fields by field key, images to images by field key, the style to preset_id. callback_url and Idempotency-Key work the same as for generations.

Pricing and limits

  • Same prices as on the site, Premium included. Credits are charged at launch and refunded on failure.
  • Up to 5 tasks at once per account; start the next one when a running task finishes.
  • Up to 30 launches per minute per key.
  • Waiting for a result within one request — up to 45 seconds.
  • Optional daily credit limit, per key.
  • Result links are temporary and history entries older than 14 days may be deleted — keep your files.

Errors

{"error": {"code": "INSUFFICIENT_CREDITS", "message": "Not enough credits", "details": {"required": 151, "balance": 40}}}
HTTPCodeMeaning
401UNAUTHORIZEDMissing, invalid or revoked key
402INSUFFICIENT_CREDITSNot enough credits; details show how many are needed
403FORBIDDENAccount blocked or key lacks permission
404NOT_FOUNDModel, generation or tool not found (or not yours)
409IDEMPOTENCY_CONFLICTIdempotency-Key already used with another request
422VALIDATIONInvalid parameters — the message says what to fix
429TOO_MANY_ACTIVE5 tasks already running — wait for one to finish
429RATE_LIMITToo many launches per minute
429DAILY_LIMITKey daily limit reached
502GENERATION_FAILEDProvider rejected the task; no credits charged
503API_DISABLEDAPI temporarily unavailable

If a generation fails mid-way, the status returns status: "failed" with a readable error; credits are already refunded by then.

Reference

RequestWhat it does
GET /api/v1/meAccount, balance, key limits
GET /api/v1/modelsModel list (?type=image|video|audio)
GET /api/v1/models/{model}Model parameters
POST /api/v1/estimatePrice for settings
POST /api/v1/generationsStart a generation
GET /api/v1/generations/{id}Status and result (?wait=0..45)
GET /api/v1/generationsHistory (?status, ?type, ?limit, ?before)
POST /api/v1/filesUpload a file for model input
GET /api/v1/toolsTool list
GET /api/v1/tools/{id|slug}Tool fields and styles
POST /api/v1/tools/{id|slug}/runsRun a tool
GET /api/v1/tool-runs/{id}Run status (?wait=0..45)
POST /mcpMCP server (JSON-RPC)