Remesh API
Rebuild a 3D model's mesh with a new topology and face count, and export it in the formats you choose. The model can come from another Meshy task, such as Image to 3D or Text to 3D, or from a model file.
Create a Remesh task
Creates a Remesh task. The task runs in the background. For how long a task usually takes, see Processing times.
To convert a model's format or resize it, use the Convert API or the Resize API. The deprecated parameters on this page still work, but new integrations should use those endpoints.
Request
# Basic remesh with custom formats and resize
curl https://api.meshy.ai/openapi/v1/remesh \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"target_formats": ["glb", "fbx"],
"topology": "quad",
"target_polycount": 50000,
"resize_height": 1.0,
"origin_at": "bottom"
}'
# Quad remesh with auto-size
curl https://api.meshy.ai/openapi/v1/remesh \
-X POST \
-H "Authorization: Bearer ${YOUR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"target_formats": ["glb", "fbx"],
"topology": "quad",
"target_polycount": 50000,
"auto_size": true
}'
Response
{
"result": "0193bfc5-ee4f-73f8-8525-44b398884ce9"
}
Parameters
- Name
- input_task_id
- Type
- string
- Required
- Description
Required unless you send
model_url. The ID of the task whose model you want to remesh, for example a Text to 3D, Image to 3D, Retexture, or Remesh task. The task must be one you created with the API and have the statusSUCCEEDED.
- Name
- model_url
- Type
- string
- Required
- Description
Required unless you send
input_task_id. The model to remesh, as a public URL or a data URI. If you send both, Meshy usesinput_task_id.The model must be a GLB, glTF, OBJ, FBX, or STL file of at most 400 MB from an
httporhttpsURL, or 100 MB as a data URI. For a data URI, use the MIME typeapplication/octet-stream.A file over 100 MB must also follow these rules:
- A GLB, glTF, FBX, or OBJ file can have at most 10,000,000 faces. Meshy counts faces as triangles, so a quad counts as 2, and a mesh drawn more than once counts once per copy.
- An FBX file must be binary FBX 7.1 or newer.
- A GLB or glTF file must not use Draco compression.
- Name
- target_formats
- Type
- string[]
- default ["glb"]
- Description
The file formats to generate.
Available values:
glbfbxobjusdzblendstl3mf
- Name
- topology
- Type
- string
- default triangle
- Description
The face type of the remeshed model.
Available values:
quad: a quad-dominant meshtriangle: a decimated triangle mesh
- Name
- target_polycount
- Type
- integer
- default 30000
- Description
The number of faces to aim for, from
100to300000. The result can differ from the target, depending on the model's geometry. 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
- resize_height
- Type
- number
- ⚠ deprecated
- default 0
- Description
Use the Resize API instead. The height to resize the model to, in meters. Send at most one of
resize_height,resize_longest_side, andauto_size.
- Name
- resize_longest_side
- Type
- number
- ⚠ deprecated
- default 0
- Description
Use the Resize API instead. The length to resize the longest side of the model's bounding box to, in meters. Send at most one of
resize_height,resize_longest_side, andauto_size.
- Name
- auto_size
- Type
- boolean
- ⚠ deprecated
- default false
- Description
Use the Resize API instead. Whether to estimate the object's real-world height with AI vision and resize the model to it. Send at most one of
resize_height,resize_longest_side, andauto_size.
- Name
- origin_at
- Type
- string
- ⚠ deprecated
- default bottom
- Description
Use the Resize API instead. Where to put the model's origin,
bottomorcenter. The default applies when you sendresize_height,resize_longest_side, orauto_size. Without one of them, Meshy moves the origin only if you sendorigin_at.
- Name
- convert_format_only
- Type
- boolean
- ⚠ deprecated
- Description
Use the Convert API instead. Whether to only convert the model to
target_formats. Whentrue, Meshy ignorestopology,target_polycount,decimation_mode,resize_height,resize_longest_side, andauto_size, but still checks their values, so an invalid value returns400. Withconvert_format_only: true, an empty ornulltarget_formatsreturns400.
- Name
- alpha_thumbnail
- Type
- boolean
- default false
- Description
Whether to also render a preview with a transparent background (RGBA), returned in
alpha_thumbnail_urlwhen you get the task.thumbnail_urldoesn't change.
Returns
The result field of the response holds the ID of the new Remesh task.
Failure modes
- Name
400 - Bad Request- Description
The request can't run. The error message says which problem it found. For example:
- Missing parameter: Neither
model_urlnorinput_task_idwas sent. - Invalid input task:
input_task_idisn't a successful API task, or its AI model doesn't support remeshing. - Invalid model format: The
model_urlfile has an unsupported extension. - Unreachable URL: Meshy can't download the
model_urlfile. - Model file too large: The
model_urlfile is over 400 MB from anhttporhttpsURL, or over 100 MB as a data URI. - Too many faces: The
model_urlfile is over 100 MB and has more than 10,000,000 faces. Reduce the face count, then send the file again. - ASCII FBX over 100 MB: The
model_urlfile is an ASCII FBX over 100 MB. Send it as binary FBX or GLB. - Unreadable model file: The
model_urlfile is over 100 MB, and Meshy can't read its header. For example, it's a Draco-compressed GLB or glTF, or a binary FBX older than 7.1. - Model header too complex: The
model_urlfile is over 100 MB, and its header has too many meshes, nodes, or records to check. Reduce the number of objects in the file, then send it again. - Invalid topology:
topologyisn'tquadortriangle. - Mutually exclusive parameters: The request has more than one of
auto_size,resize_height, andresize_longest_side. Send only one.
Fix the request, then send it again. See Errors.
- Missing parameter: Neither
- Name
401 - Unauthorized- Description
The API key is missing or invalid. Check the
Authorizationheader.
- Name
402 - Payment Required- Description
For example:
- Insufficient credits: The account doesn't have enough credits for this task, or the account reached a credit limit. Check your credit balance, then retry.
- Free plan: Creating a task requires a paid plan. Upgrade your plan in your subscription settings, then retry.
- Name
403 - Forbidden- Description
input_task_idis a bas-relief model, which this endpoint can't remesh. The message isThis model type does not support this operation. Send a different model.
- Name
404 - Not Found- Description
input_task_iddoesn't match any of your tasks. Check the task ID, then send the request again.
- Name
429 - Too Many Requests- Description
You exceeded your rate limit. Wait, then retry. See Rate limits.
Get a Remesh task
Returns a Remesh task by its ID.
Request
curl https://api.meshy.ai/openapi/v1/remesh/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "remesh",
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"fbx": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.fbx?Expires=***",
"obj": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.obj?Expires=***",
"usdz": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.usdz?Expires=***",
"blend": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.blend?Expires=***",
"stl": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.stl?Expires=***"
},
"progress": 100,
"status": "SUCCEEDED",
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000001000,
"task_error": null,
}
Parameters
- Name
- id
- Type
- path
- Description
The task ID from the create response.
Returns
The Remesh task object.
Delete a Remesh task
Permanently deletes a Remesh task, including its models and data. You can't undo a delete.
Request
curl --request DELETE \
--url https://api.meshy.ai/openapi/v1/remesh/a43b5c6d-7e8f-901a-234b-567c890d1e2f \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response
// 200 OK on success, with an empty body.
//
// 409 Conflict when the task is IN_PROGRESS. The task keeps running:
{
"message": "Task is IN_PROGRESS and cannot be deleted. Credits for a task the worker has already started are not refundable; wait for it to reach SUCCEEDED, FAILED or CANCELED, then delete it."
}
Path parameters
- Name
- id
- Type
- path
- Description
The ID of the task to delete.
Task status
Deleting a PENDING task refunds the credits it used when you created it.
An IN_PROGRESS task can't be deleted. The request returns 409 Conflict,
and the task keeps running. Meshy doesn't refund a task that has started,
so deleting it would cost you both the credits and the result. Wait for it
to reach SUCCEEDED, FAILED, or CANCELED, then delete it.
Deleting a task in a final status (SUCCEEDED, FAILED, or CANCELED)
doesn't refund its credits.
Returns
200 OK when the task is deleted, or 409 Conflict when the task is
IN_PROGRESS.
List Remesh tasks
Returns a list of your Remesh tasks.
Request
curl https://api.meshy.ai/openapi/v1/remesh?page_size=10 \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response
[
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "remesh",
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"fbx": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.fbx?Expires=***",
"obj": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.obj?Expires=***",
"usdz": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.usdz?Expires=***",
"blend": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.blend?Expires=***",
"stl": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.stl?Expires=***"
},
"progress": 100,
"status": "SUCCEEDED",
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000001000,
"task_error": null
}
]
Parameters
- Name
- page_num
- Type
- integer
- default 1
- Description
The page number to return.
- Name
- page_size
- Type
- integer
- default 10
- Description
The number of tasks per page, up to
100.
- Name
- sort_by
- Type
- string
- Description
The sort order.
Available values:
+created_at: oldest first-created_at: newest first
Returns
A paginated list of Remesh task objects.
Stream a Remesh task
Streams a Remesh task's updates as Server-Sent Events (SSE).
Request
curl -N https://api.meshy.ai/openapi/v1/remesh/a43b5c6d-7e8f-901a-234b-567c890d1e2f/stream \
-H "Authorization: Bearer ${YOUR_API_KEY}"
Response Stream
// Error event example
event: error
data: {
"status_code": 404,
"message": "Task not found"
}
// Message event examples illustrate task progress.
// These examples are shortened. Each event holds the full task object.
event: message
data: {
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"progress": 0,
"status": "PENDING"
}
event: message
data: {
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "remesh",
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"fbx": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.fbx?Expires=***",
"obj": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.obj?Expires=***",
"usdz": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.usdz?Expires=***",
"blend": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.blend?Expires=***",
"stl": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.stl?Expires=***"
},
"progress": 100,
"status": "SUCCEEDED",
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000001000,
"task_error": null,
}
Parameters
- Name
- id
- Type
- path
- Description
The task ID from the create response.
Returns
A stream of Remesh task objects as Server-Sent Events.
Each event holds the full task object, in the same shape the Get endpoint returns. While the task is PENDING or IN_PROGRESS, its result fields don't have values yet.
The Remesh task object
A Remesh task object describes one remesh of a 3D model. It holds the status, the progress, and the model files when the task succeeds.
Properties
Example Remesh Task Object
{
"id": "0193bfc5-ee4f-73f8-8525-44b398884ce9",
"type": "remesh",
"model_urls": {
"glb": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.glb?Expires=***",
"fbx": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.fbx?Expires=***",
"obj": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.obj?Expires=***",
"usdz": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.usdz?Expires=***",
"blend": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.blend?Expires=***",
"stl": "https://assets.meshy.ai/***/tasks/0193bfc5-ee4f-73f8-8525-44b398884ce9/output/model.stl?Expires=***"
},
"progress": 100,
"status": "SUCCEEDED",
"preceding_tasks": 0,
"created_at": 1699999999000,
"started_at": 1700000000000,
"finished_at": 1700000001000,
"task_error": {
"message": ""
},
"consumed_credits": 5
}
- 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, always
remesh.
- Name
- model_urls
- Type
- object
- Description
Download URLs for the remeshed 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
obj- Type
- string
- Description
The OBJ file.
- Name
usdz- Type
- string
- Description
The USDZ file.
- Name
blend- Type
- string
- Description
The Blender file.
- Name
stl- Type
- string
- Description
The STL file.
- Name
3mf- Type
- string
- Description
The 3MF file. Present only when
target_formatsincludes3mf.
- Name
- thumbnail_url
- Type
- string
- Description
Download URL for a preview image of the remeshed model.
- Name
- alpha_thumbnail_url
- Type
- string
- Description
Download URL for a version of
thumbnail_urlwith a transparent background (RGBA). Present only when you created the task withalpha_thumbnail: trueand Meshy rendered the transparent preview.
- Name
- progress
- Type
- integer
- Description
How much of the task is done, as a percentage. It's
0until the task starts and100when it succeeds.
- Name
- status
- Type
- string
- Description
The task status, one of
PENDING,IN_PROGRESS,SUCCEEDED, orFAILED.
- 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
- created_at
- Type
- timestamp
- Description
Time the task was created, in Unix milliseconds.
- Name
- started_at
- Type
- timestamp
- Description
Time the task started, in Unix milliseconds. It's
0until the task starts.
- Name
- finished_at
- Type
- timestamp
- Description
Time the task finished, in Unix milliseconds. It's
0until the task finishes.
- Name
- task_error
- Type
- object
- Description
The error details when the task fails. See Errors.
- Name
- consumed_credits
- Type
- integer
- Description
The number of credits the task used. Present when the status is
PENDING,IN_PROGRESS, orSUCCEEDED. It's0for aFAILEDtask, because Meshy refunds the credits when a task fails.