Rigging API
Add a skeleton to a humanoid (biped) character or a four-legged (quadruped) animal so you can animate it. Every Rigging task also returns a walking and a running animation of the character.
Moving from v1? The main changes for Rigging:
skeleton_templatedefaults tomixamo.- The request has no
texture_image_url, and a request with it returns400. Meshy uses the textures embedded in themodel_urlfile, or the input task's textures. - Results are in
outputinstead ofresult. - A file that wasn't produced is
nullinstead of"".
Create a Rigging task
Creates a Rigging 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.
To animate the rigged character, send the Rigging task's id as rig_task_id to Animation.
To find out before you rig whether Meshy can rig the model, see Rigging Check.
curl https://api.meshy.ai/openapi/v2/rigging \
-X POST \
-H "Authorization: Bearer ${MESHY_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "01a15cd4-3268-75ae-832a-c33f1de2ed7f",
"height_meters": 1.7
}'Parameters
- Name
- input_task_id
- Type
- string
- Required
- Description
Required unless you send
model_url. The ID of the task whose model to rig. The task must be one you created with the API, have the statusSUCCEEDED, and have produced a 3D model with a preview image. For example, send a Text to 3D, Image to 3D, Remesh, or Retexture task.A task that hasn't succeeded returns
400. A task without a preview image returns404, for example a Convert task, or a Resize task withoutauto_size.The model can have at most 380,000 triangles (a quad counts as 2), and a model with more returns
400. Models generated without a remesh often have more. To stay under the limit, generate the model withshould_remesh: true, or run Remesh on it first with atarget_polycountof300000or less, or150000or less withtopology: quad. See Generate and rig a character.
- Name
- model_url
- Type
- string
- Required
- Description
Required unless you send
input_task_id. The character to rig, as a GLB file. Send a public URL whose path ends in.glb, or a data URI of a GLB file. Sending bothinput_task_idandmodel_urlreturns400.Meshy rigs the character with the textures embedded in the file. To rig a textured character, embed its textures in the GLB.
The character must face the +Z axis, the glTF forward direction. A character that faces another axis can get a wrong skeleton even when the task succeeds, or fail with
422.The file can be up to 400 MB from a URL, or up to 100 MB as a data URI. A larger file returns
400.The model can have at most 380,000 triangles (a quad counts as 2), and a model with more returns
400. To stay under the limit, run Remesh on it first with atarget_polycountof300000or less, or150000or less withtopology: quad.A file over 100 MB can have at most 10,000,000 faces, and a file with more returns
400. Meshy counts faces as triangles, and a mesh that the file draws more than once counts once for each copy.A file over 100 MB can't use Draco compression. A Draco-compressed file over 100 MB returns
400.
- Name
- animation_type
- Type
- string
- default biped
- Description
The kind of character to rig. Any other value returns
400.Available values:
biped: a humanoid characterquadruped: a four-legged animal. See Rig a four-legged animal.
- Name
- height_meters
- Type
- number
- Description
The model's height in meters. Meshy scales the rigged model to this height. Without it, or with
0, the model keeps its own size. A negative value returns400.Try and preview
- Name
- skeleton_template
- Type
- string
- default mixamo
- Description
The skeleton for the rigged character, which sets its bone names and hierarchy. Pick the one your engine or tool expects.
Available values:
meshyrig: Meshy's own skeletonmixamo: Mixamoue5_mannequin: Unreal Engine 5 Mannequinmax_biped: 3ds Max Bipedunity_humanoid: Unity Humanoidmaya_human_ik: Maya HumanIKblender_rigify_basic_human: Blender Rigify basic humancc5_hd_neutral_base: Character Creator 5 HD neutral basedaz_genesis9: DAZ Genesis 9
Any other value returns
400. Works only with a biped rig.The files are in meters. If Meshy can't rig a model on that skeleton, the task fails.
The basic animations' clips are named
WalkingandRunning, as in a download from the Meshy web app. The GLB and FBX files include tip bones at the head, hands, and toes, which carry no skin weight. A few bones, such asheadfront, keep their original names.Animation tasks made from this rig use the same skeleton.
- Name
- include_fingers
- Type
- boolean
- default false
- Description
Whether to add finger bones to the character's hands. With
meshyrig, the finger bones use Mixamo names, such asLeftHandThumb1.With
true, these requests return an error, and Meshy doesn't charge for them:- A quadruped rig, or an
input_task_idwhose model has quad topology, returns400. - If Meshy can't rig the character's hands with fingers, the task fails. Retry it, or set
include_fingerstofalse.
Meshy finds the fingers automatically and works best on hands with clearly separated fingers. On hands modeled as one shape, such as mittens, gloves, or stylized hands, the rig can have fewer finger bones and animate the hand as one piece. The rest of the skeleton is the same either way. The skeleton might also include extra bones, for example for hair or clothing. Finger bones don't change the credit cost.
- A quadruped rig, or an
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
input_task_idnormodel_urlwas sent - Both
input_task_idandmodel_urlwere sent input_task_iddoesn't match any of your tasks (input_task_id does not match any of your tasks)- The task in
input_task_idhasn't succeeded. The code isinput_task_not_ready. Wait until its status isSUCCEEDED, then retry. - The model has more than 380,000 triangles (a quad counts as 2)
model_urlisn't a GLB file, can't be downloaded, or is too large- A
model_urlfile over 100 MB has too many faces (failed to process model for rigging: model has too many faces: <N> faces, the limit for files over 100 MB is <limit>) - A
model_urlfile over 100 MB has a header that can't be read, for example a Draco-compressed GLB (failed to process model for rigging: invalid model file content) - A
model_urlfile over 100 MB has a header too complex to check (failed to process model for rigging: model header is too complex to check for files over 100 MB) animation_typeisn'tbipedorquadrupedskeleton_templateisn't one of the available valuesskeleton_template, orinclude_fingersset totrue, was sent withanimation_typequadruped. The code isparameters_conflict.include_fingersistrueand theinput_task_idmodel has quad topology. The code isinput_task_unsupported.
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
input_task_idis a bas-relief model, which this endpoint can't rig. The message isThis model type does not support this operation. Send a different model.
- Name
404 - Not Found- Description
Meshy can't rig the task in
input_task_id. The error code says why:input_task_unsupported: the task has no preview image, for example a Convert task, or a Resize task withoutauto_size. Rig the task it came from, or send the model asmodel_url.input_task_expired: the task's files were deleted. Create the task again, then send that task'sid.
- Name
422 - Unprocessable Entity- Description
Meshy couldn't rig the model. One of these applies:
- Meshy found no humanoid character in the model. The code is
model_not_riggable. Withanimation_type: "biped"(the default), send one humanoid character in a T-pose or A-pose, facing the +Z axis. If the model is a four-legged animal, setanimation_typetoquadruped. - The input task's model file isn't a valid GLB. Rig a different task.
- Meshy couldn't finish analyzing a
model_urlmodel. The code isservice_unavailable, and the request is safe to retry. - Meshy can't rig this model automatically. Rigging works best on a single humanoid character in a T-pose or A-pose, facing the +Z axis. Meshy doesn't charge for the request.
- Meshy found no humanoid character in the model. The code is
- 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
- Name
503 - Service Unavailable- Description
Meshy couldn't finish analyzing the model's pose. The code is
service_unavailable. Retry the request.
Rig a four-legged animal
To rig a four-legged animal, send animation_type set to quadruped.
A quadruped rig differs from a biped rig in these ways:
basic_animationshas a walking and a running animation of the animal. If Meshy can't make one of them, its URLs arenull, and the task still succeeds.walking_armature_glb_urlandrunning_armature_glb_urlare the rig's skeleton, with no animation.- Sending
skeleton_template, orinclude_fingersset totrue, returns400. - If Meshy can't rig the model as a four-legged animal, the task fails.
A quadruped rig costs the same as a biped rig. See Pricing.
To animate the rigged animal, apply library animations whose rig_type is quadruped, as action_id or action_ids. See Animation.
Request
# Rig a four-legged animal
curl https://api.meshy.ai/openapi/v2/rigging \
-X POST \
-H "Authorization: Bearer ${MESHY_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
"animation_type": "quadruped"
}'
Generate and rig a character
To rig a character you generate, create an Image to 3D task for a character in a T-pose, remeshed to stay under the face limit. When the task succeeds, send its id as input_task_id.
The main Image to 3D settings for rigging:
pose_mode: "t-pose"generates the character standing in a T-pose. A T-pose or A-pose gives the rig clear arms and legs to work with.should_remesh: truewithtarget_polycount: 30000keeps the model well under 380,000 triangles.
Meshy charges for each task separately. See Pricing.
Image to 3D, then Rigging
# 1. Generate a character in a T-pose, remeshed to about 30,000 faces
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://docs.meshy.ai/images/api/quick-start/source-photo.webp",
"texture_model": "meshy-7",
"pose_mode": "t-pose",
"should_remesh": true,
"target_polycount": 30000
}'
# 2. When the Image to 3D task succeeds, rig it
curl https://api.meshy.ai/openapi/v2/rigging \
-X POST \
-H "Authorization: Bearer ${MESHY_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"input_task_id": "<Image to 3D task ID>",
"height_meters": 1.8
}'
Get the result
Read Rigging tasks the same way as every other v2 task, through the Tasks routes. To list only Rigging tasks, filter by type=rig.
| 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=rig |
| Delete a task | DELETE /openapi/v2/tasks/{id} |
Rigging 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.
Animation uses the Rigging task's files, so create your Animation tasks before the Rigging task's expires_at. After that, Animation returns 404.
curl https://api.meshy.ai/openapi/v2/tasks/01a1f583-babe-719b-bf51-d6f263346d2c \
-H "Authorization: Bearer ${MESHY_API_KEY}"Loading…- Name
- rigged_character_glb_url
- Type
- string | null
- Description
Signed URL to the rigged character as a GLB file.
nullif the file wasn't produced.
- Name
- rigged_character_fbx_url
- Type
- string | null
- Description
Signed URL to the rigged character as an FBX file.
nullif the file wasn't produced.
- Name
- basic_animations
- Type
- object
- Description
Signed URLs to a walking and a running animation of the character, which Meshy makes for every rig. A URL is
nullif that file wasn't produced.walking_glb_url: the walking animation with the character's mesh, as a GLB filewalking_fbx_url: the walking animation with the character's mesh, as an FBX filewalking_armature_glb_url: the walking animation with the skeleton only, as a GLB filerunning_glb_url: the running animation with the character's mesh, as a GLB filerunning_fbx_url: the running animation with the character's mesh, as an FBX filerunning_armature_glb_url: the running animation with the skeleton only, as a GLB file
Rigging tasks have no preview image or texture URLs in output.