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

# Create Animation

> Create an asynchronous video-to-3D animation conversion.

`POST /v1/animations` starts a 3D Animation conversion. This is a conversion operation, not a reusable Motion asset.

## Request parameters

Send `multipart/form-data`.

| Parameter | Type | Required | Default | Description                                            |
| --------- | ---- | :------: | ------- | ------------------------------------------------------ |
| `video`   | file |    Yes   | —       | Motion-source video used to generate the 3D animation. |

## Response parameters

Returns `200 OK` with a conversion object.

| Field        | Type           | Always present | Description                                           |
| ------------ | -------------- | :------------: | ----------------------------------------------------- |
| `id`         | string         |       Yes      | Public Animation ID beginning with `anim_`.           |
| `status`     | string         |       Yes      | `queued`, `processing`, `ready`, or `failed`.         |
| `model_url`  | string or null |       Yes      | Downloadable 3D result when ready.                    |
| `created_at` | string or null |       Yes      | ISO 8601 creation timestamp when available.           |
| `updated_at` | string or null |       Yes      | ISO 8601 most-recent update timestamp when available. |
| `error`      | object or null |       Yes      | Structured failure details when status is `failed`.   |

```json theme={null}
{"id":"anim_456def","status":"queued","model_url":null,"created_at":null,"updated_at":null,"error":null}
```

## Examples

<CodeGroup>
  ```go Go theme={null}
  file, err := os.Open("dance.mp4")
  if err != nil { panic(err) }
  defer file.Close()

  body := &bytes.Buffer{}
  writer := multipart.NewWriter(body)
  part, _ := writer.CreateFormFile("video", "dance.mp4")
  io.Copy(part, file)
  writer.Close()

  req, _ := http.NewRequest("POST", "https://apis.viggle.ai/v1/animations", body)
  req.Header.Set("Authorization", "Bearer "+os.Getenv("VIGGLE_API_KEY"))
  req.Header.Set("Content-Type", writer.FormDataContentType())
  resp, err := http.DefaultClient.Do(req)
  if err != nil { panic(err) }
  defer resp.Body.Close()
  ```

  ```javascript JavaScript theme={null}
  const form=new FormData(); form.append("video",videoFile); const response=await fetch("https://apis.viggle.ai/v1/animations",{method:"POST",headers:{Authorization:`Bearer ${process.env.VIGGLE_API_KEY}`},body:form}); const animation=await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  with open("dance.mp4","rb") as video: response=requests.post("https://apis.viggle.ai/v1/animations",headers={"Authorization":f"Bearer {os.environ['VIGGLE_API_KEY']}"},files={"video":video})
  response.raise_for_status(); animation=response.json()
  ```

  ```bash cURL theme={null}
  curl -X POST "https://apis.viggle.ai/v1/animations" -H "Authorization: Bearer $VIGGLE_API_KEY" -F "video=@dance.mp4"
  ```
</CodeGroup>


## OpenAPI

````yaml POST /v1/animations
openapi: 3.0.3
info:
  title: Viggle API
  description: Generate AI-powered character animation videos
  version: 2.0.0
  contact:
    name: Viggle Support
    url: https://viggle.ai
servers:
  - url: https://apis.viggle.ai
    description: Production server
security: []
paths:
  /v1/animations:
    post:
      summary: Create Animation
      operationId: v1CreateAnimation
      responses:
        '200':
          description: Animation

````