Developer API
Run Nexomake models from your code or MCP client. Estimate credits, track jobs and receive webhooks.
Quickstart
Create a key in your account and store it in the NEXOMAKE_KEY environment variable on your server. A read-only key is enough for the first request.
curl "https://nexomake.io/api/v1/models?type=image" \
-H "Authorization: Bearer $NEXOMAKE_KEY"
Send the key in Authorization: Bearer or X-Api-Key. Generation requires a spend-enabled key and an account with paid generation access.
REST reference
Base URL https://nexomake.io/api/v1
| Method | Path | Returns |
|---|---|---|
GET | /account | Balance, daily key limit and active jobs. |
GET | /models?type=image | Available models. Types: text, image, video and audio. |
GET | /models/{model} | Parameters, defaults and accepted media types. |
POST | /estimate | Estimate without spending credits. |
POST | /generations | Run a generation with an explicit credit ceiling. |
GET | /generations/{id}?wait=10 | Status, media URLs or text result. |
GET | /generations?limit=20 | Account-wide API history. Filter by type and status, paginate with cursor. |
POST | /files | Upload and get a file ID for generation. |
GET | /tools | Preset tool catalog and available styles. |
POST | /tools/{id}/estimate | Estimate a preset run. |
POST | /tools/{id}/run | Run a preset. Read its status at /generations/{id}. |
Generation and results
Send the model, prompt and settings to /estimate first. Use its credits value as max_credits when starting. For text this reserves credits, and final usage depends on the response size.
import os
import time
import uuid
import requests
base = "https://nexomake.io/api/v1"
headers = {"Authorization": "Bearer " + os.environ["NEXOMAKE_KEY"]}
payload = {
"model": "nano-banana-pro",
"prompt": "A white ceramic cup on a linen tablecloth, soft window light",
"params": {"aspect_ratio": "1:1"}
}
quote = requests.post(f"{base}/estimate", headers=headers, json=payload, timeout=15)
quote.raise_for_status()
payload["max_credits"] = quote.json()["credits"]
job_headers = {**headers, "Idempotency-Key": uuid.uuid4().hex}
response = requests.post(f"{base}/generations", headers=job_headers, json=payload, timeout=90)
response.raise_for_status()
job = response.json()
while job["status"] == "processing":
time.sleep(3)
response = requests.get(f"{base}/generations/{job['id']}", headers=headers, timeout=15)
response.raise_for_status()
job = response.json()
print(job)
After a network failure, retry the same body and Idempotency-Key to retrieve the original job. A different body with the same key returns 409. Terminal statuses are completed and failed.
Files
Upload an image, video, or audio file up to 20 MB. Pass the returned ID in the files array. You can use the ID in your account for 48 hours. A model may set stricter type, size or count limits.
curl -X POST "https://nexomake.io/api/v1/files" \
-H "Authorization: Bearer $NEXOMAKE_KEY" \
-F "file=@reference.jpg"
To import by link, send JSON with a url field. The public HTTPS address must serve the file directly without redirects.
MCP
Add the remote server to a client with Streamable HTTP and a configurable Authorization header. The client discovers available tools using tools/list. A read-only key covers the catalog, estimates and history.
{
"mcpServers": {
"nexomake": {
"type": "http",
"url": "https://nexomake.io/mcp/",
"headers": { "Authorization": "Bearer YOUR_NEXOMAKE_KEY" }
}
}
}
The example uses a common configuration format. Syntax varies by client. Supported protocol revisions are 2025-03-26, 2025-06-18, 2025-11-25 and 2026-07-28.
Webhooks
Set callback_url at launch. When the job finishes, the server posts JSON with event and generation. Verify the signature against the raw bytes, reject timestamps older than five minutes, and process each X-Nexomake-Delivery only once.
timestamp = request.headers["X-Nexomake-Timestamp"]
expected = "sha256=" + hmac.new(
webhook_secret.encode(),
timestamp.encode() + b"." + request.get_data(),
hashlib.sha256,
).hexdigest()
valid = hmac.compare_digest(expected, request.headers["X-Nexomake-Signature"])
Use the webhook secret shown when you create the key. Delivery has up to five attempts. Return 2xx after receiving the event.
Limits and errors
Up to 60 requests per minute per key and three active generations per account. Daily per-key limits count reservations for the Moscow calendar day.
| HTTP | What to do |
|---|---|
| 401, 403 | Check the key, account access and scope. |
| 402 | Top up your credit balance. |
| 409 | Confirm current pricing or use a new idempotency key for a new request. |
| 422 | Check the model input and the error.code and error.message response fields. |
| 429 | Read error.code, check /account, or retry after Retry-After. |