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

Image to 3D API

Turn one image into a 3D model, textured or untextured, in the formats you choose.


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

Create an Image to 3D task

Creates an Image 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
Faces834,512
Cost30 credits
Request
curl https://api.meshy.ai/openapi/v2/image-to-3d \
  -X POST \
  -H "Authorization: Bearer ${MESHY_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "image_url": "https://cdn.meshy.ai/webapp-assets/doc/try-it/v2/inputs/santa.3dbe655f9980.jpg",
    "ai_model": "meshy-7.1",
    "should_texture": true,
    "texture_model": "meshy-7"
  }'
Response
Loading…

Parameters

  • Name
    image_url
    Type
    string
    Required
    Description

    Required unless you send input_task_id. The image to turn into a model, as a public URL or a data URI (data:image/png;base64,...).

    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
    input_task_id
    Type
    string
    Required
    Description

    Required unless you send image_url. The ID of a Text to Image or Image to Image task to use as the input. The task must be one you created with the API, have the status SUCCEEDED, and have produced exactly one image. If you send both image_url and input_task_id, Meshy uses input_task_id.

    For a multi-view image task, use Multi-Image to 3D.

  • Name
    ai_model
    Type
    string
    default latest
    Description

    The model that generates the 3D model. This is the only model setting.

    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.

  • Name
    geometry_resolution
    Type
    string
    default standard
    Description

    How much geometry detail to generate.

    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_texture
    Type
    boolean
    default true
    Description

    Whether to generate textures. true returns a textured model, and false returns an untextured mesh. With false, Meshy ignores texture_model and the other texture parameters.

    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 the 3D model, in the same 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

    A textured request without texture_model returns 400, and so does an option the texture model doesn't support. The texture model doesn't change the credit cost. See Texture models.

  • Name
    enable_pbr
    Type
    boolean
    default false
    Description

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

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

    Size of the base color texture.

    Try and preview

    Available values:

    • 2k
    • 4k
    • 8k

    4k and 8k need texture_model: "meshy-7". With meshy-n1 or meshy-6-lite, they return 400.

  • 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 texture_model: "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. It follows the same format and size rules as image_url. With texture_model: "meshy-n1", Meshy textures from this image as the front view, or from the input image when you leave it out.

  • Name
    target_formats
    Type
    string[]
    default ["glb"]
    Description

    The file formats to generate. Meshy generates only the formats you list.

    Available values:

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

    Meshy scales STL and 3MF files down to at most 150 mm on the longest side.

  • 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. 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 when the model is remeshed, which meshy-6-lite does by default.

    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
    save_pre_remeshed_model
    Type
    boolean
    default false
    Description

    Whether to also return the GLB from before the remesh, in output.model_urls.pre_remeshed_glb.

  • Name
    target_polycount
    Type
    integer
    Description

    The number of faces to aim for. 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
    auto_polycount
    Type
    boolean
    Description

    Set it to true to have Meshy choose the face count from the input image, within meshy-t2.5's range. It applies only to meshy-t2.5 (or meshy-smart-topology-latest, which resolves to it). With any other ai_model, or together with target_polycount, the request returns 400 (parameters_conflict).

    If Meshy can't recommend a face count for the image, the task uses meshy-t2.5's default; the request still succeeds. The task's output.target_polycount shows the face count the task used. Defaults to false.

  • Name
    pose_mode
    Type
    string
    Description

    The pose for a character model, a-pose or t-pose. Leave it out for no pose.

    Try and preview
  • Name
    image_enhancement
    Type
    boolean
    default true
    Description

    Whether to clean up the input image before generating. false uses the image exactly as it is. meshy-6-lite and Smart Topology models ignore this setting.

  • Name
    remove_lighting
    Type
    boolean
    default true
    Description

    Whether to remove highlights and shadows from the base color texture. The texture models that texture_model takes don't use this setting, so Meshy ignores it.

  • Name
    moderation
    Type
    boolean
    default false
    Description

    Whether to screen these inputs for harmful content before generating:

    • The input image
    • texture_image_url
    • texture_prompt
  • 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.

  • Name
    multi_view_thumbnails
    Type
    boolean
    default false
    Description

    Whether to also render front, right, back, and left previews, returned in output.thumbnail_urls. This adds about 5 seconds to the task.

  • 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.

Returns

202 Accepted with the task object. The task starts as PENDING, with your request in input and output set to null.

Two response headers help you read the task:

  • Location: the task's URL on Tasks
  • Retry-After: how many seconds to wait before you first read it

Failure modes

  • Name
    400 - Bad Request
    Description

    The request can't run. For example:

    • Neither image_url nor input_task_id was sent
    • A textured request didn't send texture_model
    • Both texture_prompt and texture_image_url were sent
    • The image can't be downloaded, is over 20 MB, or is outside the pixel limits
    • geometry_resolution isn't available for the model
    • The texture model doesn't support an option in the request, for example enable_pbr: true or a 4k texture with meshy-n1

    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
    404 - Not Found
    Description

    input_task_id doesn't match any of your tasks.

  • 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.

Texture models

ai_model picks the model that builds the mesh, and texture_model picks the model that paints it. texture_model has no default, so every textured request sends it. To choose a pair for your project, see Models.

The following table shows the texture models that each ai_model takes on each endpoint. Any other pair returns 400.

ai_modelImage to 3DMulti-Image to 3DText to 3D
meshy-7.1, latest, or meshy-standard-latestmeshy-7, meshy-n1, or meshy-6-litemeshy-7 or meshy-n1meshy-7, meshy-n1, or meshy-6-lite
meshy-6meshy-7, meshy-n1, or meshy-6-litemeshy-7 or meshy-n1meshy-7, meshy-n1 with texture_image_url, or meshy-6-lite
meshy-6-litemeshy-7, meshy-n1, or meshy-6-litemeshy-7 or meshy-n1meshy-7, meshy-n1 with texture_image_url, or meshy-6-lite
meshy-t2.5, meshy-t2, or meshy-smart-topology-latestmeshy-7, meshy-n1, or meshy-6-liteNone. Multi-Image to 3D has no Smart Topology models.meshy-7, meshy-n1, or meshy-6-lite

Retexture takes meshy-7, meshy-n1, or meshy-6-lite for any model.

Each texture model supports a different set of options. The following table shows them. A request that asks a texture model for an option it doesn't support returns 400.

Optionmeshy-7meshy-n1meshy-6-lite
texture_resolution2k, 4k, or 8k2k2k
enable_pbr: trueYesNoYes
texture_promptYesNoYes
texture_image_urlYesYes, as the front viewYes
Several reference images: texture_image_urls or multiview_image_urlsYesYesNo
topology: "quad" on a remeshed modelYesNoYes

Meshy N1 textures models of up to 7,999,999 triangles. If the generated model is larger, the task fails, and Meshy refunds its credits.

The texture model doesn't change the price. A textured task costs the mesh plus the texture at its resolution. See Pricing.


Get the result

Read Image to 3D tasks the same way as every other v2 task, through the Tasks routes. To list only Image to 3D tasks, filter by type=image-to-3d.


Image to 3D output

When the task succeeds, output holds these fields. The rest of the task object is the same for every task type. The URLs in output stop working at expires_at.

Request
curl https://api.meshy.ai/openapi/v2/tasks/01a1aeac-afb0-77bf-a47b-47a43ee563bc \
  -H "Authorization: Bearer ${MESHY_API_KEY}"
Response
Loading…
  • Name
    model_urls
    Type
    object
    Description

    Signed URLs to the generated files, one per format in target_formats, keyed by format. Two more keys can appear:

    • mtl: the material file of a textured obj
    • pre_remeshed_glb: the GLB from before the remesh, when you sent save_pre_remeshed_model: true and the model was remeshed
  • Name
    thumbnail_url
    Type
    string
    Description

    Signed URL to a PNG preview of the model, with a transparent background.

  • Name
    thumbnail_urls
    Type
    object | null
    Description

    Signed URLs to the previews, keyed by view:

    • front
    • right
    • back
    • left

    null unless you sent multi_view_thumbnails: true. A view that failed to render is left out.

  • 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 an untextured model.

  • Name
    target_polycount
    Type
    integer
    Description

    The face count a Smart Topology task (meshy-t2 or meshy-t2.5) generated at: the target_polycount you sent, the one auto_polycount picked, or the model's default. Other tasks leave it out.