Reference
GET /v1/account
curl -s https://api.genmux.tech/v1/account -H "Authorization: Bearer $API_KEY"{
"id": "…",
"name": "…",
"balance": 498,
"inflight": 1,
"max_inflight": 20,
"key": {"prefix": "nb_live_AbCdEfGh", "rate_limit_rps": 10}
}GET /v1/models
Returns the public model catalogue — ids, the resolution tiers and aspect ratios each model accepts, credits per tier, and availability. No authentication required.
Active models
The models you can call right now, straight from this catalogue — copy an id into your code or agent config.
| Model id | Kind | Context / resolutions | Tools | Input | Output |
|---|---|---|---|---|---|
Nano Banana nanobanana | image | 1K | — | 2 credits / image | — |
Nano Banana Pro nanobanana-pro | image | 1K · 2K · 4K | — | 4 credits / image | — |
Qwen-Image 2.0 qwen-image-2 | image | 1K · 2K | — | 3 credits / image | — |
Qwen-Image Max qwen-image-max | image | 1K · 2K | — | 8 credits / image | — |
Seedream 5.0 seedream-5 | image | 2K · 4K | — | 16 credits / image | — |
Wan 2.7 Image wan-2-7-image | image | 1K · 2K | — | 2 credits / image | — |
Doubao Seed 2.0 Pro doubao-seed-2-pro | chat | 256K | yes | 85 credits / 1M tokens | 408 credits / 1M tokens |
Doubao Seed 2.0 Code doubao-seed-2-code | chat | 256K | yes | 85 credits / 1M tokens | 408 credits / 1M tokens |
Doubao Seed 2.0 Lite doubao-seed-2-lite | chat | 256K | — | 17 credits / 1M tokens | 85 credits / 1M tokens |
Doubao Seed 2.0 Mini doubao-seed-2-mini | chat | 256K | — | 2.146 credits / 1M tokens | 68 credits / 1M tokens |
Kimi K3 kimi-k3 | chat | 1M | yes | 197.028 credits / 1M tokens | 985.815 credits / 1M tokens |
Claude Opus 5.5 claude-opus-5-5 | chat | 200K | yes | 146.88 credits / 1M tokens | 734.4 credits / 1M tokens |
Claude Fable 5.1 claude-fable-5-1 | chat | 200K | yes | 1,700 credits / 1M tokens | 1,700 credits / 1M tokens |
GPT-6 Astra gpt-6-astra | chat | 128K | yes | 68 credits / 1M tokens | 340 credits / 1M tokens |
GPT-5.6 Terra gpt-5.6-terra | chat | 128K | yes | 17 credits / 1M tokens | 170 credits / 1M tokens |
Qwen3.8-Max qwen3.8-max | chat | 1M | yes | 138.718 credits / 1M tokens | 416.161 credits / 1M tokens |
Copy a model id straight into your code or agent config. Live from GET /v1/models — only models you can call right now are listed.
curl -s https://api.genmux.tech/v1/models{
"object": "list",
"data": [
{
"id": "nanobanana",
"object": "model",
"created": 1756411279,
"owned_by": "genmux",
"display_name": "Nano Banana",
"description": "Fast text-to-image and image-to-image at 1K.",
"capability": "image.generate",
"status": "active",
"params_schema": {
"resolutions": ["1K"],
"ratios": ["auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9"],
"max_n": 4,
"seed": true,
"max_images": 14,
"negative_prompt": true,
"max_prompt": 2000
},
"default_params": {"resolution": "1K", "ratio": "1:1", "n": 1},
"prices": {"image:1K": 2},
"available": true
},
{
"id": "nanobanana-pro",
"object": "model",
"created": 1756411279,
"owned_by": "genmux",
"display_name": "Nano Banana Pro",
"description": "Higher fidelity, with 1K, 2K and 4K output.",
"capability": "image.generate",
"status": "active",
"params_schema": {
"resolutions": ["1K", "2K", "4K"],
"ratios": ["auto", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9"],
"max_n": 4,
"seed": true,
"max_images": 14,
"negative_prompt": true,
"max_prompt": 2000
},
"default_params": {"resolution": "1K", "ratio": "1:1", "n": 1},
"prices": {"image:1K": 4, "image:2K": 6, "image:4K": 8},
"available": true
},
{
"id": "qwen3.8-max",
"object": "model",
"created": 1756411279,
"owned_by": "genmux",
"display_name": "Qwen3.8-Max",
"description": "Alibaba Qwen3.8-Max via gateway: flagship Qwen with a 1M-token context.",
"capability": "text.chat",
"status": "active",
"params_schema": {
"tools": true,
"context_tokens": 1000000,
"max_output_tokens": 16384,
"default_max_tokens": 2048
},
"default_params": {
"max_tokens": 2048,
"temperature": 0.7
},
"prices": {
"tokens_in:1M": 138.718,
"tokens_out:1M": 416.161
},
"available": true
}
]
}Prices are keyed by resolution tier: image:1K, image:2K, image:4K. A model advertises what it accepts in params_schema — resolutions, ratios, max_images (reference images; absent means image-to-image is not supported) and negative_prompt. Catalogue entries may still carry a legacy sizes list and matching image:WIDTHxHEIGHT prices for clients that send the deprecated size field; ignore both unless you do.
Text models carry capability: "text.chat", a params_schema with the context window, the max_tokens ceiling and default, and the thinking, web_search, vision, tools flags, and prices keyed tokens_in:1M / tokens_out:1M in credits per million tokens. The list has object: list, each row object: model, created and owned_by, and GET /v1/models/{id} returns one row.
Models & pricing
Job cost = credits per image (below) × n. It is reserved when you submit and refunded in full if the job fails or is cancelled.
| Model | 1K long edge ~1024 px | 2K long edge ~2048 px | 4K long edge ~4096 px |
|---|---|---|---|
nanobanana up to 4 images per request | 2credits ≈ $0.025 / image | — | — |
nanobanana-pro up to 4 images per request | 4credits ≈ $0.05 / image | 6credits ≈ $0.075 / image | 8credits ≈ $0.10 / image |
qwen-image-2 up to 4 images per request | 3credits ≈ $0.038 / image | 4credits ≈ $0.05 / image | — |
qwen-image-max up to 4 images per request | 8credits ≈ $0.10 / image | 9credits ≈ $0.113 / image | — |
seedream-5 up to 4 images per request | — | 16credits ≈ $0.20 / image | 18credits ≈ $0.225 / image |
wan-2-7-image up to 4 images per request | 2credits ≈ $0.025 / image | 3credits ≈ $0.038 / image | — |
Pick a tier with resolution and a shape with ratio. Money figures use the best-value pack ($0.013 per credit). Cost = credits × n; failed jobs are refunded in full.
Chat request cost = prompt tokens × input rate + completion tokens (including reasoning) × output rate, in credits per 1M tokens (below). Credits are decimal: a chat request is charged exactly, to three decimal places, and the balance and ledger show fractional credits. Image generations remain whole credits per image.
| Model | Context | Tools | Input / 1M | Output / 1M |
|---|---|---|---|---|
doubao-seed-2-pro | 256K | yes | 85credits $1.063 ≈ $0.0011 / 1K | 408credits $5.10 ≈ $0.0051 / 1K |
doubao-seed-2-code | 256K | yes | 85credits $1.063 ≈ $0.0011 / 1K | 408credits $5.10 ≈ $0.0051 / 1K |
doubao-seed-2-lite | 256K | — | 17credits $0.213 ≈ $0.0002 / 1K | 85credits $1.063 ≈ $0.0011 / 1K |
doubao-seed-2-mini | 256K | — | 2.146credits $0.027 ≈ $0.00 / 1K | 68credits $0.85 ≈ $0.0009 / 1K |
kimi-k3 | 1M | yes | 197.028credits $2.463 ≈ $0.0025 / 1K | 985.815credits $12.323 ≈ $0.0123 / 1K |
claude-opus-5-5 | 200K | yes | 146.88credits $1.836 ≈ $0.0018 / 1K | 734.4credits $9.18 ≈ $0.0092 / 1K |
claude-fable-5-1 | 200K | yes | 1,700credits $21.25 ≈ $0.0213 / 1K | 1,700credits $21.25 ≈ $0.0213 / 1K |
gpt-6-astra | 128K | yes | 68credits $0.85 ≈ $0.0009 / 1K | 340credits $4.25 ≈ $0.0043 / 1K |
gpt-5.6-terra | 128K | yes | 17credits $0.213 ≈ $0.0002 / 1K | 170credits $2.125 ≈ $0.0021 / 1K |
qwen3.8-max | 1M | yes | 138.718credits $1.734 ≈ $0.0017 / 1K | 416.161credits $5.202 ≈ $0.0052 / 1K |
Credits per 1M tokens; every message in the request is input, the reply (including reasoning) is output. Money figures use the best-value pack ($0.013 per credit). Nothing is charged when no tokens were produced.
Errors
Errors use application/problem+json. Match on code; request_id is also returned in the X-Request-ID header — include it when you email support@genmux.tech.
{"type": "…/errors/insufficient_credits", "title": "Payment Required", "status": 402, "code": "insufficient_credits", "detail": "account balance is too low for this request", "request_id": "…"}Exception: POST /v1/chat/completions (and only that route) answers in the OpenAI envelope — {"error": {"message", "type", "code", "param", "request_id"}} — with type one of invalid_request_error, authentication_error, permission_error, insufficient_quota, rate_limit_error, not_found_error, server_error, so the retry logic in the OpenAI SDKs and coding agents recognises rate limits and quota. The code values below are the same on both routes.
{"error": {"message": "account balance is too low for this request", "type": "insufficient_quota", "code": "insufficient_credits", "param": null, "request_id": "…"}}| HTTP | code | When |
|---|---|---|
| 400 | validation_error | Bad or missing field, unknown field, missing Idempotency-Key. |
| 400 | unsupported_parameter | Chat: a field the endpoint does not support (n > 1, legacy functions, logprobs, image_url on a model without vision, enable_thinking / web_search on a model without them). |
| 400 | tools_unsupported | Chat: tools sent to a model whose catalogue entry has no tools: true. |
| 400 | context_length_exceeded | Chat: the messages (plus max_tokens) do not fit the model's context window. Nothing is charged. |
| 401 | unauthorized | Missing, revoked or expired API key. |
| 402 | insufficient_credits | Balance lower than the job cost. Buy credits in the dashboard, or contact support@genmux.tech. |
| 403 | ip_not_allowed | Key has an IP allowlist and your address is not on it. |
| 404 | not_found | Unknown job id (or it belongs to another account). |
| 404 | model_not_found | Unknown model id. See GET /v1/models for the current catalogue. |
| 409 | conflict | Job cannot be cancelled in its current state. |
| 409 | idempotency_key_reused | Chat: the optional Idempotency-Key was already used for another completion. |
| 422 | idempotency_key_mismatch | Idempotency-Key reused with a different body. |
| 429 | rate_limited | Per-key request rate exceeded. Honour Retry-After. Need a higher limit? Contact support@genmux.tech. |
| 429 | too_many_inflight | More than max_inflight jobs queued/running. Wait for some to finish. |
| 502 | upstream_error | The model provider failed or timed out. Nothing is charged for a request that produced no tokens; retry. |
| 502 | json_invalid | Chat: the reply did not satisfy response_format after the automatic retry. Both attempts are billed. |
| 503 | model_unavailable | The model is temporarily disabled — nothing is charged. Retry later or pick another model. |
| 500 | internal_error | Our fault. Retry with the same Idempotency-Key — you will not be charged twice. |
Rate limits
Each key has a requests-per-second limit (default 10) and each account a cap on concurrent jobs (default 20). Limit responses are 429 with a Retry-After header in seconds. Need a higher limit? Email support@genmux.tech.
Webhooks
Pass webhook_url (https only, public host) when creating a job. We POST once when the job finishes and retry with backoff for up to 8 attempts until you return 2xx.
Content-Type: application/json
X-Webhook-Id: 1042
X-Webhook-Timestamp: 1756411279
X-Webhook-Signature: v1=3f7a…
{"type": "generation.succeeded", "id": "…", "status": "succeeded", "error_code": null, "created_at": "…", "finished_at": "…"}Verify the signature with your account’s webhook secret (Dashboard → Settings): HMAC-SHA256(secret, timestamp + "." + raw_body), hex-encoded, compared to the value after v1=. During a secret rotation two signatures are sent, comma-separated — accept either. Reject timestamps older than 5 minutes.
import { createHmac, timingSafeEqual } from "node:crypto";
export function verify(secret, headers, rawBody) {
const ts = headers["x-webhook-timestamp"];
const expected = createHmac("sha256", secret).update(ts + "." + rawBody).digest("hex");
return headers["x-webhook-signature"].split(",")
.some((s) => { const v = s.replace(/^v1=/, ""); return v.length === expected.length && timingSafeEqual(Buffer.from(v), Buffer.from(expected)); });
}