Skip to main content

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 key

Quickstart

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/models

3. 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_...
ScopeAllows
generations:readRead generations and their outputs.
generations:writeCreate generations and mark favorites.
products:readList and read products.
products:writeCreate, edit and delete products; upload images, including from a URL.
library:readRead the asset library.
account:readRead 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.

Error body
{ "detail": { "code": "INSUFFICIENT_CREDITS", "message": "Not enough credits" } }
StatusMeaning
400The request is malformed.
401Missing, revoked or expired key (API_KEY_INVALID).
402Not enough credits (INSUFFICIENT_CREDITS).
403The key lacks the scope, or the endpoint is not available to keys (KEY_NOT_ALLOWED).
404The resource does not exist in your workspace.
409Conflict, for example PLAN_LIMIT_REACHED when your plan has no room for another key or webhook.
422Validation failed. The detail explains which field.
429Rate 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.

PlanAPI keysDefault daily credit capWebhook endpoints
Free1200
Starter52002
Pro20No cap5

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.

Event payload
{
  "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

Python
# 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
Node.js
// 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

Python
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 False
Node.js
import { 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

NameTypeRequiredDescription
balanceintegeryes
planstringyes
billing_statusBillingStatusno
monthly_quotainteger | nullno
promo_labelstring | nullno

Response 422 Validation Error

generations

GET/api/v1/generationsList Generations

Scopes: generations:read

Parameters

NameTypeRequiredDescription
limit (query)integerno
offset (query)integerno
status (query)GenerationStatus | nullno
product_id (query)string (uuid) | nullno

Response 200 Successful Response

NameTypeRequiredDescription
itemsarray<GenerationRead>yes
items[].idstring (uuid)yes
items[].workspace_idstring (uuid)yes
items[].user_idstring (uuid)yes
items[].product_idstring (uuid) | nullyes
items[].parent_idstring (uuid) | nullyes
items[].promptstringyes
items[].providerstringyes
items[].modelstringyes
items[].typestringyes
items[].statusGenerationStatusyes
items[].format1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5yes
items[].image_formatstringyesEncoded image format (e.g. png).
items[].output_urlsarray<string>yes
items[].outputsarray<GenerationOutput>no
items[].outputs[].idstringyes
items[].outputs[].urlstringyes
items[].outputs[].preview_urlstring | nullno
items[].preview_urlstring | nullno
items[].metadataobjectyes
items[].credits_consumedintegeryes
items[].is_favoritebooleanyes
items[].created_atstring (date-time)yes
items[].updated_atstring (date-time)yes
totalintegeryes

Response 422 Validation Error

POST/api/v1/generationsCreate Generation

Scopes: generations:write

Request body

NameTypeRequiredDescription
template_idstring (uuid) | nullno
template_slugstring | nullno
template_varsobjectno
promptstring | nullno
format1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5yesOutput aspect ratio.
product_idstring (uuid) | nullno
parent_idstring (uuid) | nullno
typetxt2img | img2imgyestxt2img or img2img.
modelstring | nullnoModel ID. If omitted, uses the default model.
num_imagesintegernoImages 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_promptstring | nullnoPrompt traducido a inglés en el cliente para enviar al proveedor; el prompt visible sigue siendo `prompt`.

Response 200 Successful Response

NameTypeRequiredDescription
idstring (uuid)yes
workspace_idstring (uuid)yes
user_idstring (uuid)yes
product_idstring (uuid) | nullyes
parent_idstring (uuid) | nullyes
promptstringyes
providerstringyes
modelstringyes
typestringyes
statusGenerationStatusyes
format1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5yes
image_formatstringyesEncoded image format (e.g. png).
output_urlsarray<string>yes
outputsarray<GenerationOutput>no
outputs[].idstringyes
outputs[].urlstringyes
outputs[].preview_urlstring | nullno
preview_urlstring | nullno
metadataobjectyes
credits_consumedintegeryes
is_favoritebooleanyes
created_atstring (date-time)yes
updated_atstring (date-time)yes

Response 422 Validation Error

GET/api/v1/generations/{generation_id}Get Generation

Scopes: generations:read

Parameters

NameTypeRequiredDescription
generation_id (path)string (uuid)yes

Response 200 Successful Response

NameTypeRequiredDescription
idstring (uuid)yes
workspace_idstring (uuid)yes
user_idstring (uuid)yes
product_idstring (uuid) | nullyes
parent_idstring (uuid) | nullyes
promptstringyes
providerstringyes
modelstringyes
typestringyes
statusGenerationStatusyes
format1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5yes
image_formatstringyesEncoded image format (e.g. png).
output_urlsarray<string>yes
outputsarray<GenerationOutput>no
outputs[].idstringyes
outputs[].urlstringyes
outputs[].preview_urlstring | nullno
preview_urlstring | nullno
metadataobjectyes
credits_consumedintegeryes
is_favoritebooleanyes
created_atstring (date-time)yes
updated_atstring (date-time)yes

Response 422 Validation Error

PATCH/api/v1/generations/{generation_id}/favoriteToggle Generation Favorite

Scopes: generations:write

Parameters

NameTypeRequiredDescription
generation_id (path)string (uuid)yes

Response 200 Successful Response

NameTypeRequiredDescription
idstring (uuid)yes
is_favoritebooleanyes

Response 422 Validation Error

library

GET/api/v1/libraryList Library

Scopes: library:read

Parameters

NameTypeRequiredDescription
limit (query)integernoPage size (max 100).
cursor (query)string | nullnoOpaque cursor from the previous page's `next_cursor` (base64url JSON: `created_at` ISO-8601 + `id` UUID).
status (query)GenerationStatus | nullno
is_favorite (query)boolean | nullnoWhen set, only favorites (true) or non-favorites (false).
product_id (query)string (uuid) | nullno

Response 200 Successful Response

NameTypeRequiredDescription
itemsarray<GenerationRead>yes
items[].idstring (uuid)yes
items[].workspace_idstring (uuid)yes
items[].user_idstring (uuid)yes
items[].product_idstring (uuid) | nullyes
items[].parent_idstring (uuid) | nullyes
items[].promptstringyes
items[].providerstringyes
items[].modelstringyes
items[].typestringyes
items[].statusGenerationStatusyes
items[].format1:1 | 9:16 | 16:9 | 4:3 | 3:4 | 4:5yes
items[].image_formatstringyesEncoded image format (e.g. png).
items[].output_urlsarray<string>yes
items[].outputsarray<GenerationOutput>no
items[].outputs[].idstringyes
items[].outputs[].urlstringyes
items[].outputs[].preview_urlstring | nullno
items[].preview_urlstring | nullno
items[].metadataobjectyes
items[].credits_consumedintegeryes
items[].is_favoritebooleanyes
items[].created_atstring (date-time)yes
items[].updated_atstring (date-time)yes
next_cursorstring | nullnoOpaque 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_morebooleanyesTrue 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

NameTypeRequiredDescription
workspaceKeyWorkspaceOutyes
workspace.idstring (uuid)yes
workspace.namestringyes
keyCurrentKeyOutyes
key.idstring (uuid)yes
key.namestringyes
key.prefixstringyes
key.scopesarray<string>yes

Response 422 Validation Error

models

GET/api/v1/modelsList Available Models

Scopes: account:read

Response 200 Successful Response

NameTypeRequiredDescription
[].model_idstringyes
[].providerstringyes
[].display_namestringyes
[].descriptionstringyes
[].credit_costintegeryes
[].speed_tierstringyes
[].quality_tierstringyes
[].capabilitiesarray<string>yes
[].supported_aspectsarray<string>yes
[].max_resolutionstringyes
[].is_defaultbooleanyes
[].max_imagesintegeryesLargest `num_images` POST /generations accepts for this model.

Response 422 Validation Error

products

GET/api/v1/productsList Products

Scopes: products:read

Parameters

NameTypeRequiredDescription
limit (query)integerno
offset (query)integerno

Response 200 Successful Response

NameTypeRequiredDescription
itemsarray<ProductRead>yes
items[].idstring (uuid)yes
items[].workspace_idstring (uuid)yes
items[].namestringyes
items[].descriptionstring | nullyes
items[].product_typeropa | joyeria | belleza | hogar | suplementos | nullyes
items[].base_imagesarray<string>yes
items[].image_urlsobjectno
items[].created_atstring (date-time)yes
items[].updated_atstring (date-time)yes
totalintegeryes

Response 422 Validation Error

POST/api/v1/productsCreate Product

Scopes: products:write

Request body

NameTypeRequiredDescription
namestringyes
descriptionstring | nullno
product_typeropa | joyeria | belleza | hogar | suplementos | nullno

Response 201 Successful Response

NameTypeRequiredDescription
idstring (uuid)yes
workspace_idstring (uuid)yes
namestringyes
descriptionstring | nullyes
product_typeropa | joyeria | belleza | hogar | suplementos | nullyes
base_imagesarray<string>yes
image_urlsobjectno
created_atstring (date-time)yes
updated_atstring (date-time)yes

Response 422 Validation Error

GET/api/v1/products/{product_id}Get Product

Scopes: products:read

Parameters

NameTypeRequiredDescription
product_id (path)string (uuid)yes

Response 200 Successful Response

NameTypeRequiredDescription
idstring (uuid)yes
workspace_idstring (uuid)yes
namestringyes
descriptionstring | nullyes
product_typeropa | joyeria | belleza | hogar | suplementos | nullyes
base_imagesarray<string>yes
image_urlsobjectno
created_atstring (date-time)yes
updated_atstring (date-time)yes

Response 422 Validation Error

PATCH/api/v1/products/{product_id}Update Product

Scopes: products:write

Parameters

NameTypeRequiredDescription
product_id (path)string (uuid)yes

Request body

NameTypeRequiredDescription
namestring | nullno
descriptionstring | nullno
product_typeropa | joyeria | belleza | hogar | suplementos | nullno

Response 200 Successful Response

NameTypeRequiredDescription
idstring (uuid)yes
workspace_idstring (uuid)yes
namestringyes
descriptionstring | nullyes
product_typeropa | joyeria | belleza | hogar | suplementos | nullyes
base_imagesarray<string>yes
image_urlsobjectno
created_atstring (date-time)yes
updated_atstring (date-time)yes

Response 422 Validation Error

DELETE/api/v1/products/{product_id}Delete Product

Scopes: products:write

Parameters

NameTypeRequiredDescription
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

NameTypeRequiredDescription
product_id (path)string (uuid)yes

Request body

NameTypeRequiredDescription
keystringyes

Response 200 Successful Response

NameTypeRequiredDescription
idstring (uuid)yes
workspace_idstring (uuid)yes
namestringyes
descriptionstring | nullyes
product_typeropa | joyeria | belleza | hogar | suplementos | nullyes
base_imagesarray<string>yes
image_urlsobjectno
created_atstring (date-time)yes
updated_atstring (date-time)yes

Response 422 Validation Error

POST/api/v1/products/{product_id}/images/from-urlImport Product Image

Scopes: products:write

Parameters

NameTypeRequiredDescription
product_id (path)string (uuid)yes

Request body

NameTypeRequiredDescription
urlstringyes

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

NameTypeRequiredDescription
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

NameTypeRequiredDescription
product_id (path)string (uuid)yes

Request body

NameTypeRequiredDescription
filenamestringyes
content_typestringyes
content_lengthintegeryesExact 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

NameTypeRequiredDescription
urlstringyes
methodstringno
headersobjectyes
upload_idstringyes
curlstringyes
upload_urlstringyes
keystringyes
expires_inintegeryes

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

NameTypeRequiredDescription
itemsarray<TemplateRead>yes
items[].idstring (uuid)yes
items[].namestringyes
items[].slugstring | nullyes
items[].categorystringyes
items[].descriptionstring | nullyes
items[].prompt_templatestringyes
items[].preview_urlstring | nullyes
items[].default_formatstringyes
items[].product_typesarray<string>yes
items[].formatsarray<string>yes
items[].is_activebooleanyes
items[].sort_orderintegeryes
items[].created_atstring (date-time)yes
items[].updated_atstring (date-time)yes