> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.synthesia.io/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.synthesia.io/docs/_mcp/server.

# Create an interactive avatar

POST https://developers.synthesia.io/api/interactive-avatars/avatars
Content-Type: application/json

Create an interactive avatar from an existing Studio avatar.

- Generation is asynchronous: the request answers `202` with the avatar's current status.
- Poll by repeating the same request (with `regenerate` omitted) until `done` is true — a
  repeat never starts a second generation.
- Each poll re-runs the credit check, so a drained balance answers `402` even while an
  already-dispatched generation continues.
- Once `status` is `completed`, include the returned `id` in the `avatarIds` list of
  `POST /api/interactive-avatars/sessions`.

**Required scope:** [`interactive_avatars:write`](https://developers.synthesia.io/docs/scopes) (in Studio: Interactive Avatars (write))

Reference: https://developers.synthesia.io/docs/api-reference/interactive-avatars/create-interactive-avatar

## Authentication

- `Authorization` header (bearer token, required) — Your Synthesia API key. * Send it as `Authorization: Bearer <key>`; a bare key also works. * An endpoint that needs a scope names it in its description; [Scopes](https://developers.synthesia.io/docs/scopes) lists them all. * A `:write` scope also satisfies the same resource's `:read`. * Without the scope, the request fails with a 403 `insufficient_scope`.

## Request

### Body (application/json)

This endpoint expects a NewInteractiveAvatar.

- `sourceId` (string, required) — The avatar id shown in Studio, with the av_ prefix.
- `regenerate` (boolean, optional, default: false) — Force a fresh interactive avatar generation instead of returning the existing avatar.

## Response

### 202

Successful Response

- `id` (string, required) — The interactive avatar. Include it in the avatarIds list of POST /api/interactive-avatars/sessions.
- `status` (enum, required) — Poll by repeating the same request with `regenerate` omitted until `done` is true, then read this field: `failed` means the source cannot become an interactive avatar.
  - Allowed values: `queued`, `processing`, `completed`, `failed`, `canceled`
- `done` (boolean, required) — True once generation has finished, whatever the outcome.

## Errors

### 400 Bad Request Error

Malformed or invalid request

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 401 Unauthorized Error

Unauthenticated

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 402 Payment Required Error

The workspace has no interactive avatar credits (no_credit). Top up or upgrade to create interactive avatars. Or you have run out of your monthly credit limit (user_credit_limit_reached): ask a workspace admin to raise it, or wait for it to reset.

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 403 Forbidden Error

Insufficiently scoped or forbidden

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 404 Not Found Error

Not Found

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 413 Content Too Large Error

Payload too large

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 415 Unsupported Media Type Error

Unsupported media type

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 429 Too Many Requests Error

Rate limited

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 500 Internal Server Error

Internal error

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 503 Service Unavailable Error

Service unavailable

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

### 504 Gateway Timeout Error

Upstream timeout

- `type` (string, required) — A URL identifying the error class — documentation, not a contract: branch on `code`, never parse `type`.
- `title` (string, required) — A human-readable summary of the error class.
- `status` (integer, required) — The HTTP status code, repeated from the response.
- `code` (string, required) — The stable, machine-readable error code to branch on. New codes may appear; treat an unknown one by its `status`.
- `detail` (string, optional, nullable) — Human-readable specifics; the wording may change without notice.
- `features` (list of string, optional, nullable) — On `feature_not_in_plan` only: the plan features this request needs.
- `instance` (string, optional, nullable) — The request path that produced the error.
- `requestId` (string, optional, nullable) — Identifies the request in Synthesia's logs (also the `Request-Id` header); quote it when contacting support.

## Examples

**Request**

```json
{
  "sourceId": "av_6c9edb85a2f947e5",
  "regenerate": false
}
```

**Response**

```json
{
  "id": "av_6c9edb85a2f947e5",
  "status": "queued",
  "done": true
}
```

**SDK Code**

```python Create an interactive avatar
import requests

url = "https://developers.synthesia.io/api/interactive-avatars/avatars"

payload = {
    "sourceId": "av_6c9edb85a2f947e5",
    "regenerate": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create an interactive avatar
const url = 'https://developers.synthesia.io/api/interactive-avatars/avatars';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"sourceId":"av_6c9edb85a2f947e5","regenerate":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create an interactive avatar
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://developers.synthesia.io/api/interactive-avatars/avatars"

	payload := strings.NewReader("{\n  \"sourceId\": \"av_6c9edb85a2f947e5\",\n  \"regenerate\": false\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create an interactive avatar
require 'uri'
require 'net/http'

url = URI("https://developers.synthesia.io/api/interactive-avatars/avatars")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"sourceId\": \"av_6c9edb85a2f947e5\",\n  \"regenerate\": false\n}"

response = http.request(request)
puts response.read_body
```

```java Create an interactive avatar
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://developers.synthesia.io/api/interactive-avatars/avatars")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"sourceId\": \"av_6c9edb85a2f947e5\",\n  \"regenerate\": false\n}")
  .asString();
```

```php Create an interactive avatar
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://developers.synthesia.io/api/interactive-avatars/avatars', [
  'body' => '{
  "sourceId": "av_6c9edb85a2f947e5",
  "regenerate": false
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Create an interactive avatar
using RestSharp;

var client = new RestClient("https://developers.synthesia.io/api/interactive-avatars/avatars");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"sourceId\": \"av_6c9edb85a2f947e5\",\n  \"regenerate\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create an interactive avatar
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "sourceId": "av_6c9edb85a2f947e5",
  "regenerate": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://developers.synthesia.io/api/interactive-avatars/avatars")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```