Multi-Image to 3D API
Turn one to four images of the same object, from different angles, into one 3D model.
Moving from v1? The main changes for Multi-Image to 3D:
target_formatsdefaults to GLB.- A textured model needs
texture_modelset tomeshy-7ormeshy-n1. - Sending both
texture_promptandtexture_image_urlreturns400. - Results are in
output.
Create a Multi-Image to 3D task
Creates a Multi-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.
curl https://api.meshy.ai/openapi/v2/multi-image-to-3d \
-X POST \
-H "Authorization: Bearer ${MESHY_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"image_urls": [
"https://cdn.meshy.ai/webapp-assets/doc/try-it/v2/inputs/santa-views-0.f420446ba36c.webp",
"https://cdn.meshy.ai/webapp-assets/doc/try-it/v2/inputs/santa-views-1.c0886f07c59b.webp",
"https://cdn.meshy.ai/webapp-assets/doc/try-it/v2/inputs/santa-views-2.f0993cae9467.webp"
],
"should_texture": true,
"ai_model": "meshy-7.1",
"texture_model": "meshy-7"
}'Parameters
- Name
- image_urls
- Type
- string[]
- Required
- Description
Required unless you send
input_task_id. One to four images of the same object, each as a public URL or a data URI (data:image/png;base64,...). Put the front view first. Meshy uses the first image as the front view. Withmeshy-7.1orlatest, the order of the others doesn't matter. More than four images returns400.Each 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_urls. The ID of a Text to Image or Image to Image task to use as the input, including a multi-view one. The task must be one you created with the API and have the statusSUCCEEDED. Meshy uses its images, one to four, as the input. If you send bothimage_urlsandinput_task_id, Meshy usesinput_task_id.
- Name
- ai_model
- Type
- string
- default latest
- Description
The model that generates the 3D model.
Available values:
latest: Meshy 7.1meshy-7.1meshy-6meshy-6-litemeshy-standard-latest: same aslatest
Smart Topology models aren't available for Multi-Image to 3D, and return
400.See Models for which model fits your project, such as a real object or a 3D print.
- Name
- geometry_resolution
- Type
- string
- default standard
- Description
How much geometry detail to generate.
Try and previewAvailable values:
standard2k: adds the Ultra pass
2kneedsmeshy-7.1orlatest. With other models, it returns400. Multi-Image to 3D has no4k, so4kreturns400.
- Name
- should_texture
- Type
- boolean
- default true
- Description
Whether to generate textures.
truereturns a textured model, andfalsereturns an untextured mesh. Withfalse, Meshy ignorestexture_modeland the other texture parameters.Try and preview
should_texture = true- Name
- texture_model
- Type
- string
- Required
- Description
Required unless
should_textureisfalse. The model that textures the 3D model, in the same task. Everyai_modeltakes each of these values.Available values:
meshy-7: Meshy 7, with PBR maps, a text prompt, and textures up to 8Kmeshy-n1: Meshy N1, a 2K base color texture from reference images only
Multi-Image to 3D takes only texture models that paint from several views, so any other value returns
400. A textured request withouttexture_modelreturns400, 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",truereturns400.Try and preview
- Name
- texture_resolution
- Type
- string
- default 2k
- Description
Size of the base color texture.
Try and previewAvailable values:
2k4k8k
4kand8kneedtexture_model: "meshy-7". Withmeshy-n1, they return400.
- Name
- texture_prompt
- Type
- string
- Description
Text that guides the texture, up to 800 characters. Longer text returns
400. Withtexture_model: "meshy-n1", sending it returns400.
- Name
- texture_image_url
- Type
- string
- Description
One image that guides the texture, as a public URL or a data URI. It follows the same format and size rules as the images in
image_urls. Withtexture_model: "meshy-n1", Meshy textures from this image as the front view.
- Name
- texture_image_urls
- Type
- string[]
- Description
One to four images of the object that guide the texture. They follow the same format and size rules as the images in
image_urls, and they can differ fromimage_urls. Meshy uses the first image as the front view. The order of the other views (left, back, right) doesn't matter.An empty list, or more than four images, returns
400.
Send at most one of texture_prompt, texture_image_url, and texture_image_urls. Sending two or more returns 400.
- Name
- target_formats
- Type
- string[]
- default ["glb"]
- Description
The file formats to generate. Meshy generates only the formats you list.
Available values:
glbobjfbxstlusdz3mf
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.
falsekeeps the mesh as generated.Try and preview
should_remesh = true- Name
- topology
- Type
- string
- default triangle
- Description
The face type of the remeshed model,
triangleorquad. Withtexture_model: "meshy-n1",quadreturns400.Try and previewApplies when
should_remeshistrue. Picking a value sets it.
- Name
- target_polycount
- Type
- integer
- default 30000
- Description
The number of faces to aim for, from
100to300000. A value outside the range returns400.
- Name
- decimation_mode
- Type
- integer
- Description
Adaptive face count, by level. When you set it, Meshy ignores
target_polycount.Available values:
1: ultra2: high3: medium4: 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
- pose_mode
- Type
- string
- Description
The pose for a character model,
a-poseort-pose. Leave it out for no pose.Try and preview
- Name
- image_enhancement
- Type
- boolean
- default true
- Description
Whether to clean up the input images before generating.
falseuses the images exactly as they are.meshy-6-liteignores 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_modeltakes 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 images
texture_image_urlortexture_image_urlstexture_prompt
- Name
- auto_size
- Type
- boolean
- default false
- Description
Whether to estimate the object's real-world height and scale the model to it.
auto_size = true- Name
- origin_at
- Type
- string
- default bottom
- Description
Where to place the model's origin,
bottomorcenter.
- 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:
512or1024. It applies tooutput.thumbnail_urland to any optional preview you request. Any other value returns400.
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 TasksRetry-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_urlsnorinput_task_idwas sent - There are more than four images
- A textured request didn't send
texture_model, or sentmeshy-6-lite - Two texture inputs were sent
- An image can't be downloaded, is over 20 MB, or is outside the pixel limits
geometry_resolutionisn't available for the model- The texture model doesn't support an option in the request, for example
enable_pbr: trueor a4ktexture withmeshy-n1 ai_modelis a Smart Topology model
The error message says which problem it found. See Errors.
- Neither
- Name
401 - Unauthorized- Description
The API key is missing or invalid. Check the
Authorizationheader.
- 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_iddoesn'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.
- You sent too many requests. Wait the number of seconds in
Get the result
Read Multi-Image to 3D tasks the same way as every other v2 task, through the Tasks routes. To list only Multi-Image to 3D tasks, filter by type=multi-image-to-3d.
| To | Call |
|---|---|
| Get one task | GET /openapi/v2/tasks/{id} |
| Wait for updates | GET /openapi/v2/tasks/{id}/stream or a webhook |
| List your tasks | GET /openapi/v2/tasks?type=multi-image-to-3d |
| Delete a task | DELETE /openapi/v2/tasks/{id} |
Multi-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.
curl https://api.meshy.ai/openapi/v2/tasks/01a1af0f-8a85-7643-bcbe-d825acfe77d2 \
-H "Authorization: Bearer ${MESHY_API_KEY}"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 texturedobjpre_remeshed_glb: the GLB from before the remesh, when you sentsave_pre_remeshed_model: trueand 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:
frontrightbackleft
nullunless you sentmulti_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_colormetallicroughnessnormalmetallic_roughnessemission
A map that wasn't produced is
null. The array is empty for an untextured model.