> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gizmo.antimlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate one asset

> Submit an asset, save its job ID, poll for completion, and download the result.

Available with **Personal and Team keys**. [Choose your account and create a key](/api-authentication) first.

## 1. Start generation

```bash theme={null}
curl --fail-with-body -X POST "https://api.gizmo.antimlabs.com/v1/assets" \
  -H "Authorization: Bearer gzm_k1_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: cabinet-order-001" \
  -d '{"prompt": "A wooden cabinet with three sliding drawers"}'
```

Use a new `Idempotency-Key` for each intended generation and reuse it only when
retrying that same request. It is required for Team generation.

The response is `202 Accepted`. Save the `job_id`. Example fields:

```json theme={null}
{
  "ok": true,
  "job_id": "job_x9y8z7w6",
  "status": "queued",
  "estimated_seconds": 1050,
  "estimate_note": "Approximate duration; actual generation time varies with the request and service load."
}
```

| Input | Type | Description |
| - | - | - |
| `prompt` | string, required | Describe the asset, dimensions, appearance, and any moving parts. Must not be empty. |
| `reference_image_urls` | string\[], optional | Up to 8 publicly accessible HTTP(S) image URLs. Existing URL requests remain supported. |
| `reference_images` | object\[], optional | Uploaded `image_id` or public `url`, plus an optional `view`. Maximum 8 images across both reference fields. |
| `reference_intent` | object, optional | Reconstruction intent and original user constraints. Input images remain authoritative by default. |
| `persist` | boolean, optional | Defaults to `true`. Keep it enabled to retrieve and export the saved asset later. If `false`, use the job result; a saved export is not guaranteed. |

For generation from a reference image:

```json theme={null}
{
  "prompt": "Recreate this cabinet, including the three sliding drawers",
  "reference_image_urls": ["https://example.com/cabinet.jpg"]
}
```

Replace the example URL with a publicly accessible image. Generation time varies; `estimated_seconds` is advisory, not a deadline.

For local files or multiple photos, follow [Reference images](/api-references). For safe retries after a lost response, follow [Idempotency](/api-jobs#retry-generation-safely). Team requests must keep `persist` enabled.

## 2. Wait for the result

```bash theme={null}
curl --fail-with-body "https://api.gizmo.antimlabs.com/v1/jobs/job_x9y8z7w6?include_result=true" \
  -H "Authorization: Bearer gzm_k1_YOUR_KEY"
```

Poll every 30–60 seconds until `job.status` is `succeeded`, `failed`, or `cancelled`. While the job is queued or running, `result` is `null`. On success, the result includes the generated asset:

```json theme={null}
{
  "ok": true,
  "job": {
    "id": "job_x9y8z7w6",
    "status": "succeeded",
    "mode": "asset",
    "error": null
  },
  "result": {
    "asset": {
      "id": "ASSET_ID",
      "name": "Drawer Cabinet"
    }
  }
}
```

These examples show the fields needed for this workflow; responses can include additional metadata. Use **`result.asset.id`** as the asset ID. Job timestamps are Unix milliseconds. If the job fails, inspect `job.error`; do not attempt an export until generation succeeds.

## 3. Download the result

```bash theme={null}
curl --fail-with-body -X POST \
  "https://api.gizmo.antimlabs.com/v1/assets/ASSET_ID/export?format=usd" \
  -H "Authorization: Bearer $GIZMO_API_KEY" \
  -o asset-usd.zip
```

Use the successful job's `result.asset.id` as `ASSET_ID`. This request returns file bytes. See [Downloads & bundle formats](/api-downloads) for visual GLBs, collision bundles and other simulator formats.

## Endpoint reference

[Generate an asset](/api-reference/assets/generate-an-asset) · [Get job status](/api-reference/jobs/get-job-status) · [Export an asset](/api-reference/exports/export-an-asset)

For many assets, use [Batch generation](/api-batches).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.