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

# Quick Start: Character

> Create a reusable Character from an image.

Create a reusable **Character** from an image once, then reference its ID from any number of [Video Remix](/v1/guides/quickstart-mix) renders without re-uploading the image. This is the `type=render` path of `POST /v1/characters` — see the [Character 3D Quickstart](/v1/guides/quickstart-character-3d) for the `vsplat` extraction instead.

Set `VIGGLE_API_KEY` and run the example below as-is — it uses a Viggle-hosted sample image, so you don't need to prepare your own character image first.

## What you need

* An API key from the [Viggle Dashboard](https://portal.viggle.ai/keys), exported as `VIGGLE_API_KEY`

<Note>
  The examples below reference a placeholder sample asset URL (`https://assets.viggle.ai/samples/character.png`). Swap in your own `image`/`image_url`, or Viggle's published sample asset once available.
</Note>

## Complete example

<CodeGroup>
  ```bash cURL theme={null}
  #!/usr/bin/env bash
  set -euo pipefail

  response=$(curl -s -X POST "https://apis.viggle.ai/v1/characters" \
    -H "Authorization: Bearer $VIGGLE_API_KEY" \
    -F "image_url=https://assets.viggle.ai/samples/character.png" \
    -F "name=Quickstart character")
  character_id=$(echo "$response" | jq -r '.id')

  for _ in $(seq 1 60); do
    character=$(curl -s "https://apis.viggle.ai/v1/characters/$character_id" \
      -H "Authorization: Bearer $VIGGLE_API_KEY")
    status=$(echo "$character" | jq -r '.status')

    case "$status" in
      ready)
        echo "$character_id"
        exit 0
        ;;
      failed)
        echo "Character failed: $(echo "$character" | jq -c '.error')" >&2
        exit 1
        ;;
    esac
    sleep 3
  done

  echo "Timed out waiting for character $character_id" >&2
  exit 1
  ```

  ```javascript Node theme={null}
  const baseUrl = "https://apis.viggle.ai/v1";
  const headers = { Authorization: `Bearer ${process.env.VIGGLE_API_KEY}` };

  async function createCharacter() {
    const form = new FormData();
    form.append("image_url", "https://assets.viggle.ai/samples/character.png");
    form.append("name", "Quickstart character");

    const response = await fetch(`${baseUrl}/characters`, {
      method: "POST",
      headers,
      body: form,
    });
    if (!response.ok) {
      const body = await response.json().catch(() => ({}));
      throw new Error(`HTTP ${response.status}: ${JSON.stringify(body.error ?? body)}`);
    }
    return response.json();
  }

  async function waitForCharacter(id) {
    for (let attempt = 0; attempt < 60; attempt++) {
      const response = await fetch(`${baseUrl}/characters/${id}`, { headers });
      if (!response.ok) {
        const body = await response.json().catch(() => ({}));
        throw new Error(`HTTP ${response.status}: ${JSON.stringify(body.error ?? body)}`);
      }
      const character = await response.json();
      if (["ready", "failed"].includes(character.status)) return character;
      await new Promise((resolve) => setTimeout(resolve, 3000));
    }
    throw new Error(`Timed out waiting for character ${id}`);
  }

  const created = await createCharacter();
  const character = await waitForCharacter(created.id);

  if (character.status !== "ready") {
    throw new Error(`Character failed: ${JSON.stringify(character.error)}`);
  }
  console.log(character.id);
  ```

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

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

  response = requests.post(
      f"{base_url}/characters",
      headers=headers,
      files={"image_url": (None, "https://assets.viggle.ai/samples/character.png")},
      data={"name": "Quickstart character"},
  )
  response.raise_for_status()
  character = response.json()

  for _ in range(60):
      if character["status"] in {"ready", "failed"}:
          break
      time.sleep(3)
      response = requests.get(f"{base_url}/characters/{character['id']}", headers=headers)
      response.raise_for_status()
      character = response.json()
  else:
      raise TimeoutError(f"Timed out waiting for character {character['id']}")

  if character["status"] != "ready":
      error = character.get("error") or {}
      raise RuntimeError(f"failed: {error.get('code')} {error.get('message')}")

  print(character["id"])
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "id": "char_550e8400-e29b-41d4-a716-446655440000",
  "status": "queued",
  "name": "Quickstart character",
  "progress": 0,
  "capabilities": [],
  "created_at": "2026-07-31T09:15:22+00:00",
  "completed_at": null,
  "error": null,
  "type": "render",
  "vsplat": null,
  "glb": null
}
```

Poll `GET /v1/characters/{character_id}` every 3 seconds until `status` is `ready` or `failed`. Once ready, `id` is a **reusable Character ID** — pass it as `character_id` to [Render Video](/v1/api-reference/renders/create) (or the [Video Remix Quickstart](/v1/guides/quickstart-mix)) any number of times, without re-uploading the source image.

See [Pricing and retention](/v1/pricing#character) for how Character creation is billed.

<Card title="Create Character (from Image)" icon="user" href="/v1/api-reference/characters/create">
  See every request and response field, including the `vsplat`/`all` extraction options.
</Card>
