Text to 3D
Use model_generate_fromprompt when you want to generate a 3D model from a text description.
When To Use
- idea exploration from prompt-only inputs
- rapid concept generation
- no source image or source model available
Expected outcome: one or more GLB outputs retrievable by asset_id after completion.
Inputs
- required input data type: text prompt string
- recommended: concrete subject, style, and constraints in one prompt
Minimal input object:
{
"data": "A modern office chair with armrests"
}
Parameters
| Name | Type | Default | Allowed values | Practical guidance |
|---|---|---|---|---|
quality | string | high | low, high | Use high for better geometry; use low for faster experiments. |
seed | integer | -1 | integer | Use fixed value for reproducibility; use -1 for random runs. |
texture | boolean | true | true, false | Set true to include textures. |
Minimal Runnable Payload
payload = {
"template": "model_generate_fromprompt",
"parameters": {
"quality": "high",
"texture": True,
"seed": -1
},
"inputs": [
{
"data": "A modern office chair with armrests"
}
]
}
Polling And Output Retrieval
- Create flow with
POST /flows. - Poll
GET /flows/{flow_id}until terminal state. - If
completed, list outputs viaGET /flows/{flow_id}/outputs. - Fetch asset with
GET /flows/{flow_id}/outputs/{asset_id}?include_data=true.
For reusable polling/download code, use Template Helpers.
Common Failure Modes
- empty or vague prompt resulting in poor output quality
- invalid template field or malformed payload
- output fetch before completion
Recovery:
- strengthen prompt specificity
- validate payload shape
- retry output retrieval only after
completed
See Troubleshooting for HTTP and flow-state error patterns.