Developers
Creativox API
Create products, generate images and receive signed webhooks from your code, or connect Claude Code, Codex and Cursor through MCP. Everything is charged to your workspace credits.
Create an API keyQuickstart
Three steps from zero to your first generated image.
1. Create an API key
Sign in, open Settings, API tab, and create a key (workspace owners and admins only). Copy it when it is shown: you will not see it again. Keep it in an environment variable, never in source control.
export CREATIVOX_API_KEY="cvx_live_..."2. Check the key works
List the models available to your workspace.
curl -H "Authorization: Bearer $CREATIVOX_API_KEY" https://api.creativox.app/api/v1/models3. Generate your first image
Send a generation with an Idempotency-Key so a retry never charges you twice, then read it back until its status is completed. Outputs carry signed URLs that expire; ask again for fresh ones.
curl -X POST https://api.creativox.app/api/v1/generations \
-H "Authorization: Bearer $CREATIVOX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"type": "txt2img", "format": "1:1", "prompt": "A ceramic mug on a travertine table, soft morning light"}'curl -H "Authorization: Bearer $CREATIVOX_API_KEY" https://api.creativox.app/api/v1/generations/<generation_id>Authentication and scopes
Send the key as a bearer token: Authorization: Bearer cvx_live_... (the X-Api-Key header is also accepted). Keys belong to one workspace and can only do what their scopes allow. They can never manage billing, API keys or members.
Authorization: Bearer cvx_live_...| Scope | Allows |
|---|---|
| generations:read | Read generations and their outputs. |
| generations:write | Create generations and mark favorites. |
| products:read | List and read products. |
| products:write | Create, edit and delete products; upload images, including from a URL. |
| library:read | Read the asset library. |
| account:read | Read account, credit balance, models and templates. |
Create read-only keys for dashboards and a daily credit cap for every key that can generate.
Errors
Errors use standard HTTP statuses and a stable JSON body. Branch on detail.code, never on the message text.
{ "detail": { "code": "INSUFFICIENT_CREDITS", "message": "Not enough credits" } }| Status | Meaning |
|---|---|
| 400 | The request is malformed. |
| 401 | Missing, revoked or expired key (API_KEY_INVALID). |
| 402 | Not enough credits (INSUFFICIENT_CREDITS). |
| 403 | The key lacks the scope, or the endpoint is not available to keys (KEY_NOT_ALLOWED). |
| 404 | The resource does not exist in your workspace. |
| 409 | Conflict, for example PLAN_LIMIT_REACHED when your plan has no room for another key or webhook. |
| 422 | Validation failed. The detail explains which field. |
| 429 | Rate limited. Wait for the Retry-After header (seconds) before retrying. |
Limits per plan
Your plan sets how many keys and webhook endpoints you can have and the default daily credit cap of a new key. Existing keys keep working if a limit is lowered later.
| Plan | API keys | Default daily credit cap | Webhook endpoints |
|---|---|---|---|
| Free | 1 | 20 | 0 |
| Starter | 5 | 200 | 2 |
| Pro | 20 | No cap | 5 |
Values come straight from the API.
Webhooks
Instead of polling, register an HTTPS endpoint in Settings, API tab. Creativox sends a signed POST when a generation completes or fails. Webhooks follow the Standard Webhooks specification.
Events: generation.completed and generation.failed. The payload has no image URLs (they expire): call GET /api/v1/generations/{id} to fetch them.
{
"type": "generation.completed",
"id": "5d6f6b1e-0c5a-4a43-9d3e-2f2b7a1c9e10",
"created_at": "2026-11-10T12:00:00Z",
"data": {
"generation_id": "c1a2b3d4-0000-4000-8000-000000000000",
"status": "completed",
"model": "<model-id>",
"outputs": [{ "id": "<output-id>" }],
"api_key_id": "<key-id-or-null>"
}
}Each request carries the headers webhook-id, webhook-timestamp and webhook-signature (the string v1, followed by the base64 HMAC-SHA256). The signed content is {webhook-id}.{webhook-timestamp}.{raw body} and the key is the base64 part of your whsec_ secret.
Reply with any 2xx within 10 seconds. Failed deliveries are retried after 30 seconds, 2 minutes, 10 minutes, 1 hour, 6 hours and 24 hours; after 20 consecutive failures the endpoint is disabled and the owner and admins are emailed. Deliveries can repeat: deduplicate with webhook-id.
Destinations must be public https URLs on port 443 or 8443. Redirects, credentials in the URL and private or internal addresses are rejected.
Verify the signature
Verify the raw request body before parsing it. The official libraries do it for you; the manual versions need no dependency.
With the official library
# pip install standardwebhooks
import os
from standardwebhooks import Webhook, WebhookVerificationError
wh = Webhook(os.environ["CREATIVOX_WEBHOOK_SECRET"]) # whsec_...
def handle(raw_body: bytes, headers: dict):
try:
event = wh.verify(raw_body, headers) # checks signature and timestamp
except WebhookVerificationError:
return 400
# event["type"] is "generation.completed" or "generation.failed"
return 200// npm install standardwebhooks
import { Webhook } from "standardwebhooks";
const wh = new Webhook(process.env.CREATIVOX_WEBHOOK_SECRET); // whsec_...
export function handle(rawBody, headers) {
try {
const event = wh.verify(rawBody, headers); // checks signature and timestamp
// event.type is "generation.completed" or "generation.failed"
return 200;
} catch {
return 400;
}
}Without dependencies
import base64, hashlib, hmac, os, time
SECRET = os.environ["CREATIVOX_WEBHOOK_SECRET"] # whsec_...
KEY = base64.b64decode(SECRET.removeprefix("whsec_"))
def verify(raw_body: bytes, headers: dict) -> bool:
msg_id = headers["webhook-id"]
ts = headers["webhook-timestamp"]
if abs(time.time() - int(ts)) > 300: # replay window: 5 minutes
return False
signed = f"{msg_id}.{ts}.".encode() + raw_body
expected = base64.b64encode(hmac.new(KEY, signed, hashlib.sha256).digest()).decode()
for part in headers["webhook-signature"].split(" "):
version, _, sig = part.partition(",")
if version == "v1" and hmac.compare_digest(sig, expected):
return True
return Falseimport { createHmac, timingSafeEqual } from "node:crypto";
const KEY = Buffer.from(process.env.CREATIVOX_WEBHOOK_SECRET.replace(/^whsec_/, ""), "base64");
export function verify(rawBody, headers) {
const id = headers["webhook-id"];
const ts = headers["webhook-timestamp"];
if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; // replay window
const expected = createHmac("sha256", KEY).update(`${id}.${ts}.${rawBody}`).digest("base64");
return headers["webhook-signature"].split(" ").some((part) => {
const [version, sig] = part.split(",");
const a = Buffer.from(sig ?? "");
const b = Buffer.from(expected);
return version === "v1" && a.length === b.length && timingSafeEqual(a, b);
});
}MCP setup
The remote MCP server lets AI agents create products, upload and import images, generate images and read your library using the same API key and scopes. Endpoint: https://api.creativox.app/mcp
Claude Code
claude mcp add --transport http creativox https://api.creativox.app/mcp --header "Authorization: Bearer $CREATIVOX_API_KEY"Codex
File: ~/.codex/config.toml
[mcp_servers.creativox]
url = "https://api.creativox.app/mcp"
bearer_token_env_var = "CREATIVOX_API_KEY"Cursor
File: .cursor/mcp.json
{
"mcpServers": {
"creativox": {
"url": "https://api.creativox.app/mcp",
"headers": {
"Authorization": "Bearer ${env:CREATIVOX_API_KEY}"
}
}
}
}Sign-in with OAuth (for claude.ai and ChatGPT connectors) is coming soon. For now use an API key.
API reference
Generated from the live OpenAPI document. Base URL: https://api.creativox.app Machine-readable OpenAPI document
billing
GET/api/v1/billing/balanceRead Billing Balance
Scopes: account:read
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| balance | integer | yes | |
| plan | string | yes | |
| billing_status | BillingStatus | no | |
| monthly_quota | integer | null | no | |
| promo_label | string | null | no |
Response 422 Validation Error
generations
GET/api/v1/generationsList Generations
Scopes: generations:read
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit (query) | integer | no | |
| offset (query) | integer | no | |
| status (query) | GenerationStatus | null | no | |
| product_id (query) | string (uuid) | null | no |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| items | array<GenerationRead> | yes | |
| items[].id | string (uuid) | yes | |
| items[].workspace_id | string (uuid) | yes | |
| items[].user_id | string (uuid) | yes | |
| items[].product_id | string (uuid) | null | yes | |
| items[].parent_id | string (uuid) | null | yes | |
| items[].prompt | string | yes | |
| items[].provider | string | yes | |
| items[].model | string | yes | |
| items[].type | string | yes | |
| items[].status | GenerationStatus | yes | |
| items[].format | 1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5 | yes | |
| items[].image_format | string | yes | Encoded image format (e.g. png). |
| items[].output_urls | array<string> | yes | |
| items[].outputs | array<GenerationOutput> | no | |
| items[].outputs[].id | string | yes | |
| items[].outputs[].url | string | yes | |
| items[].outputs[].preview_url | string | null | no | |
| items[].preview_url | string | null | no | |
| items[].metadata | object | yes | |
| items[].credits_consumed | integer | yes | |
| items[].is_favorite | boolean | yes | |
| items[].created_at | string (date-time) | yes | |
| items[].updated_at | string (date-time) | yes | |
| total | integer | yes |
Response 422 Validation Error
POST/api/v1/generationsCreate Generation
Scopes: generations:write
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| template_id | string (uuid) | null | no | |
| template_slug | string | null | no | |
| template_vars | object | no | |
| prompt | string | null | no | |
| format | 1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5 | yes | Output aspect ratio. |
| product_id | string (uuid) | null | no | |
| parent_id | string (uuid) | null | no | |
| type | txt2img | img2img | yes | txt2img or img2img. |
| model | string | null | no | Model ID. If omitted, uses the default model. |
| num_images | integer | no | Images to generate in this request (default 1). Must not exceed the model's `max_images` (GET /models); credits charged = per-image cost x num_images. |
| model_prompt | string | null | no | Prompt traducido a inglés en el cliente para enviar al proveedor; el prompt visible sigue siendo `prompt`. |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | yes | |
| workspace_id | string (uuid) | yes | |
| user_id | string (uuid) | yes | |
| product_id | string (uuid) | null | yes | |
| parent_id | string (uuid) | null | yes | |
| prompt | string | yes | |
| provider | string | yes | |
| model | string | yes | |
| type | string | yes | |
| status | GenerationStatus | yes | |
| format | 1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5 | yes | |
| image_format | string | yes | Encoded image format (e.g. png). |
| output_urls | array<string> | yes | |
| outputs | array<GenerationOutput> | no | |
| outputs[].id | string | yes | |
| outputs[].url | string | yes | |
| outputs[].preview_url | string | null | no | |
| preview_url | string | null | no | |
| metadata | object | yes | |
| credits_consumed | integer | yes | |
| is_favorite | boolean | yes | |
| created_at | string (date-time) | yes | |
| updated_at | string (date-time) | yes |
Response 422 Validation Error
GET/api/v1/generations/{generation_id}Get Generation
Scopes: generations:read
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| generation_id (path) | string (uuid) | yes |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | yes | |
| workspace_id | string (uuid) | yes | |
| user_id | string (uuid) | yes | |
| product_id | string (uuid) | null | yes | |
| parent_id | string (uuid) | null | yes | |
| prompt | string | yes | |
| provider | string | yes | |
| model | string | yes | |
| type | string | yes | |
| status | GenerationStatus | yes | |
| format | 1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5 | yes | |
| image_format | string | yes | Encoded image format (e.g. png). |
| output_urls | array<string> | yes | |
| outputs | array<GenerationOutput> | no | |
| outputs[].id | string | yes | |
| outputs[].url | string | yes | |
| outputs[].preview_url | string | null | no | |
| preview_url | string | null | no | |
| metadata | object | yes | |
| credits_consumed | integer | yes | |
| is_favorite | boolean | yes | |
| created_at | string (date-time) | yes | |
| updated_at | string (date-time) | yes |
Response 422 Validation Error
PATCH/api/v1/generations/{generation_id}/favoriteToggle Generation Favorite
Scopes: generations:write
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| generation_id (path) | string (uuid) | yes |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | yes | |
| is_favorite | boolean | yes |
Response 422 Validation Error
library
GET/api/v1/libraryList Library
Scopes: library:read
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit (query) | integer | no | Page size (max 100). |
| cursor (query) | string | null | no | Opaque cursor from the previous page's `next_cursor` (base64url JSON: `created_at` ISO-8601 + `id` UUID). |
| status (query) | GenerationStatus | null | no | |
| is_favorite (query) | boolean | null | no | When set, only favorites (true) or non-favorites (false). |
| product_id (query) | string (uuid) | null | no |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| items | array<GenerationRead> | yes | |
| items[].id | string (uuid) | yes | |
| items[].workspace_id | string (uuid) | yes | |
| items[].user_id | string (uuid) | yes | |
| items[].product_id | string (uuid) | null | yes | |
| items[].parent_id | string (uuid) | null | yes | |
| items[].prompt | string | yes | |
| items[].provider | string | yes | |
| items[].model | string | yes | |
| items[].type | string | yes | |
| items[].status | GenerationStatus | yes | |
| items[].format | 1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5 | yes | |
| items[].image_format | string | yes | Encoded image format (e.g. png). |
| items[].output_urls | array<string> | yes | |
| items[].outputs | array<GenerationOutput> | no | |
| items[].outputs[].id | string | yes | |
| items[].outputs[].url | string | yes | |
| items[].outputs[].preview_url | string | null | no | |
| items[].preview_url | string | null | no | |
| items[].metadata | object | yes | |
| items[].credits_consumed | integer | yes | |
| items[].is_favorite | boolean | yes | |
| items[].created_at | string (date-time) | yes | |
| items[].updated_at | string (date-time) | yes | |
| next_cursor | string | null | no | Opaque cursor for the next page: base64url-encoded JSON `{"created_at":"<ISO-8601>","id":"<uuid>"}` matching the last item on this page. Omit on the first request; pass the previous `next_cursor` to continue. |
| has_more | boolean | yes | True when more items exist after `items` using `next_cursor`. |
Response 422 Validation Error
mcp
POST/mcpRemote MCP (Streamable HTTP)
Stateless JSON-RPC MCP tools with workspace bearer API keys. Requests with a progress token receive SSE. Tool scopes match REST. See https://github.com/modelcontextprotocol/python-sdk for MCP clients.
Scopes: Any valid key
Response 200 MCP JSON-RPC result or SSE stream
me
GET/api/v1/meRead Me
Scopes: account:read
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| workspace | KeyWorkspaceOut | yes | |
| workspace.id | string (uuid) | yes | |
| workspace.name | string | yes | |
| key | CurrentKeyOut | yes | |
| key.id | string (uuid) | yes | |
| key.name | string | yes | |
| key.prefix | string | yes | |
| key.scopes | array<string> | yes |
Response 422 Validation Error
models
GET/api/v1/modelsList Available Models
Scopes: account:read
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| [].model_id | string | yes | |
| [].provider | string | yes | |
| [].display_name | string | yes | |
| [].description | string | yes | |
| [].credit_cost | integer | yes | |
| [].speed_tier | string | yes | |
| [].quality_tier | string | yes | |
| [].capabilities | array<string> | yes | |
| [].supported_aspects | array<string> | yes | |
| [].max_resolution | string | yes | |
| [].is_default | boolean | yes | |
| [].max_images | integer | yes | Largest `num_images` POST /generations accepts for this model. |
Response 422 Validation Error
products
GET/api/v1/productsList Products
Scopes: products:read
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit (query) | integer | no | |
| offset (query) | integer | no |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| items | array<ProductRead> | yes | |
| items[].id | string (uuid) | yes | |
| items[].workspace_id | string (uuid) | yes | |
| items[].name | string | yes | |
| items[].description | string | null | yes | |
| items[].product_type | ropa | joyeria | belleza | hogar | suplementos | null | yes | |
| items[].base_images | array<string> | yes | |
| items[].image_urls | object | no | |
| items[].created_at | string (date-time) | yes | |
| items[].updated_at | string (date-time) | yes | |
| total | integer | yes |
Response 422 Validation Error
POST/api/v1/productsCreate Product
Scopes: products:write
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | yes | |
| description | string | null | no | |
| product_type | ropa | joyeria | belleza | hogar | suplementos | null | no |
Response 201 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | yes | |
| workspace_id | string (uuid) | yes | |
| name | string | yes | |
| description | string | null | yes | |
| product_type | ropa | joyeria | belleza | hogar | suplementos | null | yes | |
| base_images | array<string> | yes | |
| image_urls | object | no | |
| created_at | string (date-time) | yes | |
| updated_at | string (date-time) | yes |
Response 422 Validation Error
GET/api/v1/products/{product_id}Get Product
Scopes: products:read
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product_id (path) | string (uuid) | yes |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | yes | |
| workspace_id | string (uuid) | yes | |
| name | string | yes | |
| description | string | null | yes | |
| product_type | ropa | joyeria | belleza | hogar | suplementos | null | yes | |
| base_images | array<string> | yes | |
| image_urls | object | no | |
| created_at | string (date-time) | yes | |
| updated_at | string (date-time) | yes |
Response 422 Validation Error
PATCH/api/v1/products/{product_id}Update Product
Scopes: products:write
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product_id (path) | string (uuid) | yes |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | null | no | |
| description | string | null | no | |
| product_type | ropa | joyeria | belleza | hogar | suplementos | null | no |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | yes | |
| workspace_id | string (uuid) | yes | |
| name | string | yes | |
| description | string | null | yes | |
| product_type | ropa | joyeria | belleza | hogar | suplementos | null | yes | |
| base_images | array<string> | yes | |
| image_urls | object | no | |
| created_at | string (date-time) | yes | |
| updated_at | string (date-time) | yes |
Response 422 Validation Error
DELETE/api/v1/products/{product_id}Delete Product
Scopes: products:write
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product_id (path) | string (uuid) | yes |
Response 204 Successful Response
Response 422 Validation Error
POST/api/v1/products/{product_id}/confirm-uploadConfirm Upload
Scopes: products:write
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product_id (path) | string (uuid) | yes |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| key | string | yes |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | yes | |
| workspace_id | string (uuid) | yes | |
| name | string | yes | |
| description | string | null | yes | |
| product_type | ropa | joyeria | belleza | hogar | suplementos | null | yes | |
| base_images | array<string> | yes | |
| image_urls | object | no | |
| created_at | string (date-time) | yes | |
| updated_at | string (date-time) | yes |
Response 422 Validation Error
POST/api/v1/products/{product_id}/images/from-urlImport Product Image
Scopes: products:write
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product_id (path) | string (uuid) | yes |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | yes |
Response 202 Successful Response
Response 422 Validation Error
GET/api/v1/products/{product_id}/images/imports/{import_id}Get Product Image Import
Scopes: products:read
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product_id (path) | string (uuid) | yes | |
| import_id (path) | string (uuid) | yes |
Response 200 Successful Response
Response 422 Validation Error
POST/api/v1/products/{product_id}/upload-urlRequest Upload Url
Scopes: products:write
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| product_id (path) | string (uuid) | yes |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| filename | string | yes | |
| content_type | string | yes | |
| content_length | integer | yes | Exact byte size of the file to upload. It is validated against the product image size policy and bound into the presigned URL signature, so storage rejects any body of a different size. |
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | yes | |
| method | string | no | |
| headers | object | yes | |
| upload_id | string | yes | |
| curl | string | yes | |
| upload_url | string | yes | |
| key | string | yes | |
| expires_in | integer | yes |
Response 422 Validation Error
templates
GET/api/v1/templatesList Templates
List active global templates (not scoped to workspace).
Scopes: account:read
Response 200 Successful Response
| Name | Type | Required | Description |
|---|---|---|---|
| items | array<TemplateRead> | yes | |
| items[].id | string (uuid) | yes | |
| items[].name | string | yes | |
| items[].slug | string | null | yes | |
| items[].category | string | yes | |
| items[].description | string | null | yes | |
| items[].prompt_template | string | yes | |
| items[].preview_url | string | null | yes | |
| items[].default_format | string | yes | |
| items[].product_types | array<string> | yes | |
| items[].formats | array<string> | yes | |
| items[].is_active | boolean | yes | |
| items[].sort_order | integer | yes | |
| items[].created_at | string (date-time) | yes | |
| items[].updated_at | string (date-time) | yes |