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

# Use Gizmo from your agent

> Give Claude Code, Codex, or any tool-using agent the Gizmo API — generate simulation-ready scenes and assets as part of your agent's own loops.

Gizmo is built to be driven by agents, not just chatboxes. Everything the editor can generate, your agent can generate through the API — and the docs themselves are agent-readable (this site serves [`/llms.txt`](/llms.txt), every page as markdown, and a full [OpenAPI spec](/openapi.json)).

## The 60-second setup

1. Create an API key at [gizmo.antimlabs.com/developers](https://gizmo.antimlabs.com/developers) (`gzm_k1_…`).
2. Paste the prompt below into Claude Code, Codex, or any agent with shell access.

```text Copy-paste this to your agent theme={null}
You have access to the Gizmo API (3D simulation authoring). Base URL:
https://api.gizmo.antimlabs.com — auth with header "Authorization: Bearer $GIZMO_API_KEY".

- Generate a scene:  POST /v1/scenes  {"prompt": "...", "reference_image_urls": ["https://..."]}
- Generate an asset: POST /v1/assets  {"prompt": "..."}  (scene auto-created if omitted)
- Both return 202 with {job_id, estimated_seconds, estimate_note} — TELL THE USER the
  estimate, then poll GET /v1/jobs/{job_id} at a sensible interval (or stream
  GET /v1/jobs/{job_id}/events, SSE). Job statuses: queued → running → succeeded | failed | cancelled.
- When succeeded: fetch the scene (GET /v1/scenes/{id}?include_graph=true) or export it —
  POST /v1/scenes/{id}/export {"format": "mjcf" | "usd" | "usdz" | "sdf"} for MuJoCo / Isaac Sim / Gazebo.
- Build method is automatic: structured/jointed objects → prim-built articulated (~15–20 min);
  organic objects → mesh scan (~2–4 min). Reference images ground the build in real photos.
- Full reference: https://docs.gizmo.antimlabs.com/llms.txt

Task: generate {describe what you want}, wait for it, then export it for {simulator} and
report the download link.
```

## What your agent should know

* **Everything is async.** Generation returns a `job_id` immediately; the `estimated_seconds` in the 202 response is honest (minutes, not seconds) — relay it to your human and size polling accordingly. Don't hot-poll: every 30–60s is plenty.
* **No knobs needed.** The API triages each request itself (build method, structure engine). A prompt and optionally reference images are the whole contract.
* **Exports are the outcome.** The point isn't the chat — it's an MJCF/USD/SDF bundle your robotics stack can load. Pipe the export into your repo, CI, or simulator as part of the loop.

## Loop ideas

* **"Keep my sim assets fresh":** a scheduled Claude loop that reads your task list, generates missing assets via `POST /v1/assets`, and commits exports to your repo.
* **Scene-per-scenario CI:** your agent generates an environment per test scenario (`POST /v1/scenes` with a reference photo of the real space), exports MJCF, and runs your policy against it.
* **Digital-twin refresh:** when the real space changes, drop new photos in a bucket; an agent loop regenerates the scene from the latest reference images.
