/

#Introduction

The jAI Labs API gives you one API key for the world's leading chat, image, video and music AI models — GPT, Claude, Gemini, Veo 3.1, Sora 2, Kling 3.0, Seedance, Flux, Seedream and 100+ more model options — at up to 25% less than official prices.

Ready to start?Message us on WhatsApp to get your API key, or open a ticket at our support desk.

How the API works

  • Chat models use POST /v1/chat/completions, the same format as the OpenAI API. If your app already uses OpenAI or OpenRouter, you only change the base URL, the key and the model name.
  • Image, video and music models use POST /v1/generate. Media takes time to create, so each request starts a job. You get the result by checking the job or by receiving a webhook.
  • One balance, pay as you go. Top up from $5. Every response tells you exactly what the call cost.
  • Sub‑accounts. Building an AI app for your own customers? Create a sub‑account for each customer, give them credits from your balance and charge them your own price.

Base URL

Text
https://api.jailabs.ai/v1
ℹ️
All requests must use HTTPS. Requests over plain HTTP are rejected.

#Quickstart

  1. Get your API key. Message us on WhatsApp or open a support ticket. Our team sets up your account and sends you your API key. Treat it like a password.
  2. Add credits. Top up from $5 — we share the payment options with you on WhatsApp. There is no monthly plan.
  3. Save your key as an environment variable so it never ends up in your code:
cURL
export JAILABS_API_KEY="jl_live_your_key_here"
  1. Send your first chat request:
curl https://api.jailabs.ai/v1/chat/completions \
  -H "Authorization: Bearer $JAILABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6.1-sol",
    "messages": [{"role": "user", "content": "Write a tagline for a coffee shop"}]
  }' 
  1. Create your first video. Start a job, then check it until it is completed:
# 1. Start the job
curl https://api.jailabs.ai/v1/generate \
  -H "Authorization: Bearer $JAILABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "veo-3.1-fast",
    "prompt": "A golden retriever running on a beach at sunset",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'

# 2. Check the job (use the id from step 1)
curl https://api.jailabs.ai/v1/jobs/job_8f2a91c4 \
  -H "Authorization: Bearer $JAILABS_API_KEY"
💡
Tip: in production, pass a callback_url and let us call your server when the job is done — see Webhooks.

#Authentication

Every request needs your API key in the Authorization header as a Bearer token.

HTTP
Authorization: Bearer jl_live_your_key_here

Key types

KeyStarts withUsed for
Main keyjl_live_Your own account. Can call every endpoint, including sub‑accounts and billing.
Sub‑account keyjl_sub_One of your customers. Can call models and spend only that sub‑account's credits. Cannot manage sub‑accounts.

Keep your key safe

  • Call the API from your server. Never put a key in a website, mobile app or browser extension where users can see it.
  • Store keys in environment variables or a secrets manager, never in your code repository.
  • If a key is exposed, message us on WhatsApp or open a support ticket. We revoke it straight away and send you a new one.
  • Create separate keys for development and production so you can rotate them independently.
⚠️
Requests without a valid key return 401 invalid_api_key. Requests with a revoked key return 401 revoked_api_key.

#Pricing & credits

Your balance is held in US dollars. Each call deducts its price from your balance — there are no monthly fees and no minimum spend.

Model typeHow it is priced
ChatPer 1 million input tokens and per 1 million output tokens
ImagePer image (depends on the model and resolution)
VideoPer second of video (depends on the model, resolution and whether audio is on)
MusicPer track

Where to see prices

  • Before a call: GET /v1/models returns each model's live pricing, including the official price for comparison.
  • After a call: every chat response and every job includes cost_usd — the exact amount charged.
  • Over time: GET /v1/usage shows your spend by day, model and sub‑account.

Billing rules

  • Top up from $5 — message us on WhatsApp to add credits. Credits do not expire.
  • Media jobs are charged when they complete. If a job fails or is canceled, you are not charged.
  • If your balance is too low for a request, the API returns 402 insufficient_balance and nothing is charged.
  • Prices on popular models are up to 25% below each maker's official price. Makers can change their prices, so always rely on the live pricing field.

#Chat completions

POST/v1/chat/completions

Generate a reply from any chat model. The request and response use the OpenAI Chat Completions format, so the official OpenAI SDKs and most AI libraries work by changing the base URL.

Body parameters

modelstringrequired
The model ID, e.g. claude-sonnet-5.5. See Model catalog.
messagesarrayrequired
The conversation so far. Each message has a role (system, user, assistant or tool) and content. Content can be a string, or an array of parts (text and image_url) for models that accept images.
max_tokensinteger
The most tokens the reply may contain.
temperaturenumber
0 to 2. Higher values give more creative replies, lower values more focused ones. Default 1.
top_pnumber
Nucleus sampling, 0 to 1. Change this or temperature, not both.
streamboolean
If true, the reply is sent as server‑sent events while it is being written. See Streaming.
stopstring or array
Up to 4 sequences where the model stops writing.
toolsarray
Functions the model may call, in the OpenAI tools format (supported models only).
tool_choicestring or object
auto, none, required, or a specific function.
response_formatobject
{"type": "json_object"} to get valid JSON back (supported models only).
userstring
Your own ID for the end user. Helps with abuse monitoring and appears in usage reports.

Response

The standard OpenAI chat completion object, plus cost_usd — the amount charged for this call.

Streaming

Set "stream": true to receive the reply piece by piece. Each event is a line starting with data: containing a chunk with a delta. The stream ends with data: [DONE]. The last chunk before [DONE] includes usage and cost_usd.

Request
curl https://api.jailabs.ai/v1/chat/completions \
  -H "Authorization: Bearer $JAILABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5.5",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Explain APIs in one sentence."}
    ],
    "max_tokens": 200
  }' 
Response
JSON
{
  "id": "chatcmpl_5d1c0e7b",
  "object": "chat.completion",
  "created": 1793350000,
  "model": "claude-sonnet-5.5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "An API is a set of rules that lets one program ask another program to do something."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 21,
    "total_tokens": 45
  },
  "cost_usd": 0.000369
}
Streaming
stream = client.chat.completions.create(
    model="gpt-6.1-sol",
    messages=[{"role": "user", "content": "Tell me a short story"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

#Generate images, video & music

POST/v1/generate

Create an image, a video or a music track with any media model. The request starts a job and returns straight away with status queued. Get the result from GET /v1/jobs/{id} or a webhook.

Body parameters

modelstringrequired
The model ID, e.g. veo-3.1-fast, gpt-image-2, seedance-2.0. The model decides whether the job is an image, video or music job.
promptstringrequired
What you want to create. Required for all text‑to‑image, text‑to‑video and music models.
negative_promptstring
What you do not want to see (supported models only).
image_urlsarray of strings
Public image URLs. Used as reference images for image models, or as the starting frame for image‑to‑video.
end_image_urlstring
Video only — the image the video should end on (supported models only).
aspect_ratiostring
For example 16:9, 9:16, 1:1, 4:3, 3:4, 21:9.
resolutionstring
Images: 1K, 2K, 4K. Video: 480p, 720p, 1080p, 4k.
durationinteger
Length in seconds for video and music.
audioboolean
Video only — generate sound with the video (supported models only).
ninteger
Images only — how many images to create, 1 to 4. Default 1.
seedinteger
Use the same seed and prompt to get similar results again (supported models only).
lyricsstring
Music only — the song lyrics.
stylestring
Music only — genre and mood, e.g. upbeat pop, female vocals.
instrumentalboolean
Music only — create music without vocals.
callback_urlstring
An HTTPS URL we call when the job completes or fails. See Webhooks.
metadataobject
Up to 16 key‑value pairs of your own (e.g. your order ID). Returned with the job and in webhooks.
ℹ️
Each model supports a different set of options. GET /v1/models/{id} lists the exact parameters and allowed values. Sending an option a model does not support returns 422 unsupported_parameter.

Response

Status 202 Accepted with a job object.

Request
# Image
curl https://api.jailabs.ai/v1/generate \
  -H "Authorization: Bearer $JAILABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A cozy log cabin by a lake at sunrise, photo-real",
    "aspect_ratio": "3:2",
    "n": 2
  }'

# Image-to-video
curl https://api.jailabs.ai/v1/generate \
  -H "Authorization: Bearer $JAILABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-3.0-omni",
    "prompt": "The camera slowly pushes in as steam rises from the cup",
    "image_urls": ["https://example.com/coffee.jpg"],
    "duration": 8,
    "resolution": "1080p",
    "callback_url": "https://yourapp.com/webhooks/jailabs"
  }' 
Response · 202
JSON
{
  "id": "job_8f2a91c4",
  "object": "job",
  "type": "video",
  "model": "veo-3.1-fast",
  "status": "queued",
  "progress": 0,
  "created_at": "2026-10-29T10:15:02Z",
  "completed_at": null,
  "estimated_cost_usd": 0.375,
  "cost_usd": null,
  "outputs": [],
  "error": null,
  "metadata": {}
}

#Jobs

GET/v1/jobs/{id}
GET/v1/jobs
POST/v1/jobs/{id}/cancel

Every media request creates a job. Use these endpoints to check a job, list your jobs or cancel one that has not started.

The job object

Fields

idstring
Unique job ID, starting with job_.
typestring
image, video or music.
modelstring
The model used.
statusstring
queued → processing → completed, or failed / canceled.
progressinteger
0 to 100, when the model reports progress.
outputsarray
When completed: one item per file, each with url, content_type and, where relevant, width, height and duration.
estimated_cost_usdnumber
The expected price, shown as soon as the job is created.
cost_usdnumber
The amount actually charged. Set when the job completes; 0 if it failed or was canceled.
errorobject
When failed: code and message explaining why.
subaccount_idstring
The sub‑account that paid for the job, if any.
metadataobject
Your own key‑value pairs from the request.
created_at / completed_atstring
ISO 8601 timestamps (UTC).

List jobs

GET /v1/jobs returns your most recent jobs first. Query parameters: status, type, model, subaccount_id, limit (1–100, default 20) and after (a job ID, to get the next page).

Cancel a job

POST /v1/jobs/{id}/cancel cancels a job that is still queued. Jobs that are already processing cannot be canceled. Canceled jobs are not charged.

⚠️
Download your files. Output URLs are kept for 7 days. Copy the files to your own storage if you need them longer.
💡
Polling: check images every 2–3 seconds and videos every 10 seconds. Webhooks are better — no polling at all.
Request
curl https://api.jailabs.ai/v1/jobs/job_8f2a91c4 \
  -H "Authorization: Bearer $JAILABS_API_KEY"
Response
JSON
{
  "id": "job_8f2a91c4",
  "object": "job",
  "type": "video",
  "model": "veo-3.1-fast",
  "status": "completed",
  "progress": 100,
  "created_at": "2026-10-29T10:15:02Z",
  "completed_at": "2026-10-29T10:16:31Z",
  "estimated_cost_usd": 0.375,
  "cost_usd": 0.375,
  "outputs": [
    {
      "url": "https://cdn.jailabs.ai/outputs/job_8f2a91c4.mp4",
      "content_type": "video/mp4",
      "width": 1280,
      "height": 720,
      "duration": 5
    }
  ],
  "error": null,
  "subaccount_id": null,
  "metadata": {}
}

#Models

GET/v1/models
GET/v1/models/{id}

List every model you can use, with its live price and the options it supports. Filter with ?type=chat, image, video or music.

Model fields

idstring
The model ID to use in requests.
name / providerstring
Display name and the company that makes the model.
typestring
chat, image, video or music.
capabilitiesarray
For example text-to-video, image-to-video, image-edit, vision, tools.
parametersobject
Media models: each supported option with its allowed values.
pricingobject
Our live price and the maker's official_price_usd, with the unit they apply to.
statusstring
active, beta or deprecated. Deprecated models show a retires_at date.
Request
curl "https://api.jailabs.ai/v1/models?type=video" \
  -H "Authorization: Bearer $JAILABS_API_KEY"
Response
JSON
{
  "object": "list",
  "data": [
    {
      "id": "veo-3.1-fast",
      "object": "model",
      "name": "Veo 3.1 Fast",
      "provider": "Google",
      "type": "video",
      "capabilities": ["text-to-video", "image-to-video"],
      "parameters": {
        "duration": [4, 6, 8],
        "aspect_ratio": ["16:9", "9:16"],
        "resolution": ["720p", "1080p"],
        "audio": [true, false]
      },
      "pricing": {
        "unit": "second",
        "price_usd": 0.075,
        "official_price_usd": 0.10
      },
      "status": "active"
    }
  ]
}

#Balance

GET/v1/balance

Check how much credit you have. With a sub‑account key, this returns that sub‑account's balance.

Fields

available_usdnumber
Credit you can spend right now.
allocated_to_subaccounts_usdnumber
Credit you have given to your sub‑accounts that they have not spent yet (main key only).
low_balance_alert_usdnumber
The level that triggers a balance.low webhook, if you asked us to set one.
Request
cURL
curl https://api.jailabs.ai/v1/balance \
  -H "Authorization: Bearer $JAILABS_API_KEY"
Response
JSON
{
  "object": "balance",
  "currency": "USD",
  "available_usd": 182.40,
  "allocated_to_subaccounts_usd": 65.00,
  "low_balance_alert_usd": 20.00
}

#Usage

GET/v1/usage

See what you spent and on what. Useful for your own reports and for billing your customers.

Query parameters

start_datestringrequired
First day to include, YYYY-MM-DD.
end_datestringrequired
Last day to include, YYYY-MM-DD. Up to 90 days after start_date.
group_bystring
day (default), model or subaccount.
subaccount_idstring
Only show usage for one sub‑account.
Request
cURL
curl "https://api.jailabs.ai/v1/usage?start_date=2026-10-01&end_date=2026-10-31&group_by=model" \
  -H "Authorization: Bearer $JAILABS_API_KEY"
Response
JSON
{
  "object": "usage",
  "start_date": "2026-10-01",
  "end_date": "2026-10-31",
  "group_by": "model",
  "data": [
    { "model": "veo-3.1-fast", "requests": 412, "cost_usd": 618.75 },
    { "model": "gpt-image-2", "requests": 2310, "cost_usd": 121.80 },
    { "model": "claude-sonnet-5.5", "requests": 15208, "cost_usd": 44.17 }
  ],
  "total_cost_usd": 784.72
}

#Sub‑accounts overview

Sub‑accounts let you build your own AI product on jAI Labs and give each of your customers their own credit balance. You buy credits at our price, give credits to your customers, and charge them whatever you like.

Your jAI Labs balanceYou top up once
→
Sub‑accountsOne per customer — you allocate credits
→
Your customersUse AI inside your app at your price

How it works

  1. Create a sub‑account for each customer when they sign up to your app. Store its id next to your user.
  2. Allocate credits when your customer pays you. The amount moves from your balance into theirs.
  3. Make calls for that customer — either with your main key plus the X-JAI-Subaccount header, or with a key created for that sub‑account.
  4. Track usage per customer with GET /v1/usage?subaccount_id=….
💡
Your customers never see jAI Labs. They only see your app, your brand and your prices.
ℹ️
A sub‑account can only spend its own credits. When it runs out, its calls return 402 insufficient_balance — your main balance is never touched by mistake.

#Create & manage sub‑accounts

POST/v1/subaccounts
GET/v1/subaccounts
GET/v1/subaccounts/{id}
PATCH/v1/subaccounts/{id}

These endpoints need your main key.

Body parameters (create)

namestringrequired
A name you will recognise, e.g. your customer's name or email.
external_idstring
Your own user ID. Must be unique. You can look sub‑accounts up by it: GET /v1/subaccounts?external_id=…
spend_limit_usdnumber
Optional cap on how much this sub‑account can spend per calendar month.
metadataobject
Up to 16 key‑value pairs of your own.

Update with PATCH to change name, spend_limit_usd or metadata, or set status to suspended to block all calls from that customer (and active to allow them again).

Create
curl https://api.jailabs.ai/v1/subaccounts \
  -H "Authorization: Bearer $JAILABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Studio",
    "external_id": "user_1042",
    "spend_limit_usd": 200
  }' 
Response
JSON
{
  "id": "sa_3k9d72mf",
  "object": "subaccount",
  "name": "Acme Studio",
  "external_id": "user_1042",
  "status": "active",
  "balance_usd": 0,
  "spend_limit_usd": 200,
  "spent_this_month_usd": 0,
  "created_at": "2026-10-29T10:20:00Z",
  "metadata": {}
}

#Allocate credits

POST/v1/subaccounts/{id}/credits

Move credit from your main balance to a sub‑account, or take unused credit back.

Body parameters

amount_usdnumberrequired
A positive amount gives credit to the sub‑account. A negative amount takes unused credit back to your main balance.
notestring
Your own note, e.g. an invoice number. Shown in your credit history.
ℹ️
If your main balance is lower than amount_usd, the request returns 402 insufficient_balance and nothing moves.
Request
curl https://api.jailabs.ai/v1/subaccounts/sa_3k9d72mf/credits \
  -H "Authorization: Bearer $JAILABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "amount_usd": 25, "note": "Invoice #2291" }' 
Response
JSON
{
  "object": "credit_transfer",
  "id": "ct_71bd02aa",
  "subaccount_id": "sa_3k9d72mf",
  "amount_usd": 25,
  "subaccount_balance_usd": 25,
  "main_balance_usd": 157.40,
  "note": "Invoice #2291",
  "created_at": "2026-10-29T10:22:41Z"
}

#Make calls for a customer

There are two ways to charge a call to one of your customers. Use whichever fits your app.

Option 1 — Main key + header (recommended)

Keep using your main key and add the X-JAI-Subaccount header with the sub‑account ID. You keep one secret in your server and choose the customer per request.

Option 2 — A key for each sub‑account

Create a key that can only spend that sub‑account's credits:

POST/v1/subaccounts/{id}/keys
DELETE/v1/subaccounts/{id}/keys/{key_id}

The response includes the full key once — store it securely. Delete the key to stop it working.

⚠️
Sub‑account keys are still secret keys. Use them on your server, not in your customer's browser or app.
Charge a call to a customer
curl https://api.jailabs.ai/v1/generate \
  -H "Authorization: Bearer $JAILABS_API_KEY" \
  -H "X-JAI-Subaccount: sa_3k9d72mf" \
  -H "Content-Type: application/json" \
  -d '{ "model": "nano-banana-2.1", "prompt": "Product photo of a red sneaker on white" }' 
Create key · response
JSON
{
  "id": "key_2b81c0",
  "object": "subaccount_key",
  "subaccount_id": "sa_3k9d72mf",
  "name": "Acme production",
  "key": "jl_sub_6Q2v...shown-only-once",
  "created_at": "2026-10-29T10:25:10Z"
}

#Webhooks

Instead of checking a job again and again, give us a callback_url (per request) or ask our team to set a default webhook URL for your account. We send a POST request to your URL when something happens.

Events

EventWhen
job.completedA media job finished. data is the full job object with outputs.
job.failedA media job failed. data is the job object with error. You are not charged.
balance.lowYour balance (or a sub‑account's) dropped below the alert level you set.

Check the signature

Every webhook has an X-JAI-Signature header: t=<timestamp>,v1=<signature>. The signature is an HMAC‑SHA256 of <timestamp>.<raw request body>, using your webhook secret (our team sends it to you with your API key). Reject requests with a wrong signature or a timestamp older than 5 minutes.

Respond quickly

Return any 2xx status within 10 seconds, then do the heavy work (like downloading the video) afterwards. If we don't get a 2xx, we retry up to 6 times over 24 hours. Use the event id to ignore duplicates.

Webhook payload
JSON
{
  "id": "evt_0c7e19d2",
  "type": "job.completed",
  "created_at": "2026-10-29T10:16:32Z",
  "data": {
    "id": "job_8f2a91c4",
    "object": "job",
    "status": "completed",
    "model": "veo-3.1-fast",
    "cost_usd": 0.375,
    "outputs": [
      { "url": "https://cdn.jailabs.ai/outputs/job_8f2a91c4.mp4", "content_type": "video/mp4" }
    ],
    "metadata": { "order_id": "A-1042" }
  }
}
Verify the signature
import crypto from "node:crypto";
import express from "express";

const app = express();
const SECRET = process.env.JAILABS_WEBHOOK_SECRET;

app.post("/webhooks/jailabs", express.raw({ type: "application/json" }), (req, res) => {
  const header = req.get("X-JAI-Signature") || "";
  const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const expected = crypto.createHmac("sha256", SECRET)
    .update(`${t}.${req.body}`).digest("hex");

  const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
  if (!fresh || !v1 || v1.length !== expected.length ||
      !crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected))) {
    return res.status(400).send("Invalid signature");
  }
  const event = JSON.parse(req.body);
  res.sendStatus(200);            // reply fast, then do the work
  // handle event.type / event.data here
});

#Errors

The API uses normal HTTP status codes. Errors always return the same JSON shape, with a request_id you can quote to support.

StatusCodeWhat it means
400invalid_requestThe request is malformed or a value is wrong. param tells you which field.
401invalid_api_keyThe key is missing, wrong or revoked.
402insufficient_balanceNot enough credit (or the sub‑account's spend limit is reached). Nothing was charged.
403forbiddenThe key cannot do this — e.g. a sub‑account key managing sub‑accounts, or a suspended sub‑account.
404not_foundThe model, job or sub‑account does not exist.
409idempotency_conflictThe same Idempotency-Key was used with a different request body.
422unsupported_parameterThe model does not support an option you sent, or the value is not allowed.
422content_policyThe model provider refused the prompt or image under its content rules. Not charged.
429rate_limitedToo many requests. Wait for the time in the Retry-After header.
500server_errorSomething went wrong on our side. Safe to retry.
503model_unavailableThe model provider is busy or down. Retry later or try another model.
Error response
JSON
{
  "error": {
    "type": "invalid_request_error",
    "code": "unsupported_parameter",
    "message": "veo-3.1-fast does not support duration 12. Allowed: 4, 6, 8.",
    "param": "duration",
    "request_id": "req_93ab61f0"
  }
}

#Rate limits & retries

Default limits

LimitDefault
Requests per minute, per key120
Media jobs running at the same time, per account10

Every response includes X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Need more? Contact us — we raise limits for growing apps.

Safe retries with Idempotency‑Key

Network problems happen. To retry a POST without being charged twice, send an Idempotency-Key header with a unique value (for example a UUID). If we receive the same key again within 24 hours, we return the first result instead of running the request again.

When to retry

  • Retry on 429, 500 and 503, waiting longer each time (1s, 2s, 4s, 8s…).
  • Don't retry on 400, 401, 402, 403, 404 or 422 — fix the request first.
Idempotent request
cURL
curl https://api.jailabs.ai/v1/generate \
  -H "Authorization: Bearer $JAILABS_API_KEY" \
  -H "Idempotency-Key: 6f1b2c3e-9a10-4b7e-8c2d-1a2b3c4d5e6f" \
  -H "Content-Type: application/json" \
  -d '{ "model": "flux-2-pro", "prompt": "Minimal logo of a fox" }' 

#Switch from OpenAI or OpenRouter

Already using OpenAI, OpenRouter or another gateway for chat? Switching takes three small changes:

SettingChange it to
Base URLhttps://api.jailabs.ai/v1
API keyYour jAI Labs key (jl_live_…)
Model nameA jAI Labs model ID from the catalog, e.g. gpt-6.1-sol or claude-opus-5.5

Everything else — messages, streaming, tools, JSON mode — works the same. For images, video and music, use /v1/generate, which gives you every media model through one request format.

Change two lines
from openai import OpenAI

# Before
# client = OpenAI(api_key="sk-...")

# After
client = OpenAI(
    base_url="https://api.jailabs.ai/v1",
    api_key="jl_live_...",
)

#No‑code tools (n8n, Make, Zapier)

You don't need to write code. Any tool with an HTTP Request step can use jAI Labs:

  1. Add an HTTP Request step and set the method to POST.
  2. Set the URL to https://api.jailabs.ai/v1/chat/completions (text) or https://api.jailabs.ai/v1/generate (images, video, music).
  3. Add a header Authorization with the value Bearer YOUR_KEY, and Content-Type with application/json.
  4. Paste the JSON body from any example on this page.
  5. For media, add a Wait step and a second HTTP Request to GET https://api.jailabs.ai/v1/jobs/<id> — or use a webhook trigger as your callback_url.

#Best practices

  • Keep keys on your server. Never ship a key inside a website or mobile app.
  • Use webhooks for media. They are faster and cheaper to run than polling.
  • Download outputs. Output links last 7 days — copy files to your own storage.
  • Handle 402 nicely. Show your users a “top up” message instead of an error.
  • Set spend limits on sub‑accounts so one customer can never overspend.
  • Send an Idempotency‑Key on every POST you might retry.
  • Read prices from /v1/models instead of hard‑coding them — makers change prices.
  • Log the request_id from errors. It helps our team find your request quickly.

#Model catalog

Use the Model ID in the model field of your request. Click an ID to copy it. Music and voice models (such as suno-v5) and new models are added all the time — GET /v1/models always has the full, live list with prices.

💬 Chat models 9

ModelModel IDMade by
GPT‑6.1 Solgpt-6.1-solOpenAI
GPT‑6 Lunagpt-6-lunaOpenAI
Claude Opus 5.5claude-opus-5.5Anthropic
Claude Sonnet 5.5claude-sonnet-5.5Anthropic
Claude Haiku 5.5claude-haiku-5.5Anthropic
Gemini 4 Argongemini-4-argonGoogle
DeepSeek V4.1 Flashdeepseek-v4.1-flashDeepSeek
Muse Spark Openmuse-spark-openMeta
Muse Wondermuse-wonderMeta

🎨 Image models 24

ModelModel IDMade by
GPT Image 2.5 Sunburstgpt-image-2.5-sunburstOpenAI
GPT Image 2gpt-image-2OpenAI
GPT Image 1.5gpt-image-1.5OpenAI
4o Image4o-imageOpenAI
Imagen 4 Ultraimagen-4-ultraGoogle
Imagen 4 Standardimagen-4Google
Imagen 4 Fastimagen-4-fastGoogle
Nano Banana 2.1nano-banana-2.1Google
Flux 3 Kleinflux-3-kleinBlack Forest Labs
Flux 2 Proflux-2-proBlack Forest Labs
Flux 2 Flexflux-2-flexBlack Forest Labs
Seedream 5 Proseedream-5-proByteDance
Seedream 5 Flashseedream-5-flashByteDance
Seedream 5.0 Liteseedream-5-liteByteDance
Seedream 4.5seedream-4.5ByteDance
Seedream v4seedream-4ByteDance
Ideogram v3 Turboideogram-v3-turboIdeogram
Ideogram v3 Balancedideogram-v3-balancedIdeogram
Ideogram v3 Qualityideogram-v3-qualityIdeogram
Qwen Image 3.0 Proqwen-image-3-proAlibaba
Qwen Image 3.0qwen-image-3Alibaba
Qwen Image 2qwen-image-2Alibaba
z‑imagez-imageAlibaba
Grok Imagine Image 2.0grok-imagine-image-2xAI

🎬 Video models 16

ModelModel IDMade by
Veo 3.1 Qualityveo-3.1-qualityGoogle
Veo 3.1 Fastveo-3.1-fastGoogle
Veo 3.1 Liteveo-3.1-liteGoogle
Sora 2sora-2OpenAI
Kling 3.0 Omnikling-3.0-omniKling
Seedance 2.0seedance-2.0ByteDance
Seedance v1 Proseedance-1-proByteDance
Seedance v1 Liteseedance-1-liteByteDance
Hailuo H3hailuo-h3MiniMax
Hailuo 2.3hailuo-2.3MiniMax
Wan 2.7wan-2.7Alibaba
Wan 2.2wan-2.2Alibaba
HappyHorse 1.1happyhorse-1.1Alibaba
Grok Imagine Videogrok-imagine-videoxAI
Runway Alephrunway-alephRunway
PixVerse V6pixverse-v6PixVerse

#Support

When you contact us about a failed request, include the request_id from the error response — it helps us find it straight away.

#Changelog

v1
First release of the jAI Labs API
  • OpenAI‑compatible chat completions with streaming and tools
  • One /v1/generate endpoint for image, video and music models
  • Jobs, webhooks and idempotent requests
  • Sub‑accounts with credit allocation, spend limits and sub‑account keys
  • Live model list with pricing, balance and usage reports
Chat with us