> ## 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, wait for completion, and download the result.

Works with **Personal and Team keys**. [Create a key](https://docs.gizmo.antimlabs.com/api-authentication.md) first.

## 1. Start generation

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

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

```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."
}
```

Use a new `Idempotency-Key` for each asset you want, and reuse it only to retry that same request. Team keys must send one. See [Retry generation safely](https://docs.gizmo.antimlabs.com/api-jobs.md#retry-generation-safely).

### Request fields

| Field | Type | Description |
| - | - | - |
| `prompt` | string, required | What to build. Include size, materials, appearance and any moving parts. |
| `interactions` | string\[], optional | How the asset will be used, for example `"Pull each drawer fully open and push it closed"`. Up to 32 entries of up to 2,000 characters. Leave it out and Gizmo infers ordinary uses. |
| `reference_image_urls` | string\[], optional | Public image URLs. |
| `reference_images` | object\[], optional | Uploaded images (`image_id`) or URLs (`url`), each with an optional `view` such as `front`. See [Reference images](https://docs.gizmo.antimlabs.com/api-references.md). Up to 8 references in total across both fields. |
| `reference_intent` | object, optional | Whether to reconstruct the pictured object exactly (the default), modify it, or use it as inspiration. See [Reference fidelity](https://docs.gizmo.antimlabs.com/api-references.md#reference-fidelity). |
| `appearance_variants`, `variant_count`, `variant_mode`, `variant_guidance` | optional | Extra versions of the asset. See [Variations](https://docs.gizmo.antimlabs.com/api-variations.md). |
| `persist` | boolean, optional | Defaults to `true`, which saves the asset to your library so you can export it later. Leave it on. |

### Write a good prompt

Be specific about the things a simulator cares about:

* **Size:** "60 cm tall", "fits in one hand", "standard 16 cm cereal bowl".
* **Moving parts:** "two doors on vertical hinges", "a drawer that slides out 30 cm", "a lid that flips open".
* **Materials and look:** "brushed steel handles", "matte black plastic", "worn oak".

Use `interactions` when a task depends on a specific motion:

```json theme={null}
{
  "prompt": "Sliding barrel bolt with keeper",
  "interactions": [
    "Grasp the handle and slide the bolt through its full travel.",
    "Insert and withdraw the bolt from the keeper without binding."
  ]
}
```

Interactions guide how the parts, joints and colliders are built and checked. They are not a guarantee of how the asset will behave under arbitrary forces in your simulator.

To generate from a photo:

```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 public image. For local files or several views, see [Reference images](https://docs.gizmo.antimlabs.com/api-references.md).

## 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 $GIZMO_API_KEY"
```

Poll every 30 to 60 seconds until `job.status` is `succeeded`, `failed` or `cancelled`. Most assets take 10 to 50 minutes; `estimated_seconds` is a rough guide, not a deadline. While the job runs, `result` is `null`. On success:

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

Responses include more fields than shown here. Use `result.asset.id` as the asset ID. If the job failed, read `job.error`. Personal keys can also [stream progress](https://docs.gizmo.antimlabs.com/api-jobs.md#streaming-progress) instead of polling.

## 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
```

The response is the file itself. See [Downloads & bundle formats](https://docs.gizmo.antimlabs.com/api-downloads.md) for every format and what is inside the GLB bundle.

## Endpoint reference

[Generate an asset](https://docs.gizmo.antimlabs.com/api-reference/assets/generate-an-asset.md) · [Get job status](https://docs.gizmo.antimlabs.com/api-reference/jobs/get-job-status.md) · [Export an asset](https://docs.gizmo.antimlabs.com/api-reference/exports/export-an-asset.md)

For many assets at once, use a [batch](https://docs.gizmo.antimlabs.com/api-batches.md).


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