Authentication
A Bearer token in the Authorization header. Create keys in Settings and revoke any of them at any time.
Authorization: Bearer gl_live_...Images, video, audio and 3D behind one API. Call it from Node, Python or curl, or script it from the terminal with the Genlaxy CLI, all paid from the same balance as the studio.
npm i -g @genlaxy/cliSwap the model ID to switch between image, video and speech. The fields follow the model.
1import { writeFile } from "node:fs/promises";2 3const API = "https://genlaxy.ai/api/v1/api/catalog";4const auth = { Authorization: `Bearer ${process.env.GENLAXY_API_KEY}` };5 6// 1. Generate an image7const res = await fetch(`${API}/generations`, {8 method: "POST",9 headers: { ...auth, "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID() },10 body: JSON.stringify({11 modelId: "luma/uni-v1/text-to-image",12 inputs: { prompt: "Neon city street after rain, cinematic night", size: "16:9" },13 }),14});15let { generation } = await res.json();16 17// 2. Wait for the result18while (generation.status === "queued" || generation.status === "generating") {19 await new Promise((r) => setTimeout(r, 3000));20 ({ generation } = await (await fetch(`${API}/generations/${generation.id}`, { headers: auth })).json());21}22 23// 3. Save the file24const file = await fetch(`${API}/generations/${generation.id}/content`, { headers: auth });25await writeFile("result.jpeg", Buffer.from(await file.arrayBuffer()));
export GENLAXY_API_KEY="gl_live_..."npm i -g @genlaxy/cligenlaxy run luma/uni-v1/text-to-image -p "violet neon fox" -o ./out/Run any model from a shell, a CI job or a coding agent. Every render is priced before it starts and drawn from the same balance.
genlaxy loginPaste your API key once; it is checked and savedgenlaxy whoamiThe key's name and your balancegenlaxy models --type videoEvery video model with its starting pricegenlaxy run <model> -hA model's fields, fetched live: type, default, allowed valuesgenlaxy run <model> -p "<prompt>" -o ./out/Render and save the result in a foldergenlaxy run <model> -p "..." --dry-runThe exact price, without spending anythinggenlaxy run <model> -p "..." --max-price 0.50Refuse to run if the price is highergenlaxy run <model> -p "..." --json -o ./out/One JSON result, ready for the next stepgenlaxy skill installTeach your coding agent to use the CLIA Bearer token in the Authorization header. Create keys in Settings and revoke any of them at any time.
Authorization: Bearer gl_live_...Starting a render answers at once with status queued. Poll the render until it has succeeded, failed or been refunded.
{ "status": "queued" }Ask for the exact price of your inputs without starting anything. Every amount is in euro cents.
POST /api/v1/api/catalog/quoteSend an Idempotency-Key header and a retried request never charges twice.
Idempotency-Key: render-042Each key has a per-minute limit and an optional daily cap. Past the limit the API answers 429.
429 Too Many RequestsJSON errors with a code and a message. A render that fails is refunded to your balance automatically.
{ "status": "refunded" }/meYour key and balance/modelsEvery model/models/detail?id=MODEL_IDOne model and its fields/quotePrice for exact inputs/generationsStart a render/generationsYour recent renders/generations/IDOne render's status/generations/ID/contentThe result file/generations/IDDelete a renderTop up €5 and ship today
The API, the CLI and the studio share one balance. Failed renders are refunded.