lowpoly retires Oct 30, 2026. meshy-7 for 3D generation retires Dec 31, 2026; as a texture model it stays available. Please switch models before these dates to avoid request errors. See all deprecations

Text to 3D API

Turn a text prompt into a 3D model in one call.


POST/openapi/v2/text-to-3d

Create a Text to 3D task

Creates a Text to 3D task and returns the task object. The task runs in the background. To read its result, see Get the result. For how long a task usually takes, see Processing times.

PreviewChange a value under “Try and preview” to update
Faces1,147,770
Cost30 credits
Request
curl https://api.meshy.ai/openapi/v2/text-to-3d \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "a stylized adult male explorer with short brown hair and a stubble beard, wearing an orange jacket, beige cargo pants and brown boots, full body, standing",
    "ai_model": "meshy-7.1",
    "should_texture": true,
    "texture_model": "meshy-7"
  }'
Response
Loading…

Parameters

  • Name
    should_texture
    Type
    boolean
    default true
    Description

    Whether to texture the model. true returns a textured model, and false returns the mesh only. With false, Meshy ignores texture_model and the other texture parameters. To check the mesh before you texture it, send false, then texture the finished task with Retexture, using its id as input_task_id. If you also send mode, Meshy ignores this setting.

    Try and preview
  • Name
    mode
    Type
    string
    ⚠ deprecated
    Description

    The step of a two-step task, for integrations that already use preview and refine. Send should_texture instead.

    Available values:

    • preview: makes an untextured mesh
    • refine: textures the mesh of a preview task
  • Name
    prompt
    Type
    string
    Required
    Description

    Required for one-call and preview tasks. Text that describes the model to generate, up to 800 characters. Longer text returns 400. A refine uses its preview's prompt instead.

  • Name
    preview_task_id
    Type
    string
    Required
    ⚠ deprecated
    Description

    Send should_texture: true instead, or texture an existing task with Retexture. Required for refine tasks. The ID of the preview task to texture. The task must be one of your preview tasks and have the status SUCCEEDED.

  • Name
    ai_model
    Type
    string
    default latest
    Description

    The model that generates the 3D model.

    Try and preview

    Standard models:

    • latest: Meshy 7.1
    • meshy-7.1
    • meshy-6
    • meshy-6-lite
    • meshy-standard-latest: same as latest

    Smart Topology models build a clean triangle mesh at the face count you set with target_polycount:

    • meshy-t2.5: sharper detail for game assets
    • meshy-t2
    • meshy-smart-topology-latest: Meshy T2.5, the newest Smart Topology model. Results can change when a new one comes out. For results that stay the same, send meshy-t2.5.

    See Models for which model fits your project, such as a game character or a 3D print.

    On a refine, ai_model picks the texture model, because the mesh comes from the preview. Leave it out to texture with the model that matches the preview. For the values a refine takes, see Legacy preview and refine.

  • Name
    model_type
    Type
    string
    ⚠ deprecated
    Description

    Leave it out. ai_model picks the model.

  • Name
    geometry_resolution
    Type
    string
    default standard
    Description

    How much geometry detail to generate. Applies only to one-call and preview tasks. A refine with this parameter returns 400.

    Try and preview

    Available values:

    • standard
    • 2k: adds the Ultra pass
    • 4k: adds the Ultra pass, then a super-resolution pass

    2k and 4k need meshy-7.1 or latest. With other models, they return 400.

  • Name
    should_remesh
    Type
    boolean
    default true (meshy-6-lite), false (other models)
    Description

    Whether to remesh the model after generation. false keeps the mesh as generated. Applies only to one-call and preview tasks. Smart Topology models ignore this setting.

    Try and preview
Applies only when should_remesh = true
  • Name
    topology
    Type
    string
    default triangle
    Description

    The face type of the remeshed model, triangle or quad. Smart Topology models make triangles only, so quad with a Smart Topology model returns 400. With texture_model: "meshy-n1", quad returns 400.

    Try and preview

    Applies when ai_model is meshy-7.1 and should_remesh is true. Picking a value sets it.

  • Name
    decimation_mode
    Type
    integer
    Description

    Adaptive face count, by level. When you set it, Meshy ignores target_polycount.

    Available values:

    • 1: ultra
    • 2: high
    • 3: medium
    • 4: low
  • Name
    target_polycount
    Type
    integer
    Description

    The number of faces to aim for. Applies only to one-call and preview tasks. The range and default depend on how the mesh is built:

    MeshRangeDefault
    Remeshed100 to 30000030000
    meshy-t2.5 or meshy-smart-topology-latest100 to 3000015000
    meshy-t2100 to 150004000

    A value outside the range returns 400.

    For a low-poly game asset, use a Smart Topology model instead of remeshing a standard model. See Models.

  • Name
    pose_mode
    Type
    string
    Description

    The pose for a character model, a-pose or t-pose. Leave it out for no pose. Applies only to one-call and preview tasks.

    Try and preview
Applies only when should_texture = true
  • Name
    texture_model
    Type
    string
    Required
    Description

    Required unless should_texture is false. The model that textures a one-call task. Every ai_model takes each of these values.

    Available values:

    • meshy-7: Meshy 7, with PBR maps, a text prompt, and textures up to 8K
    • meshy-n1: Meshy N1, a 2K base color texture from reference images only
    • meshy-6-lite: Meshy 6 Lite, a 2K texture

    With meshy-6 or meshy-6-lite, meshy-n1 needs texture_image_url, because those models make no reference image from the prompt. A textured request without texture_model returns 400, and so does an option the texture model doesn't support. With mode, Meshy ignores texture_model. See Texture models.

  • Name
    texture_prompt
    Type
    string
    Description

    Text that guides the texture, up to 800 characters. Longer text returns 400. Send texture_prompt or texture_image_url, not both. Sending both returns 400. With meshy-n1, sending it returns 400.

  • Name
    texture_image_url
    Type
    string
    Description

    Image that guides the texture, as a public URL or a data URI (data:image/png;base64,...). With meshy-n1, Meshy textures from this image as the front view. A one-call task with texture_model: "meshy-n1" and an ai_model of meshy-6 or meshy-6-lite needs it.

    The image must be a JPG, JPEG, PNG, or WebP file of at most 20 MB, at least 32 pixels on each side, and at most 178,956,970 pixels (width × height).

  • Name
    enable_pbr
    Type
    boolean
    default false
    Description

    Whether to also generate metallic, roughness, and normal maps. With meshy-n1, true returns 400.

    Try and preview
  • Name
    texture_resolution
    Type
    string
    default 2k
    Description

    Size of the base color texture. A preview with this parameter returns 400.

    Try and preview

    Available values:

    • 2k
    • 4k
    • 8k

    4k and 8k return 400 with meshy-n1 or meshy-6-lite, whether texture_model picks it on a one-call task or ai_model picks it on a refine.

  • Name
    remove_lighting
    Type
    boolean
    default true
    Description

    Whether to remove highlights and shadows from the base color texture. Only meshy-6 uses this setting. Meshy 7 and Smart Topology models ignore it. With meshy-6-lite, sending it returns 400.

  • Name
    target_formats
    Type
    string[]
    default ["glb", "obj", "fbx", "stl", "usdz"]
    Description

    The file formats to generate.

    Available values:

    • glb
    • obj
    • fbx
    • stl
    • usdz
    • 3mf

    Text to 3D doesn't apply the 150 mm cap that other v2 endpoints use for print files. STL files keep the model's size, and Meshy scales a 3mf file to 75 mm tall.

  • Name
    alpha_thumbnail
    Type
    boolean
    default false
    Description

    Whether to also render a preview with a transparent background, returned in output.alpha_thumbnail_url.

  • Name
    thumbnail_resolution
    Type
    integer
    default 512
    Description

    The width and height, in pixels, of the task's preview images: 512 or 1024. It applies to output.thumbnail_url and to any optional preview you request. Any other value returns 400.

  • Name
    moderation
    Type
    boolean
    default false
    Description

    Whether to screen these inputs for harmful content before generating:

    • prompt
    • texture_prompt
    • texture_image_url
  • Name
    auto_size
    Type
    boolean
    default false
    Description

    Whether to estimate the object's real-world height and scale the model to it.

Applies only when auto_size = true
  • Name
    origin_at
    Type
    string
    default bottom
    Description

    Where to place the model's origin, bottom or center.

Returns

202 Accepted with the task object. The task starts as PENDING, with your request in input and output set to null. The response also has result, which repeats the id for clients written before v2.

These headers help you follow the task:

  • Retry-After: how many seconds to wait before you first read the task
  • Location: /openapi/v2/text-to-3d/{id}, a legacy route. Read the task through Tasks instead.

Failure modes

  • Name
    400 - Bad Request
    Description

    The request can't run. For example:

    • prompt is missing
    • A textured one-call task didn't send texture_model
    • A one-call task sent texture_model: "meshy-n1" with meshy-6 or meshy-6-lite and no texture_image_url
    • The texture model doesn't support an option in the request, for example enable_pbr: true with meshy-n1
    • preview_task_id doesn't match one of your preview tasks with the status SUCCEEDED. The message says whether the task doesn't exist, isn't finished, or isn't a preview.
    • Both texture_prompt and texture_image_url were sent
    • texture_resolution was sent with a preview
    • geometry_resolution was sent with a refine, or with a model that can't run it
    • A one-call task asked for meshy-7 (send meshy-7.1 instead)
    • A one-call task sent a parameter Text to 3D doesn't define, such as a misspelled name. With mode, Meshy ignores it.

    The error message says which problem it found. See Errors.

  • Name
    401 - Unauthorized
    Description

    The API key is missing or invalid. Check the Authorization header.

  • Name
    402 - Payment Required
    Description

    One of these applies:

    • The account doesn't have enough credits.
    • The account reached a credit limit.
    • The account is on the free plan.

    Check your credits and plan, then retry.

  • Name
    403 - Forbidden
    Description

    Content moderation blocked the prompt or an input image. Change the input, then retry.

  • Name
    429 - Too Many Requests
    Description

    One of these limits was reached:

    • You sent too many requests. Wait the number of seconds in Retry-After, then retry.
    • Too many of your tasks are queued or running. Wait for some to finish, then retry.
    • On an unlimited plan with no credits left, you reached the number of tasks that can run without credits. Wait for a task to finish, or add credits.

Get the result

Read Text to 3D tasks the same way as every other v2 task, through the Tasks routes. To list Text to 3D tasks, filter by type:

  • text-to-3d: all three kinds of Text to 3D task
  • text-to-3d-preview: preview tasks only
  • text-to-3d-refine: refine tasks only

One-call tasks have no filter of their own.


Text to 3D output

When the task succeeds, output holds these fields. The rest of the task object is the same for every task type.

For Text to 3D, expires_at is always null. Meshy still deletes the task 3 days after it finishes, so download the files within that window. Enterprise accounts keep their tasks. See Asset retention.

Request
curl https://api.meshy.ai/openapi/v2/tasks/01a1aeae-2720-72bd-952d-008784fbd525 \
  -H "Authorization: Bearer ${MESHY_API_KEY}"
Response
Loading…
  • Name
    model_urls
    Type
    object
    Description

    Signed URLs to the generated files, keyed by format. There is one URL for each format in target_formats, or for each default format if you left it out. A textured obj also gets an mtl key, with the URL of its material file.

  • Name
    thumbnail_url
    Type
    string
    Description

    Signed URL to a preview image of the model.

  • Name
    alpha_thumbnail_url
    Type
    string | null
    Description

    Signed URL to the preview with a transparent background. null unless you sent alpha_thumbnail: true.

  • Name
    texture_urls
    Type
    array
    Description

    One item per texture set, with a signed URL for each of these maps:

    • base_color
    • metallic
    • roughness
    • normal
    • metallic_roughness
    • emission

    A map that wasn't produced is null. The array is empty for a preview and for an untextured one-call task.


Legacy preview and refine

mode is deprecated and stops working on March 15, 2027. Before then, make the model in one call with should_texture, which costs the same as a preview plus a refine.

  1. Create a preview with "mode": "preview", your prompt, and the geometry parameters, such as geometry_resolution and should_remesh. The preview makes the untextured mesh.
  2. Wait until the preview's status is SUCCEEDED.
  3. Create a refine with "mode": "refine", the preview's id as preview_task_id, and the texture parameters. The refine keeps the preview's prompt and mesh. Leave ai_model out to texture with the model that matches the preview, which is Meshy 7 for a Smart Topology preview.

On a refine, ai_model names the texture model, and Meshy ignores texture_model:

  • meshy-7: Meshy 7
  • latest: the newest texture model, now Meshy 7
  • meshy-6: Meshy 6
  • meshy-6-lite: Meshy 6 Lite
  • meshy-n1: Meshy N1, a 2K base color texture from a reference image only

A Smart Topology preview (meshy-t2, meshy-t2.5) has no Meshy 6 Lite texturing: a refine of one with meshy-6-lite textures with Meshy 6, so with enable_pbr: true it also returns an emission map. A meshy-6-lite refine of a Meshy 6, Meshy 6 Lite or Meshy 7 preview returns none, and neither does a refine of a Smart Topology preview that doesn't set ai_model.

To refine with Meshy N1, send "ai_model": "meshy-n1". Meshy textures from texture_image_url, or from the reference image that a meshy-7.1 or latest preview stores. Any other preview returns 400 unless you send texture_image_url. Meshy N1 makes a 2K base color texture only. Sending any of these with it returns 400:

  • texture_prompt
  • enable_pbr: true
  • remove_lighting: true
  • a texture_resolution of 4k or 8k

The preview can have at most 7,999,999 triangles. A preview remeshed to quads returns 400. To texture a one-call task with Meshy N1, use Retexture.

You can refine a preview more than once, for example with different texture prompts, until the preview is deleted. You can't refine a one-call task. Meshy deletes Text to 3D tasks 3 days after they finish, and Enterprise accounts keep theirs. A refine of a deleted preview returns 400, with the code input_task_expired once the retention period has ended. See Asset retention.


Legacy routes

The Text to 3D read routes from before v2 stop working on March 15, 2027. Before then, move your reads to Tasks.

RouteUse instead
GET /openapi/v2/text-to-3d/{id}GET /openapi/v2/tasks/{id}
GET /openapi/v2/text-to-3d/{id}/streamGET /openapi/v2/tasks/{id}/stream
GET /openapi/v2/text-to-3dGET /openapi/v2/tasks?type=text-to-3d
DELETE /openapi/v2/text-to-3d/{id}DELETE /openapi/v2/tasks/{id}

These routes return the fields of the original Text to 3D task object, with task_error in its v2 form. They also return these fields, the same as Tasks:

  • input
  • output
  • expires_at

The list route returns a plain array, with no has_more.

The same routes under /v2/text-to-3d, without /openapi, are deprecated. Their responses have a Deprecation header, and a Link header that points to the /openapi/v2/text-to-3d route.

The original Text to 3D task object

The legacy routes return this object. type says whether the task is a preview, a refine, or a one-call task.

Example Text to 3D Task Object

{
  "id": "018a210d-8ba4-705c-b111-1f1776f7f578",
  "type": "text-to-3d-preview",
  "model_urls": {
    "glb": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.glb?Expires=***",
    "fbx": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.fbx?Expires=***",
    "usdz": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.usdz?Expires=***",
    "obj": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.obj?Expires=***",
    "mtl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.mtl?Expires=***",
    "stl": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/model.stl?Expires=***"
  },
  "prompt": "a monster mask",
  "texture_prompt": "green slimy skin with scales and warts",
  "texture_image_url": "",
  "thumbnail_url": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/preview.png?Expires=***",
  "progress": 100,
  "started_at": 1692771667037,
  "created_at": 1692771650657,
  "finished_at": 1692771669037,
  "status": "SUCCEEDED",
  "texture_urls": [
    {
      "base_color": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0.png?Expires=***",
      "metallic": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_metallic.png?Expires=XXX",
      "normal": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_normal.png?Expires=XXX",
      "roughness": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_roughness.png?Expires=XXX",
      "emission": "https://assets.meshy.ai/***/tasks/018a210d-8ba4-705c-b111-1f1776f7f578/output/texture_0_emission.png?Expires=XXX"
    }
  ],
  "preceding_tasks": 0,
  "task_error": null,

  "consumed_credits": 20
}
  • Name
    id
    Type
    string
    Description

    The task ID. Treat it as an opaque string, and don't rely on its format.

  • Name
    type
    Type
    string
    Description

    The task type: text-to-3d-preview for a preview, text-to-3d-refine for a refine, or text-to-3d for a one-call task.

  • Name
    model_urls
    Type
    object
    Description

    Download URLs for the generated 3D model, one per file format. A format the task didn't generate has no key, rather than an empty string.

    • Name
      glb
      Type
      string
      Description

      The GLB file.

    • Name
      fbx
      Type
      string
      Description

      The FBX file.

    • Name
      usdz
      Type
      string
      Description

      The USDZ file.

    • Name
      obj
      Type
      string
      Description

      The OBJ file.

    • Name
      mtl
      Type
      string
      Description

      The MTL file.

    • Name
      stl
      Type
      string
      Description

      The STL file.

    • Name
      3mf
      Type
      string
      Description

      The 3MF file. Present only when target_formats includes 3mf.

  • Name
    prompt
    Type
    string
    Description

    The prompt you sent to create the task, unmodified.

  • Name
    texture_prompt
    Type
    string
    Description

    The text prompt you sent to guide the texturing in the refine stage.

  • Name
    ultra_mode
    Type
    boolean
    ⚠ deprecated
    Description

    Read geometry_resolution instead.

  • Name
    geometry_resolution
    Type
    string
    Description

    The Ultra tier the preview task ran, 2k or 4k. The field is absent for standard.

  • Name
    texture_image_url
    Type
    string
    Description

    Download URL for the image you sent to guide the texturing.

  • Name
    thumbnail_url
    Type
    string
    Description

    Download URL for a thumbnail image of the 3D model.

  • Name
    alpha_thumbnail_url
    Type
    string
    Description

    Download URL for a version of thumbnail_url with a transparent background (RGBA). Present only when you created the task with alpha_thumbnail: true and Meshy rendered the transparent preview.

  • Name
    progress
    Type
    integer
    Description

    How much of the task is done, as a percentage. It's 0 until the task starts and 100 when it succeeds.

  • Name
    started_at
    Type
    timestamp
    Description

    Time the task started, in Unix milliseconds. It's 0 until the task starts.

  • Name
    created_at
    Type
    timestamp
    Description

    Time the task was created, in Unix milliseconds.

  • Name
    finished_at
    Type
    timestamp
    Description

    Time the task finished, in Unix milliseconds. It's 0 until the task finishes.

  • Name
    status
    Type
    string
    Description

    The task's status. See How a task runs.

  • Name
    texture_urls
    Type
    array
    Description

    Download URLs for the generated texture maps, as an array of objects. It usually holds one object. Each object has these fields:

    • Name
      base_color
      Type
      string
      Description

      The base color map.

    • Name
      metallic
      Type
      string
      Description

      The metallic map. Absent when you created the task with enable_pbr: false.

    • Name
      normal
      Type
      string
      Description

      The normal map. Absent when you created the task with enable_pbr: false.

    • Name
      roughness
      Type
      string
      Description

      The roughness map. Absent when you created the task with enable_pbr: false.

    • Name
      emission
      Type
      string
      Description

      The emission map. Absent in any of these cases:

      • You created the task with enable_pbr: false.
      • ai_model is meshy-7, meshy-7.1, or latest, or it is meshy-6-lite on any preview but meshy-t2 and meshy-t2.5.
      • texture_resolution is 8k.
      • The task refines a meshy-t2 or meshy-t2.5 preview without setting ai_model.
  • Name
    preceding_tasks
    Type
    integer
    Description

    The number of tasks ahead of this one in the queue. The value is meaningful only while the task is PENDING.

  • Name
    task_error
    Type
    object
    Description

    The error details when the task fails, in its v2 form. It's null unless the status is FAILED. See Task errors.

  • Name
    consumed_credits
    Type
    integer
    Description

    The number of credits the task used. Present when the status is PENDING, IN_PROGRESS, or SUCCEEDED. It's 0 for a FAILED task, because Meshy refunds the credits when a task fails.