afk.ai Auto-Rig
v1.3.6Auto-rig 3D models (GLB, glTF, FBX) with skeleton, skin weights and 170+ animations via afk.ai.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
rig_model
Auto-rig a 3D model file (.glb, .gltf with everything embedded, or .fbx; up to 200 MB) and write the rigged .glb with its animations. Takes about a minute. Returns where the file was written.
| Parameter | Type | Description |
|---|---|---|
path * | string | the model file (absolute, or relative to the server's working directory) |
animations | all (default), none (just the rig), or animation names from list_body_types | |
facing | which way the model faces, in degrees about its up axis; auto works it out | |
keep_arms_out | boolean | humans: keep the arms out of the body in every animation, on this computer after the download, as afk.ai/rig does (seconds to a minute) |
output | string | where to write the rigged .glb (default: <model>.rigged.glb next to it) |
type | string | what the model is: human for anything on two legs, fox for dogs/cats/wolves, horse for hoofed animals, and so on |
image_to_character
Make a rigged, animated 3D character from a picture (.png, .jpg or .webp of one character, whole; up to 20 MB): a 3D model made from the picture, rigged with every animation for its body type, written as a .glb. Takes about 2 to 3 minutes (up to 5 when the GPU is starting) and costs $0.25 of API credits, refunded if it fails. Returns where the file was written, what was charged and the credits left.
| Parameter | Type | Description |
|---|---|---|
path * | string | the picture (absolute, or relative to the server's working directory) |
animations | all (default), none (just the rig), or animation names from list_body_types | |
keep_arms_out | boolean | humans: keep the arms out of the body in every animation, on this computer after the download, as afk.ai/rig does (seconds to a minute) |
output | string | where to write the rigged .glb (default: <picture>.rigged.glb next to it) |
type | string | what the character is: human for anything on two legs, fox for dogs/cats/wolves, horse for hoofed animals, and so on |
get_account
How many rigs the account can make (rigs_left: its free rigs this month, then its Lifetime API credit this month with afk.ai Lifetime, then its API credits), and its credit balance for characters.
list_body_types
The body types a model can be rigged as, and (with type) that type's animations.
| Parameter | Type | Description |
|---|---|---|
type | string |
rig_status
A rig's status by id (rig_model waits for its rig, so this is for rigs started elsewhere).
| Parameter | Type | Description |
|---|---|---|
id * | string |
inspect_rig
Measure a rigged .glb: its bones (names, parents, positions), meshes, height, the animations with problems, worst first, each with the moment it's worst at to render (ground: % of height its lowest point goes below the rest floor or stays above it, and which bone; stretching: % of skin torn at worst; humans: frames with a forearm or hand through the body, and the deepest) and the animation controls adjust_animation takes. Flying, swimming and other animations that leave the floor on purpose are marked in_the_air and not judged against it. Runs on this computer, free: about a second, a few for…
| Parameter | Type | Description |
|---|---|---|
file * | string | a rigged .glb (absolute, or relative to the server's working directory): one rig_model wrote, or any model on afk.ai's skeletons |
animations | array | only these animations, each listed whether it has a problem or not |
limit | integer | at most this many animations with problems, worst first (default 40; the rest are named) |
type | string | the body type, when it can't be told from the file (afk.ai's files say) |
render_rig
Draw a rigged .glb as an image to look at: at rest, or posed at a moment of one of its animations, with its skeleton over it (blue: its left, red: its right, orange: the middle) and rulers in model units. Pinkish-red skin is the inside of the mesh showing (a tear, or a part pushed through another). Also returns every joint drawn in the image with its pixel position and, posed, how far its lowest point is from the rest floor (lowest_point_vs_floor, % of height). Runs on this computer, free.
| Parameter | Type | Description |
|---|---|---|
file * | string | a rigged .glb (absolute, or relative to the server's working directory): one rig_model wrote, or any model on afk.ai's skeletons |
animation | string | pose it in this animation (inspect_rig lists them); default: at rest |
focus | zoom on a joint (name) or a point [x, y, z] | |
joints | joints to draw (default main: no fingers or tips) | |
radius | number | the zoomed area's radius in model units (default 15% of the height) |
save_to | string | also write the PNG here |
size | integer | pixels per view (default 640) |
time | number | seconds into the animation (default: its middle; inspect_rig gives each problem's worst moment) |
type | string | the body type, when it can't be told from the file (afk.ai's files say) |
views | array | default front and left (front looks from +Z, so the model's left is on the image's right) |
weights | boolean | string | true: color the skin by the bone each part follows; a bone name: how much each part follows that bone (blue none, red all) |
xray | boolean | the mesh see-through, to see joints inside it |
adjust_animation
Change animations of a rigged .glb as afk.ai/rig's Adjust > Animation does, and write a new .glb: turn parts of the body (controls such as armsUp, posture, headUp in degrees), change how it moves (speed, motion, bounce, sway, lag, lookAhead, width, lift, part:arms...), move a hand, foot or the body (positions, the limb reaching for it), and for humans keep the arms out of the body. inspect_rig lists the controls this body type has, with their ranges. Reports each changed animation's ground [before, after] (and arms-through-body frames with keep_arms_out). Runs on this computer, free.
| Parameter | Type | Description |
|---|---|---|
file * | string | a rigged .glb (absolute, or relative to the server's working directory): one rig_model wrote, or any model on afk.ai's skeletons |
animations | the animations to change: all (default) or names | |
controls | object | control id -> value, e.g. {"armsUp": 15, "speed": 1.2}. Turns are degrees; movement multiplies (1 leaves it) except lag (seconds), lookAhead (0-1) and width (model units) |
keep_arms_out | number | humans: turn the arms, spine and neck as little as possible so arms and hands stay out of the body (1: all of the correction) |
output | string | where to write the result (default: the next free <model>-v2.glb, -v3... beside it; never the input) |
positions | object | hand_l, foot_r... or body: moved by an offset, the limb bending to reach it (feet stay planted) |
ranges | object | only part of each animation for a control or position id (seconds), eased in and out |
type | string | the body type, when it can't be told from the file (afk.ai's files say) |
fix_stretching
Find where the skin of a rigged .glb stretches or tears across its animations and heal it (afk.ai/rig's Fix stretching), writing a new .glb. Reports torn skin [before, after] overall and per animation. Runs on this computer, free.
| Parameter | Type | Description |
|---|---|---|
file * | string | a rigged .glb (absolute, or relative to the server's working directory): one rig_model wrote, or any model on afk.ai's skeletons |
animations | the animations to check and heal across (default all) | |
output | string | where to write the result (default: the next free <model>-v2.glb, -v3... beside it; never the input) |
type | string | the body type, when it can't be told from the file (afk.ai's files say) |
fix_spot
Fix the skin weights of one spot of a rigged .glb (afk.ai/rig's Fix a spot) and write a new .glb. Pick the spot with where (every given condition must hold), then: follow (it moves with the wrong part: give it to bone), smooth (pinched, jagged or creased: strength light, medium or strong) or redo (it tears or sticks to another part: its weights worked out again from the nearest bones). Reports the bones the spot follows [before, after]. Runs on this computer, free.
| Parameter | Type | Description |
|---|---|---|
file * | string | a rigged .glb (absolute, or relative to the server's working directory): one rig_model wrote, or any model on afk.ai's skeletons |
fix * | string | |
where * | the spot: near a joint, moving with bones, a mesh, a piece, a box or a sphere (all given must hold) | |
bone | string | follow: the bone the spot should move with |
output | string | where to write the result (default: the next free <model>-v2.glb, -v3... beside it; never the input) |
strength | string | smooth: how far (default medium) |
type | string | the body type, when it can't be told from the file (afk.ai's files say) |