HomeAPI ReferenceGenerate Assets

Generate Assets

Use the POST /api/v1/generate endpoint to create 3D models, ASCII art, and sprite animations from text prompts.

Endpoint

POST https://meshroom.app/api/v1/generate

All generation requests use the same endpoint. The mode field determines which asset type is created.

3D Models2 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

ParameterTypeRequiredDescription
modestringYESSet to "trellis"
promptstringYESText description of the 3D model
options.meshSimplifynumberNoSimplification ratio 0-1 (default 0.95)
options.textureSizenumberNo512, 1024, or 2048 (default 1024)

Example Request

curl -X POST https://meshroom.app/api/v1/generate \
-H "Authorization: Bearer mr_live_..." \
-H "Content-Type: application/json" \
-d '{
"mode": "trellis",
"prompt": "a low-poly medieval castle",
"options": { "meshSimplify": 0.95, "textureSize": 1024 }
}'

Example Response

{
"id": "gen_abc123",
"status": "completed",
"mode": "trellis",
"model_url": "https://meshroom.app/assets/gen_abc123.glb",
"credits_used": 2
}

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

ParameterTypeRequiredDescription
modestringYESSet to "ascii"
promptstringYESText description of the ASCII art

Example Request

curl -X POST https://meshroom.app/api/v1/generate \
-H "Authorization: Bearer mr_live_..." \
-H "Content-Type: application/json" \
-d '{"mode": "ascii", "prompt": "a spinning globe"}'

Example Response

{
"id": "gen_def456",
"status": "completed",
"mode": "ascii",
"frames": [" .---. \n / \\ \n...", ...],
"credits_used": 1
}

Sprite Animations2 CREDITS

Create animated sprite sheets from a text prompt. Configure frame count, art style, animation type, and background transparency for game-ready assets.

Request Body

ParameterTypeRequiredDescription
modestringYESSet to "animation"
promptstringYESText description of the sprite
options.frameCountnumberNoNumber of frames (default 8)
options.artStylestringNo"pixel-art", "hand-drawn", etc.
options.animationTypestringNo"idle", "walk", "attack", etc.
options.backgroundstringNo"transparent" or "white"

Example Request

curl -X POST https://meshroom.app/api/v1/generate \
-H "Authorization: Bearer mr_live_..." \
-H "Content-Type: application/json" \
-d '{
"mode": "animation",
"prompt": "a knight swinging a sword",
"options": {
"frameCount": 8,
"artStyle": "pixel-art",
"animationType": "attack",
"background": "transparent"
}
}'

Example Response

{
"id": "gen_ghi789",
"status": "completed",
"mode": "animation",
"spritesheet_url": "https://meshroom.app/assets/gen_ghi789.png",
"frame_count": 8,
"credits_used": 2
}

Full Parameters Reference

ParameterTypeModesDescription
modestringallGeneration mode: "trellis", "ascii", or "animation"
promptstringallText description of the asset to generate
options.meshSimplifynumber (0-1)trellisMesh simplification ratio
options.textureSize512 | 1024 | 2048trellisTexture resolution in pixels
options.frameCountnumberanimationNumber of animation frames
options.artStylestringanimationArt style (pixel-art, hand-drawn, etc.)
options.animationTypestringanimationAnimation type (idle, walk, attack, etc.)
options.backgroundstringanimation"transparent" or "white"