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

# Talking avatar

> Turn a portrait into a talking video that speaks your script or an audio file, up to 20 seconds. Costs 10 credits.

Animates a portrait so it speaks. Send either a `transcript` (read in `voice_id`) or an `audio_url`; either way the speech can be up to 20 seconds. Costs 10 credits.

`voice_id` takes a MiniMax preset, an Eleven v3 voice or one of your cloned voices; see [List voices you can use](https://tryunsora.com/docs/api-reference/voice-clones/list.md). Poll [Poll video status](https://tryunsora.com/docs/api-reference/video/poll-status.md) with `generation.id`.

```bash theme={null}
curl -X POST "https://mvp.tryunsora.com/api/v1/avatar-generations/create" \
  -H "Authorization: Bearer uns_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://cdn.example.com/portrait.jpg",
    "transcript": "Hi, I'm Maya. Here are three tips for better morning routines.",
    "voice_id": "Calm_Woman",
    "emotion": "happy",
    "resolution": "720p"
  }'
```


## OpenAPI

````yaml POST /avatar-generations/create
openapi: 3.1.0
info:
  title: Unsora API
  version: 1.4.0
  description: >-
    Public API for Unsora integrations. Authenticate with an Unsora API key
    (`uns_…`, created under Developers → API keys in the app) as a Bearer token
    in the Authorization header. Limit: 60 requests per minute per key; over it,
    429 with code RATE_LIMIT_EXCEEDED.
servers:
  - url: https://mvp.tryunsora.com/api/v1
    description: Production
  - url: /api/v1
    description: This server
security: []
tags:
  - name: User
  - name: Models
    description: >-
      Every video, image and motion-control model, with each model's inputs
      taken from the provider's own request schema and prices quoted live. One
      generate endpoint covers all of them.
  - name: Video
  - name: Image
  - name: Influencer
  - name: Thumbnail
  - name: Clipping
  - name: Music
  - name: Voiceover
  - name: Upscaler
  - name: Subtitle removal
  - name: Motion control
  - name: Avatar
  - name: Movie materials
  - name: Voice clones
  - name: Voice changer
  - name: Uploads
  - name: Scheduler
paths:
  /avatar-generations/create:
    post:
      tags:
        - Avatar
      summary: Make a talking avatar video
      description: >-
        Animates a portrait so it speaks a script (read in `voice_id`) or an
        audio file. Speech can be up to 20 seconds. Costs 10 credits. Poll GET
        /video/status/{id} with `generation.id`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                image_url:
                  type: string
                  format: uri
                  description: Portrait image. Send this or `image_asset_id`.
                image_asset_id:
                  type: string
                  description: >-
                    An IMAGE asset of yours (e.g. from POST /uploads) instead of
                    `image_url`.
                transcript:
                  type: string
                  maxLength: 2000
                  description: >-
                    What the avatar says, read in `voice_id`. Send this or
                    `audio_url`; it must fit in 20 seconds of speech.
                audio_url:
                  type: string
                  format: uri
                  description: >-
                    Speech audio (MP3, WAV or M4A) up to 20 seconds, instead of
                    `transcript`.
                voice_id:
                  type: string
                  default: Friendly_Person
                  description: >-
                    Voice for `transcript`: a MiniMax preset, an Eleven v3
                    voice, or one of your cloned voices (see GET /voice-clones).
                emotion:
                  type: string
                  enum:
                    - happy
                    - sad
                    - angry
                    - fearful
                    - disgusted
                    - surprised
                    - neutral
                  default: neutral
                prompt:
                  type: string
                  description: Optional direction for the performance.
                resolution:
                  type: string
                  enum:
                    - 480p
                    - 720p
                  default: 720p
                model:
                  type: string
                  enum:
                    - skyreels-v3
                  default: skyreels-v3
      responses:
        '200':
          description: Job queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerationCreateResponse'
        '400':
          description: >-
            Missing portrait, missing both transcript and audio, speech longer
            than 20 seconds, or an invalid voice, emotion, resolution or model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Avatar generation (or the chosen voice's provider) is not configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    GenerationCreateResponse:
      type: object
      properties:
        success:
          type: boolean
        generation:
          type: object
          properties:
            id:
              type: string
            status:
              type: string
              example: QUEUED
          required:
            - id
            - status
        creditsDeducted:
          type: integer
        creditsRemaining:
          type: integer
      required:
        - success
        - generation
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Unsora API key (`uns_…`). A Clerk session token also works.

````

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