VoxAI Public API
Programmatic access to AI-powered voxel generation. Generate images and 3D models, run tools, and receive results via polling or webhooks.
Base URL: https://api.voxelai.ai/api/v1
Generate your API token from the account menu (profile icon ā API). Tokens use the vtx_ prefix.
Authentication
All /api/v1/* endpoints require an API token in the Authorization header. Session JWTs are not accepted ā requests with a JWT receive an error directing you to use an API token.
Authorization: Bearer vtx_<your_token>Scopes
| Scope | Access |
|---|---|
| credits:read | GET /credits |
| generate:image | POST /generate/image |
| generate:3d | POST /generate/3d |
| tools:revoxelize | POST /tools/revoxelize |
| tools:rigging | POST /tools/rigging |
| tools:download | POST /assets/:assetId/download-url and download-convert |
Poll routes (GET /assets/:assetId, GET /asset-groups/:assetGroupId) require a valid token but no specific scope.
Async workflow
Generation is asynchronous. A successful request returns 202 with asset IDs while processing continues in the background.
POST /api/v1/generate/*ā receiveassetIdorassetGroupId- Poll
GET /api/v1/assets/:assetIdor wait for a webhook event - When complete, call
POST /api/v1/assets/:assetId/download-url(native files) ordownload-convert(format conversion)
Credit pricing
| Operation | Credits |
|---|---|
| Image ā voxaiImage (t2i or i2i) | 15 flat (always 4 images) |
| Image ā nanobanana | 6 Ć imageNumber (1ā5) |
| Image ā nanobanana2 | 10 Ć imageNumber (1ā5) |
| Image ā nanobananaPro | 16 Ć imageNumber (1ā5) |
| 3D generation | 30 |
| Revoxelize | 2 base; +2 if filling; +2 if merge_cube |
| Rigging | 30 (standard) or 100 (better_rigging=true) |
Prompt enhancement and autoPrompt do not cost extra credits.
Endpoints
GET /api/v1/credits
Returns your credit balance (same wallet as the web app). Scope: credits:read.
POST /api/v1/generate/image
Unified text-to-image (JSON) or image-to-image (multipart with image file). Scope: generate:image.
Text-to-image: send JSON with prompt, name, optional imageModel, imageNumber, promptEnhancement, and style.
Image-to-image: send multipart with an image file. Use imageStyle (required for nanobanana models) or autoPrompt=true to derive a prompt from the uploaded image. promptEnhancement is not allowed on i2i.
Returns assetGroupId and child assets. When autoPrompt=true, the response includes derivedPrompt.
POST /api/v1/generate/3d
Start 3D model generation. Scope: generate:3d. 30 credits.
From library: JSON with assetId, format, optional cubeSize.
Direct upload: multipart with name, format, image file ā no prior image asset needed.
Formats: voxai_v3, voxai_v1, voxai_v2, hunyuan_3d.
GET /api/v1/assets/:assetId
Poll status for a single asset: processing, completed, or failed. Valid token required; no specific scope.
GET /api/v1/asset-groups/:assetGroupId
Poll batch image generation. Returns group status, prompt, imageModel, and per-asset statuses. Valid token required; no specific scope.
POST /api/v1/tools/revoxelize
Re-voxelize an existing 3D asset. Scope: tools:revoxelize. Required: assetId, model_format, x, y, z. Optional: cube size, scale, lighting, filling, merge_cube, and color params. Credits: 2 base (+2 filling, +2 merge_cube).
POST /api/v1/tools/rigging
Rig an existing 3D asset. Scope: tools:rigging. Required: assetId, model_format, cube_size. Optional: x/y/z, scale/light/color params, partsam_preset, better_rigging. Credits: 30 or 100.
POST /api/v1/assets/:assetId/download-url
Mint a short-lived CloudFront signed URL (~15 min) for native files. Body: { "format": "vox" }. Formats: png, vox, zip, glb (smooth mesh). Scope: tools:download.
POST /api/v1/assets/:assetId/download-convert
Stream a converted 3D file via Modal. Returns raw binary (not JSON). Body: { "inputFormat": "vox", "outputFormat": "fbx" }. Scope: tools:download.
Voxel pipeline (inputFormat: "vox"): glb, fbx, obj, usdz, usd, stl.
Smooth mesh (inputFormat: "glb"): fbx, obj.
Example responses
Batch image generation
{
"success": true,
"data": {
"assetGroupId": "6656c01ec43902bd48d4d100",
"derivedPrompt": "blocky voxel warrior with ...",
"assets": [
{ "assetId": "6656c01ec43902bd48d4d297", "status": "processing" },
{ "assetId": "6656c01ec43902bd48d4d298", "status": "processing" }
]
}
}derivedPrompt is present only when the prompt was auto-derived via autoPrompt=true.
Single 3D generation
{
"success": true,
"data": {
"assetId": "6656c01ec43902bd48d4d297",
"assetGroupId": null,
"status": "processing"
}
}Download URL
{
"success": true,
"data": {
"url": "https://dā¦.cloudfront.net/3D_model/ā¦.vox?Expires=ā¦&Signature=ā¦",
"expiresAt": "2026-07-15T06:15:00.000Z",
"filename": "model.vox"
}
}Webhooks
Webhooks are optional. Configure an HTTPS URL in the API panel (account menu ā API). If no URL is saved, no outbound events are sent and you must poll asset endpoints instead.
Event types
image.completed/image.failedmodel.completed/model.failedtool.revoxelize.completed/tool.revoxelize.failedtool.rigging.completed/tool.rigging.failed
Completed events include a fresh CloudFront downloadUrl (reminted on every delivery attempt). Verify authenticity with the X-VoxAI-Signature header: sha256=HMAC(webhookSecret, rawBody).
Completed webhook payload
{
"id": "evt_...",
"type": "model.completed",
"createdAt": "2026-07-15T06:00:00.000Z",
"data": {
"assetId": "...",
"assetGroupId": null,
"status": "completed",
"source": "api",
"format": "vox",
"downloadUrl": "https://dā¦.cloudfront.net/3D_model/ā¦.vox?Expires=ā¦&Signature=ā¦",
"downloadExpiresAt": "2026-07-15T06:15:00.000Z",
"filename": "model.vox"
}
}Error codes
| Code | Meaning |
|---|---|
| 400 | Invalid input, insufficient credits, or asset not ready |
| 401 | Missing/invalid/revoked token; JWT rejected |
| 403 | Missing scope or forbidden asset access |
| 404 | Asset or asset group not found |
| 429 | Concurrency limit (max 5 tasks) |
| 502 | Upstream Gemini failures (prompt enhancement, autoPrompt) |
| 500 | Server error |
cURL examples
Text-to-image with prompt enhancement
curl -s -X POST https://api.voxelai.ai/api/v1/generate/image \
-H "Authorization: Bearer vtx_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt":"a warrior robot","name":"robot","imageModel":"nanobanana","imageNumber":1,"promptEnhancement":true,"style":"Roblox style"}'Image-to-image with autoPrompt
curl -s -X POST https://api.voxelai.ai/api/v1/generate/image \
-H "Authorization: Bearer vtx_YOUR_TOKEN" \
-F "autoPrompt=true" \
-F "name=auto_i2i" \
-F "imageModel=nanobanana" \
-F "imageNumber=1" \
-F "imageStyle=Roblox style" \
-F "image=@/path/to/photo.jpg"Direct image ā 3D (skip image library)
curl -s -X POST https://api.voxelai.ai/api/v1/generate/3d \
-H "Authorization: Bearer vtx_YOUR_TOKEN" \
-F "name=my_model" \
-F "format=voxai_v3" \
-F "cubeSize=0.032" \
-F "image=@photo.png"Poll, download, and convert
# Check credits
curl -s https://api.voxelai.ai/api/v1/credits \
-H "Authorization: Bearer vtx_YOUR_TOKEN"
# Poll asset status
curl -s https://api.voxelai.ai/api/v1/assets/6656c01ec43902bd48d4d297 \
-H "Authorization: Bearer vtx_YOUR_TOKEN"
# Native download URL
curl -s -X POST https://api.voxelai.ai/api/v1/assets/6656c01ec43902bd48d4d297/download-url \
-H "Authorization: Bearer vtx_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "format": "vox" }'
# Format conversion (binary response)
curl -X POST https://api.voxelai.ai/api/v1/assets/6656c01ec43902bd48d4d297/download-convert \
-H "Authorization: Bearer vtx_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"inputFormat":"vox","outputFormat":"glb"}' \
-o model_voxel.glbReplace the base URL with your backend host if self-hosting.
FAQ
Do API calls share credits with the web app?
Yes. API generation uses the same credit wallet as the website.
What is the concurrency limit?
Each account can run up to 5 concurrent tasks (image, 3D, revoxelize, and rigging combined). The web app and API share this pool. Exceeding the limit returns HTTP 429.
Can I use the API without webhooks?
Yes. Poll GET /api/v1/assets/:assetId or GET /api/v1/asset-groups/:assetGroupId until status is completed or failed, then call the download-url endpoint.
What is the difference between text-to-image and image-to-image?
Text-to-image sends a JSON body with a prompt. Image-to-image sends multipart form data with an image file. The API detects the mode automatically. For i2i with Vertex models, imageStyle is required. Use autoPrompt=true to derive a prompt from the uploaded image without writing one.
Can I skip the image library and go straight to 3D?
Yes. Upload an image directly to POST /generate/3d as multipart form data with name, format, and image. No prior image asset is needed.
What is not available via the public API?
The following web-only features are not exposed on /api/v1: standalone image-to-prompt (use autoPrompt on generate instead), batch image retry/regeneration, save edited .vox, model rating, Hytale texture generation, and i2i from an existing asset without re-uploading the reference image.
