> **Reading as an AI agent?** This is the Markdown version of https://docs.meshy.ai/api/v2/rigging, part of the Meshy API v2 docs.
>
> - v2 docs index: https://docs.meshy.ai/api/v2/llms.txt
> - All v2 pages in one file: https://docs.meshy.ai/api/v2/llms-full.txt
> - OpenAPI spec for v2: https://docs.meshy.ai/api/v2/openapi.yaml

---

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

> **Note:** Moving from v1? The main changes for Rigging:
>   * `skeleton_template` defaults to `mixamo`.
>   * The request has no `texture_image_url`, and a request with it returns `400`. Meshy uses the textures embedded in the `model_url` file, or the input task's textures.
>   * Results are in `output` instead of `result`.
>   * A file that wasn't produced is `null` instead of `""`.
>
>   See [what changed for the other endpoints](/api/migrate-to-v2/reference#other-endpoints).

---

## POST /openapi/v2/rigging -- Create a Rigging task

Creates a Rigging task and returns the [task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object). The task runs in the background. To read its result, see [Get the result](#get-the-result). For how long a task usually takes, see [Processing times](/api/task-lifecycle#processing-times).

To animate the rigged character, send the Rigging task's `id` as `rig_task_id` to [Animation](https://docs.meshy.ai/api/v2/animation.md).

To find out before you rig whether Meshy can rig the model, see [Rigging Check](https://docs.meshy.ai/api/v2/rigging-check.md).

### Parameters

  - `input_task_id` · *string* · **required**

  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 status `SUCCEEDED`, 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 returns `404`, for example a Convert task, or a Resize task without `auto_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 with `should_remesh: true`, or run [Remesh](https://docs.meshy.ai/api/v2/remesh.md) on it first with a `target_polycount` of `300000` or less, or `150000` or less with `topology: quad`. See [Generate and rig a character](#generate-and-rig-a-character).

  - `model_url` · *string* · **required**

  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 both `input_task_id` and `model_url` returns `400`.

  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](https://docs.meshy.ai/api/v2/remesh.md) on it first with a `target_polycount` of `300000` or less, or `150000` or less with `topology: 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`.

  - `animation_type` · *string* · default: `biped`

  The kind of character to rig. Any other value returns `400`.

  Available values:
  * `biped`: a humanoid character
  * `quadruped`: a four-legged animal. See [Rig a four-legged animal](#rig-a-four-legged-animal).

  - `height_meters` · *number*

  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 returns `400`.

  - `skeleton_template` · *string* · default: `mixamo`

  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 skeleton
  * `mixamo`: Mixamo
  * `ue5_mannequin`: Unreal Engine 5 Mannequin
  * `max_biped`: 3ds Max Biped
  * `unity_humanoid`: Unity Humanoid
  * `maya_human_ik`: Maya HumanIK
  * `blender_rigify_basic_human`: Blender Rigify basic human
  * `cc5_hd_neutral_base`: Character Creator 5 HD neutral base
  * `daz_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 `Walking` and `Running`, 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 as `headfront`, keep their original names.

  [Animation](https://docs.meshy.ai/api/v2/animation.md) tasks made from this rig use the same skeleton.

  - `include_fingers` · *boolean* · default: `false`

  Whether to add finger bones to the character's hands. With `meshyrig`, the finger bones use Mixamo names, such as `LeftHandThumb1`.

  With `true`, these requests return an error, and Meshy doesn't charge for them:
  * A quadruped rig, or an `input_task_id` whose model has quad topology, returns `400`.
  * If Meshy can't rig the character's hands with fingers, the task fails. Retry it, or set `include_fingers` to `false`.

  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.

### Returns

`202 Accepted` with the [task object](https://docs.meshy.ai/api/v2/tasks.md#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](https://docs.meshy.ai/api/v2/tasks.md#how-a-task-runs)
* `Retry-After`: how many seconds to wait before you first read it

### Failure modes

  - `400 - Bad Request`

  The request can't run. For example:
  * Neither `input_task_id` nor `model_url` was sent
  * Both `input_task_id` and `model_url` were sent
  * `input_task_id` doesn't match any of your tasks (`input_task_id does not match any of your tasks`)
  * The task in `input_task_id` hasn't succeeded. The code is `input_task_not_ready`. Wait until its status is `SUCCEEDED`, then retry.
  * The model has more than 380,000 triangles (a quad counts as 2)
  * `model_url` isn't a GLB file, can't be downloaded, or is too large
  * A `model_url` file 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_url` file 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_url` file 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_type` isn't `biped` or `quadruped`
  * `skeleton_template` isn't one of the available values
  * `skeleton_template`, or `include_fingers` set to `true`, was sent with `animation_type` `quadruped`. The code is `parameters_conflict`.
  * `include_fingers` is `true` and the `input_task_id` model has quad topology. The code is `input_task_unsupported`.

  The error message says which problem it found. See [Errors](https://docs.meshy.ai/api/v2/errors.md#request-errors).

  - `401 - Unauthorized`

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

  - `402 - Payment Required`

  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.

  - `403 - Forbidden`

  `input_task_id` is a bas-relief model, which this endpoint can't rig. The message is `This model type does not support this operation`. Send a different model.

  - `404 - Not Found`

  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 without `auto_size`. Rig the task it came from, or send the model as `model_url`.
  * `input_task_expired`: the task's files were deleted. Create the task again, then send that task's `id`.

  - `422 - Unprocessable Entity`

  Meshy couldn't rig the model. One of these applies:
  * Meshy found no humanoid character in the model. The code is `model_not_riggable`. With `animation_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, set `animation_type` to `quadruped`.
  * The input task's model file isn't a valid GLB. Rig a different task.
  * Meshy couldn't finish analyzing a `model_url` model. The code is `service_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.

  - `429 - Too Many Requests`

  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.

  - `503 - Service Unavailable`

  Meshy couldn't finish analyzing the model's pose. The code is `service_unavailable`. Retry the request.

**cURL**

```bash
# Rig a character from a Meshy task, scaled to 1.8 m tall
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",
    "height_meters": 1.8
  }'
```

```javascript
// Rig a character from a Meshy task, scaled to 1.8 m tall
const response = await fetch("https://api.meshy.ai/openapi/v2/rigging", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MESHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    input_task_id: "018a210d-8ba4-705c-b111-1f1776f7f578",
    height_meters: 1.8,
  }),
});
if (!response.ok) throw new Error(await response.text());
const task = await response.json();
console.log(task.id, task.status);
```

```python
import os
import requests

# Rig a character from a Meshy task, scaled to 1.8 m tall
response = requests.post(
    "https://api.meshy.ai/openapi/v2/rigging",
    headers={"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"},
    json={
        "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
        "height_meters": 1.8,
    },
)
response.raise_for_status()
task = response.json()
print(task["id"], task["status"])
```

**Response**

```json
{
  "id": "0199a8f6-3d27-7c2e-9b41-6e0c5d2f8a13",
  "type": "rig",
  "status": "PENDING",
  "progress": 0,
  "created_at": 1790640079880,
  "started_at": null,
  "finished_at": null,
  "expires_at": null,
  "preceding_tasks": 1,
  "consumed_credits": 5,
  "task_error": null,
  "input": {
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "height_meters": 1.8
  },
  "output": null
}
```

---

## 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_animations` has a walking and a running animation of the animal. If Meshy can't make one of them, its URLs are `null`, and the task still succeeds. `walking_armature_glb_url` and `running_armature_glb_url` are the rig's skeleton, with no animation.
* Sending `skeleton_template`, or `include_fingers` set to `true`, returns `400`.
* 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](/api/pricing).

To animate the rigged animal, apply library animations whose `rig_type` is `quadruped`, as `action_id` or `action_ids`. See [Animation](https://docs.meshy.ai/api/v2/animation.md#create-an-animation-task).

**cURL**

```bash
# 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"
  }'
```

```javascript
// Rig a four-legged animal
const response = await fetch("https://api.meshy.ai/openapi/v2/rigging", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MESHY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    input_task_id: "018a210d-8ba4-705c-b111-1f1776f7f578",
    animation_type: "quadruped",
  }),
});
if (!response.ok) throw new Error(await response.text());
const task = await response.json();
console.log(task.id, task.status);
```

```python
import os
import requests

# Rig a four-legged animal
response = requests.post(
    "https://api.meshy.ai/openapi/v2/rigging",
    headers={"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"},
    json={
        "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
        "animation_type": "quadruped",
    },
)
response.raise_for_status()
task = response.json()
print(task["id"], task["status"])
```

---

## Generate and rig a character

To rig a character you generate, create an [Image to 3D](https://docs.meshy.ai/api/v2/image-to-3d.md) 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: true` with `target_polycount: 30000` keeps the model well under 380,000 triangles.

Meshy charges for each task separately. See [Pricing](/api/pricing).

**cURL**

```bash
# 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
  }'
```

```javascript
const API = "https://api.meshy.ai/openapi/v2";
const headers = {
  Authorization: `Bearer ${process.env.MESHY_API_KEY}`,
  "Content-Type": "application/json",
};

async function create(path, body) {
  const response = await fetch(`${API}/${path}`, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
  });
  if (!response.ok) throw new Error(await response.text());
  return (await response.json()).id;
}

async function wait(id) {
  for (;;) {
    const response = await fetch(`${API}/tasks/${id}`, { headers });
    if (!response.ok) throw new Error(await response.text());
    const task = await response.json();
    if (task.status === "SUCCEEDED") return task;
    if (task.status === "FAILED" || task.status === "CANCELED") {
      throw new Error(JSON.stringify(task.task_error));
    }
    const seconds = Number(response.headers.get("Retry-After") ?? 5);
    await new Promise((resolve) => setTimeout(resolve, seconds * 1000));
  }
}

// 1. Generate a character in a T-pose, 2. rig it at 1.8 m tall
const character = await wait(await create("image-to-3d", {
  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,
}));
const rig = await wait(await create("rigging", {
  input_task_id: character.id,
  height_meters: 1.8,
}));

console.log(rig.id, rig.output.rigged_character_glb_url);
```

```python
import os
import time
import requests

API = "https://api.meshy.ai/openapi/v2"
HEADERS = {"Authorization": f"Bearer {os.environ['MESHY_API_KEY']}"}

def create(path, body):
    response = requests.post(f"{API}/{path}", headers=HEADERS, json=body)
    response.raise_for_status()
    return response.json()["id"]

def wait(task_id):
    while True:
        response = requests.get(f"{API}/tasks/{task_id}", headers=HEADERS)
        response.raise_for_status()
        task = response.json()
        if task["status"] == "SUCCEEDED":
            return task
        if task["status"] in ("FAILED", "CANCELED"):
            raise RuntimeError(task["task_error"])
        time.sleep(int(response.headers.get("Retry-After", 5)))

# 1. Generate a character in a T-pose, 2. rig it at 1.8 m tall
character = wait(create("image-to-3d", {
    "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,
}))
rig = wait(create("rigging", {"input_task_id": character["id"], "height_meters": 1.8}))

print(rig["id"], rig["output"]["rigged_character_glb_url"])
```

---

## Get the result
Read Rigging tasks the same way as every other v2 task, through the [Tasks](https://docs.meshy.ai/api/v2/tasks.md) routes. To list only Rigging tasks, filter by `type=rig`.

| To | Call |
| --- | --- |
| Get one task | [`GET /openapi/v2/tasks/{id}`](https://docs.meshy.ai/api/v2/tasks.md#get-a-task) |
| Wait for updates | [`GET /openapi/v2/tasks/{id}/stream`](https://docs.meshy.ai/api/v2/tasks.md#stream-a-task) or a [webhook](https://docs.meshy.ai/api/v2/webhooks.md) |
| List your tasks | [`GET /openapi/v2/tasks?type=rig`](https://docs.meshy.ai/api/v2/tasks.md#list-tasks) |
| Delete a task | [`DELETE /openapi/v2/tasks/{id}`](https://docs.meshy.ai/api/v2/tasks.md#delete-a-task) |

---

## Rigging output
When the task succeeds, `output` holds these fields. The rest of the [task object](https://docs.meshy.ai/api/v2/tasks.md#the-task-object) is the same for every task type. The URLs in `output` stop working at `expires_at`.

[Animation](https://docs.meshy.ai/api/v2/animation.md) uses the Rigging task's files, so create your Animation tasks before the Rigging task's `expires_at`. After that, Animation returns `404`.

  - `rigged_character_glb_url` · *string | null*

  Signed URL to the rigged character as a GLB file. `null` if the file wasn't produced.

  - `rigged_character_fbx_url` · *string | null*

  Signed URL to the rigged character as an FBX file. `null` if the file wasn't produced.

  - `basic_animations` · *object*

  Signed URLs to a walking and a running animation of the character, which Meshy makes for every rig. A URL is `null` if that file wasn't produced.
  * `walking_glb_url`: the walking animation with the character's mesh, as a GLB file
  * `walking_fbx_url`: the walking animation with the character's mesh, as an FBX file
  * `walking_armature_glb_url`: the walking animation with the skeleton only, as a GLB file
  * `running_glb_url`: the running animation with the character's mesh, as a GLB file
  * `running_fbx_url`: the running animation with the character's mesh, as an FBX file
  * `running_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`.

**Succeeded Rigging task**

```json
{
  "id": "0199a8f6-3d27-7c2e-9b41-6e0c5d2f8a13",
  "type": "rig",
  "status": "SUCCEEDED",
  "progress": 100,
  "created_at": 1790640079880,
  "started_at": 1790640079889,
  "finished_at": 1790640089520,
  "expires_at": 1790899289520,
  "preceding_tasks": 0,
  "consumed_credits": 5,
  "task_error": null,
  "input": {
    "input_task_id": "018a210d-8ba4-705c-b111-1f1776f7f578",
    "height_meters": 1.8
  },
  "output": {
    "rigged_character_glb_url": "https://assets.meshy.ai/***/output/Character_output.glb?Expires=***",
    "rigged_character_fbx_url": "https://assets.meshy.ai/***/output/Character_output.fbx?Expires=***",
    "basic_animations": {
      "walking_glb_url": "https://assets.meshy.ai/***/output/Animation_Walking_withSkin.glb?Expires=***",
      "walking_fbx_url": "https://assets.meshy.ai/***/output/Animation_Walking_withSkin.fbx?Expires=***",
      "walking_armature_glb_url": "https://assets.meshy.ai/***/output/Animation_Walking_withSkin_armature.glb?Expires=***",
      "running_glb_url": "https://assets.meshy.ai/***/output/Animation_Running_withSkin.glb?Expires=***",
      "running_fbx_url": "https://assets.meshy.ai/***/output/Animation_Running_withSkin.fbx?Expires=***",
      "running_armature_glb_url": "https://assets.meshy.ai/***/output/Animation_Running_withSkin_armature.glb?Expires=***"
    }
  }
}
```
