You have access to the Gizmo Asset API. Base URL: https://api.gizmo.antimlabs.com
Authenticate with the header "Authorization: Bearer $GIZMO_API_KEY".
- Generate an asset: POST /v1/assets {"prompt": "..."}.
Save a unique Idempotency-Key before submission; reuse it with the same body
after a lost response. Team generation requires this header.
Optionally include "reference_image_urls": ["https://..."] (up to 8 images across URL and uploaded-image references).
- Team batches: POST /v1/batches with a unique Idempotency-Key and
{"items": [{"custom_id": "item-001", "input": {"prompt": "..."}}]}.
Accepts up to 1,000 inputs. Save batch_id; poll GET /v1/batches/{batch_id}.
Read GET /v1/batches/{batch_id}/items and follow next_cursor while has_more is true.
A completed batch may contain failures. Inspect each item's outcome.
Items queue automatically within the Team processing limit shared by all its batches and individual generations.
Do not resubmit queued items; the processing limit is separate from HTTP request rate limits.
- Team scenes: POST /v1/scenes with a saved unique Idempotency-Key and
{"prompt": "A simple wooden workbench against a plain wall", "max_asset_definitions": 1,
"max_instances": 1, "max_cost_cents": 1300}.
Add reference_images with url or inline data_url; no separate upload is needed. The $13 cap in this example assumes
a $5 Team asset price and an $8 scene assembly fee; use your Team's actual prices.
Save both job_id and scene_id. Poll the job or GET /v1/scenes/{scene_id}.
Fixed-priced scenes charge for delivered unique canonical assets plus the scene fee;
repeated instances do not add asset charges. Failed/cancelled scenes cost zero.
Read job.scene_pricing for the accepted prices and job.settled_spend_cents for the charge.
Inspect result.status, sceneCommitted, validationPassed, assetDefinitions and counts.
A partial or candidate delivery may still be charged; do not call it fully validated.
Download only available result.exports with POST /v1/scenes/{scene_id}/export?format=blend
(or glb, usd, usdz, source). Save the binary response after checking its HTTP status.
Scene exports use scene_id, not the asset export endpoint below.
- Upload local references: POST /v1/images with multipart files fields.
Use returned IDs in reference_images: [{"image_id": "...", "view": "front"}].
Upload and generate using the same account. Never expose the API key in frontend code.
- Save job_id from the 202 response. Poll GET /v1/jobs/{job_id}?include_result=true
every 30-60 seconds until job.status is succeeded, failed, or cancelled.
Personal-key clients can also open GET /v1/jobs/{job_id}/events for SSE progress.
Team SSE currently returns 403 workspace_route_unavailable; use polling.
Generation continues if you disconnect; save job_id and reconnect later.
Do not rely on email or webhooks for API completion.
- On asset success, read result.asset.id. Get details with GET /v1/assets/{asset_id}.
- Export with POST /v1/assets/{asset_id}/export?format=mjcf (no request body).
Formats: mjcf, usd, usdz, sdf, glb; availability depends on the accepted release. Save the binary response to a local file:
.usdz for usdz; .zip for bundles; .glb for a raw native preview. Team export?format=glb is a ZIP;
GET /v1/assets/{asset_id}/files/glb returns the saved raw visual GLB.
Check HTTP status and Content-Type before saving.
- Browse generated assets with GET /v1/assets?limit=20; follow next_cursor.
- Cancel with POST /v1/jobs/{job_id}/cancel or POST /v1/batches/{batch_id}/cancel.
Cancellation is a request; poll until workers have stopped.
- Team keys do not currently support SSE, GET /v1/usage or asset deletion.
Do not retry 403 workspace_route_unavailable. Use polling for progress and Team Billing for the current balance.
- A successful job means an output was published, not that all physics QA passed.
Inspect physics-qa.json when present; respect failures, skips and input hashes.
- On failure, report job.error. Estimates are advisory; do not assume a fixed duration.
- Full reference: https://docs.gizmo.antimlabs.com/api-access
Task: generate {describe an asset}, wait for completion, export it for {simulator},
and give me the saved file.