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

# Modeler

> Create and revise static GLB models from text and reference images.

Modeler creates a static 3D Model from a description, reference images, or both. The delivered file is a self-contained GLB that you can preview, download, and retrieve through Mint's asset endpoints.

**Access:** Sign in with your Mint account in Modeler, or use your Mint API key. Each request needs an explicit maximum Credit budget. Rigging, animation, and arbitrary uploaded-model editing are not supported by these endpoints.

## Generate a model

Upload images through the existing [reference-image API](/developers/api-overview) and use the returned reference-image IDs. Images must belong to your account. An image-only request may omit `prompt`.

```bash theme={null}
curl https://api.mint.gg/v1/modeler:generate \
  -H "Authorization: Bearer $MINT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: orange-lamp" \
  -d '{"prompt":"A small ceramic lamp with an orange shade","maxCredits":1000}'
```

The response is an asynchronous operation. Poll `GET /v1/operations/{operationId}`. Its `modeler.stage` describes progress; `modeler.billingState` distinguishes pending usage reconciliation from settled billing. A successful operation includes its model resource and `modeler.artifacts.glb` download URL. Pending billing does not prevent downloading an already delivered GLB.

## Revise a model

Call `POST /v1/modeler/{modelId}:revise` with a new prompt, optional `referenceImageIds`, and `maxCredits`. Select a successful Modeler asset owned by your account. Each successful revision becomes a new model linked to its parent. Earlier successful results remain available even if a revision fails.

## Credits and cancellation

Your selected Credit cap never increases automatically. Successful requests charge verified usage up to the cap and release the rest. Failed generation, export, validation, or delivery refunds the reservation. Missing usage remains pending reconciliation instead of being charged as an estimate.

Call `POST /v1/operations/{operationId}:cancel` to cancel Modeler work. Cancellation charges verified usage already incurred, up to the cap. Repeating cancellation is safe. Other operation kinds do not support this endpoint.

Reuse the same `Idempotency-Key` when retrying a request after a lost response. Reusing that key with different inputs returns a conflict. For a new generation or revision, use a new key.
