---
title: "Create a new avatar from the SPA wizard."
method: POST
path: "/api/v1/avatars"
tags: ["Avatars"]
---

# Create a new avatar from the SPA wizard.

`POST /api/v1/avatars`

## Request

- Base URL: `https://api.avatarfactory.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.avatarfactory.io/api/v1/avatars`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

<br/>Mirrors the legacy form-based `/avatars/new` POST handler at the<br/>JSON layer so the React wizard can submit a single payload at the<br/>end of the 4-step flow. Returns the new avatar id + identity<br/>fields so the SPA can route to `/avatars/{id}` and pre-fill<br/>the detail screen without an extra GET round trip.

## Request body

- CreateAvatarRequest
  - `description` string
  - `draft_id` integer, nullable
  - `face_image_url` string, nullable
  - `name` string
  - `story` string
  - `voice_id` string, nullable

## Response `201`

Created

- CreateAvatarResponse
  - `avatar_id` integer, nullable
  - `ok` boolean

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/avatarfactory/apis/avatarfactory-api.md) · [All operations](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/revisions/66fc7aa3f296?raw)
