Generate Assets
Use the POST /api/v1/generate endpoint to create 3D models, ASCII art, and animations from text prompts.
Endpoint
All generation requests use the same endpoint. The mode field determines which asset type is created. Every request needs an Authorization: Bearer mr_live_... header - create a key on the API Keys page.
Generation runs asynchronously: POST starts the job and returns immediately with a generation id and status: "pending" - credits are charged up front (and refunded automatically if generation fails). Poll GET /api/v1/generate/{id} until status becomes "complete" (or "failed") to get the finished asset.
status moves through mode-specific intermediate values (e.g. enhancing, generating_image, generating_3d) before reaching complete.
3D Models5 CREDITS
Generate textured 3D meshes from a text description. Output is a GLB file ready for web viewers, game engines, or AR applications.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | string | YES | Set to "trellis" |
| prompt | string | YES | Text description of the 3D model |
| options.meshSimplify | number | No | Simplification ratio 0-1 (default 0.95) |
| options.textureSize | number | No | 512, 1024, or 2048 (default 1024) |
Example Request
Example Response
Returned immediately - see Endpoint above for how to poll for the finished model.
ASCII Art1 CREDIT
Generate animated ASCII art frames from a prompt. Returns an array of text frames that can be played back sequentially for terminal-style animations.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | string | YES | Set to "ascii" |
| prompt | string | YES | Text description of the ASCII art |
Example Request
Example Response
Returned immediately - see Endpoint above for how to poll for the finished frames.
Animations1 CREDIT
Create animated pixel-art loops from a text prompt. Configure frame count, art style, animation type, and background transparency for game-ready assets.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | string | YES | Set to "animation" |
| prompt | string | YES | Text description of the animation subject |
| options.frameCount | number | No | Number of frames (default 8) |
| options.artStyle | string | No | "pixel-art", "hand-drawn", etc. |
| options.animationType | string | No | "idle", "walk", "attack", etc. |
| options.background | string | No | "transparent" or "white" |
Example Request
Example Response
Returned immediately - see Endpoint above for how to poll for the finished animation.
Full Parameters Reference
| Parameter | Type | Modes | Description |
|---|---|---|---|
| mode | string | all | Generation mode: "trellis", "ascii", or "animation" |
| prompt | string | all | Text description of the asset to generate |
| options.meshSimplify | number (0-1) | trellis | Mesh simplification ratio |
| options.textureSize | 512 | 1024 | 2048 | trellis | Texture resolution in pixels |
| options.frameCount | number | animation | Number of animation frames |
| options.artStyle | string | animation | Art style (pixel-art, hand-drawn, etc.) |
| options.animationType | string | animation | Animation type (idle, walk, attack, etc.) |
| options.background | string | animation | "transparent" or "white" |