genmux API is now generally available. Read the docs →
genmux API

API reference

Base URL https://api.genmux.tech. All requests and responses are JSON. Every request needs an API key.

Quick start

Create a key in the dashboard, export it, then run the commands exactly as shown.

export API_KEY=nb_live_...   # from Dashboard → API keys

1. Submit a generation

curl -s -X POST https://api.genmux.tech/v1/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"model":"nanobanana","prompt":"a red fox in snow","resolution":"1K","ratio":"1:1"}'
Response · 202 Accepted
{
  "id": "0d8b6a3e-2f1c-4a5b-9c1d-7e2f3a4b5c6d",
  "model": "nanobanana",
  "status": "queued",
  "params": {"prompt": "a red fox in snow", "n": 1, "resolution": "1K", "ratio": "1:1"},
  "cost": 2,
  "created_at": "2026-08-28T20:01:12.345Z"
}

2. Poll until status = succeeded (typically 1–20 s)

curl -s https://api.genmux.tech/v1/generations/0d8b6a3e-2f1c-4a5b-9c1d-7e2f3a4b5c6d \
  -H "Authorization: Bearer $API_KEY"
Response · 200 OK
{
  "id": "0d8b6a3e-2f1c-4a5b-9c1d-7e2f3a4b5c6d",
  "model": "nanobanana",
  "status": "succeeded",
  "params": {"prompt": "a red fox in snow", "n": 1, "resolution": "1K", "ratio": "1:1"},
  "cost": 2,
  "images": [
    {
      "index": 0,
      "url": "https://…/0.png?X-Amz-Expires=900&…",
      "expires_at": "2026-08-28T20:16:30Z",
      "mime": "image/png",
      "width": 1024,
      "height": 1024,
      "bytes": 1843201,
      "sha256": "9f2c…"
    }
  ],
  "created_at": "2026-08-28T20:01:12.345Z",
  "finished_at": "2026-08-28T20:01:19.802Z"
}

3. Download the image (the URL is valid for 15 minutes)

curl -s -o fox.png "https://…/0.png?X-Amz-Expires=900&…"

Authentication

Send the key as a bearer token. Keys start with nb_live_, are shown once when created, and can be rotated or revoked in the dashboard.

Authorization: Bearer $API_KEY

Optional per-key IP allowlist: requests from other addresses get 403 ip_not_allowed.