> ## Documentation Index
> Fetch the complete documentation index at: https://docs.viggle.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 3D characters

> Turn one image or a short description into a rigged 3D character, delivered as a .vsplat Gaussian splat for Unity and the web.

JST-2 turns a single image of a person or character into a rigged, animatable 3D character. You can also describe the character in text instead of sending an image. Use it when you need a playable or posable character in a game, a 3D viewer or an interactive web app, then drive it with [3D motion](https://docs.viggle.ai/v1/3d/motion.md).

You create the character with `POST /v1/characters` and `type=vsplat`, wait for it to be ready, then download it from the export endpoint.

> [!NOTE]
>
> **A `.vsplat` is not a mesh.** It is a Gaussian splat with per-splat bone weights and a rest skeleton. No GLB or FBX importer opens it. It renders through the Viggle Splat Engine: the Unity package `com.viggle.splat-engine` (see the [Unity quickstart](https://docs.viggle.ai/v1/3d/unity-quickstart.md)), or on the web `@viggle/splat-engine` (PlayCanvas) and `@viggle/splat-engine-three` (three.js) from npm. Motion is the part that comes as GLB or FBX.

## Parameters

Send `multipart/form-data` (a JSON body also works). The fields that matter for 3D:

| Parameter | Required | Default | Values |
| - | - | - | - |
| `image` or `image_url` | Yes, unless you send `enhance_prompt` alone | | Image file up to 20 MiB, or a public `http(s)` URL. JPEG, PNG, WebP, GIF, BMP, TIFF or HEIC |
| `type` | Yes for 3D | `render` | `vsplat` for the 3D character only. `all` also builds a 2D character for [Video Remix](https://docs.viggle.ai/v1/video/reusable-characters-and-motions.md) |
| `enhance` | No | `true` | Runs the higher-fidelity extraction pass. `false` is cheaper |
| `enhance_prompt` | No | | Up to 1000 characters describing appearance: who it is, clothing, colors, style. With an image it steers the result; alone it generates the character from text (`type=vsplat` only). Needs `enhance` on |
| `joint_set` | No | `body` | `body` (86 joints, no face rig) or `full` (441 joints, full facial rig). `expression` (119 joints) is also accepted, but the API exports no motion rig that matches it |
| `model_precision` | No | | Extraction precision in `(0, 1]` |
| `render_thumbnail` | No | `false` | Also renders a preview image, returned as `thumbnail_url` on export |
| `name` | No | | A label for your own use |

`joint_set` only changes which joints can move. A `body` character still has a detailed face; it just cannot animate it. Pick the motion rig to match: `full` pairs with `metahuman`, `body` with `metahuman_body` (see [Use it](#use-it-in-an-engine)). Every field is in the [API reference](https://docs.viggle.ai/v1/api-reference/characters/create-a-character.md).

## Price

Each extraction is a flat price. `enhance` replaces the base price rather than adding to it, and `joint_set`, `model_precision` and `render_thumbnail` don't change it.

| `type` | `enhance=true` (default) | `enhance=false` |
| - | - | - |
| `vsplat` | 30 credits (\$0.30) | 25 credits (\$0.25) |
| `all` (3D plus the 2D character) | 31 credits (\$0.31) | 26 credits (\$0.26) |

Ten characters at the defaults cost 300 credits (\$3.00). A failed extraction is refunded.

> [!WARNING]
>
> If your balance cannot cover the extraction, the request is still accepted with `status: "queued"`. The character then ends `failed` with `vsplat.error.code: "INSUFFICIENT_CREDITS"`. A `type=all` character reserves its 2D credit at submit, so it can also answer `402` straight away. Check `GET /v1/credits` before large batches.

## Create, wait and download

This script creates a character from an image, polls every 5 seconds, then saves the `.vsplat` file. Replace the sample URL with your own image.

```bash cURL theme={null}
#!/usr/bin/env bash
set -euo pipefail
API="https://apis.viggle.ai/v1"
AUTH="Authorization: Bearer $VIGGLE_API_KEY"

character_id=$(curl -sf -X POST "$API/characters" -H "$AUTH" \
  -F "image_url=https://assets.viggle.ai/pub/www/developers/threed-source-image-3f2f6787.webp" \
  -F "type=vsplat" | jq -r '.id')
echo "created $character_id"

while true; do
  character=$(curl -sf "$API/characters/$character_id" -H "$AUTH")
  case "$(echo "$character" | jq -r '.status')" in
    ready) break ;;
    failed) echo "failed: $(echo "$character" | jq -c '.vsplat.error')" >&2; exit 1 ;;
  esac
  sleep 5
done

url=$(curl -sf "$API/characters/$character_id/export?download_type=vsplat" -H "$AUTH" | jq -r '.vsplat_url')
curl -sf -o character.vsplat "$url"
echo "saved character.vsplat from $url"
```

```javascript Node.js theme={null}
import { writeFile } from "node:fs/promises";

const API = "https://apis.viggle.ai/v1";
const headers = { Authorization: `Bearer ${process.env.VIGGLE_API_KEY}` };

async function call(path, init = {}) {
  const res = await fetch(`${API}${path}`, { ...init, headers });
  const body = await res.json();
  if (!res.ok) throw new Error(`HTTP ${res.status}: ${JSON.stringify(body.error)}`);
  return body;
}

const form = new FormData();
form.append("image_url", "https://assets.viggle.ai/pub/www/developers/threed-source-image-3f2f6787.webp");
form.append("type", "vsplat");
let character = await call("/characters", { method: "POST", body: form });
console.log(`created ${character.id}`);

while (character.status !== "ready") {
  if (character.status === "failed") {
    throw new Error(`failed: ${JSON.stringify(character.vsplat?.error)}`);
  }
  await new Promise((r) => setTimeout(r, 5000));
  character = await call(`/characters/${character.id}`);
}

const exported = await call(`/characters/${character.id}/export?download_type=vsplat`);
const file = await fetch(exported.vsplat_url);
await writeFile("character.vsplat", Buffer.from(await file.arrayBuffer()));
console.log(`saved character.vsplat from ${exported.vsplat_url}`);
```

```python Python theme={null}
import os
import time
import requests

API = "https://apis.viggle.ai/v1"
headers = {"Authorization": f"Bearer {os.environ['VIGGLE_API_KEY']}"}

res = requests.post(
    f"{API}/characters",
    headers=headers,
    files={
        "image_url": (None, "https://assets.viggle.ai/pub/www/developers/threed-source-image-3f2f6787.webp"),
        "type": (None, "vsplat"),
    },
)
res.raise_for_status()
character = res.json()
print(f"created {character['id']}")

while character["status"] != "ready":
    if character["status"] == "failed":
        raise RuntimeError(f"failed: {(character.get('vsplat') or {}).get('error')}")
    time.sleep(5)
    res = requests.get(f"{API}/characters/{character['id']}", headers=headers)
    res.raise_for_status()
    character = res.json()

res = requests.get(
    f"{API}/characters/{character['id']}/export",
    params={"download_type": "vsplat"},
    headers=headers,
)
res.raise_for_status()
url = res.json()["vsplat_url"]
with open("character.vsplat", "wb") as f:
    f.write(requests.get(url).content)
print(f"saved character.vsplat from {url}")
```

To build the character from text alone, drop the image and send `type=vsplat` with `enhance_prompt`, for example `a knight in blue armor, full body`. Pose, camera and background are fixed by the service, so describe appearance only.

## Get the result

The create call answers with a character ID and `status: "queued"`. Poll `GET /v1/characters/{character_id}` until `status` is `ready` or `failed`. When it fails, the reason is in `vsplat.error`, not in the top-level `error`.

Once ready, `GET /v1/characters/{character_id}/export?download_type=vsplat` returns the file link:

```json theme={null}
{
  "id": "char_extract_9c2e4a7f1b3d5e60",
  "status": "ready",
  "download_type": "vsplat",
  "vsplat_url": "https://.../character.vsplat?X-Goog-Signature=...",
  "thumbnail_url": null,
  "created_at": "2026-11-20T09:15:22Z",
  "updated_at": "2026-11-20T09:16:40Z",
  "error": null
}
```

* `vsplat_url` is filled only when you pass `download_type=vsplat`. It lasts one hour, and every export call signs a fresh one, so request it when you need it rather than storing it.
* The export is part of the character and stays available until you delete the character with `DELETE /v1/characters/{character_id}` (`204`, empty body). Exports are free.
* A `type=vsplat` character, and the export of any character, is visible only to the API key that created it; other keys get `404 CHARACTER_NOT_FOUND`. Export what you need before you rotate that key. A `type=vsplat` character does not appear in `GET /v1/characters`; keep its ID.

## Use it in an engine

Load the `.vsplat` into the Splat Engine and play GLB or FBX clips from [3D motion](https://docs.viggle.ai/v1/3d/motion.md) on it. For a Viggle character, use the MetaHuman rigs: `metahuman_url` (441 joints) for a `full` character, `metahuman_body_url` (86 joints) for the default `body` character. No exported rig matches an `expression` character, so use `body` or `full`. The `mixamo_url` rig is for retargeting onto other meshes.

On the web, the PlayCanvas package loads a character and a clip in a few lines:

```bash theme={null}
npm install @viggle/splat-engine playcanvas@2.23.3
```

```javascript theme={null}
import { Scene, Character, Animation } from "@viggle/splat-engine";

const scene = await Scene.create(canvas, { fov: 45 });
scene.start();
const character = await Character.load(scene, "/assets/character.vsplat");
await Animation.loadGlb(scene, "/assets/idle.glb", "idle");
character.playAnimation("idle", { loop: true });
```

## Next steps

> [card] [3D motion](https://docs.viggle.ai/v1/3d/motion.md)
>
> Motion from video or text, as GLB or FBX.

> [card] [Unity quickstart](https://docs.viggle.ai/v1/3d/unity-quickstart.md)
>
> Render and animate the character in Unity.

> [card] [API reference](https://docs.viggle.ai/v1/api-reference/characters/export-a-3d-character.md)
>
> Every field of create and export.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.