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

# Start an interactive avatar session

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

Start an interactive avatar session.

- Each running session counts toward your plan's concurrent-session limit until it ends.
- Only sessions started through this API count toward the limit.
- Over the limit, the request fails with `429` and code `concurrency_limit`; its `detail`
  states your plan's limit and how many sessions are running.

| Plan | Concurrent sessions |
| --- | --- |
| Freemium | 1 |
| All paid plans | 100 |

**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-session

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

- `avatarIds` (list of string, required) — The interactive avatars to join the session — e.g. the id returned by POST /api/interactive-avatars/avatars once its status is completed.
- `livekitUrl` (string, required) — The WebSocket URL (wss://…) of your LiveKit room the avatar joins.
- `livekitToken` (string, required) — A LiveKit access token you mint for the avatar's participant in that room. If you retry a failed request, reuse the same livekitUrl and livekitToken.

## Response

### 201

Successful Response

- `id` (string, required) — The session id, prefixed `ses_…`.
- `status` (string, required) — Always "active": the session is live when this response returns.
- `createdAt` (datetime, required) — When the session became live.

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

Your plan does not include interactive avatars (feature_not_in_plan), or the session quota is exhausted (quota_exceeded).

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

### 409 Conflict Error

The LiveKit room was closed, or the avatar's participant was removed from it, while the session was starting (conflict).

- `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, or the concurrent session limit is reached. When known, the concurrency detail includes your plan's numbers: "Your plan allows 1 concurrent session and 1 is already running. End an active session or wait for one to end." Both 429 kinds carry a Retry-After header when a wait interval is known.

- `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
{
  "avatarIds": [
    "av_6c9edb85a2f947e5"
  ],
  "livekitUrl": "wss://your-app.livekit.cloud",
  "livekitToken": "<your-livekit-token>"
}
```

**Response**

```json
{
  "id": "ses_6f2a91c04b8d4e37",
  "status": "string",
  "createdAt": "2026-09-10T09:30:00Z"
}
```

**SDK Code**

```python Start an interactive avatar session
import requests

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

payload = {
    "avatarIds": ["av_6c9edb85a2f947e5"],
    "livekitUrl": "wss://your-app.livekit.cloud",
    "livekitToken": "<your-livekit-token>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Start an interactive avatar session
const url = 'https://developers.synthesia.io/api/interactive-avatars/sessions';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"avatarIds":["av_6c9edb85a2f947e5"],"livekitUrl":"wss://your-app.livekit.cloud","livekitToken":"<your-livekit-token>"}'
};

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

```go Start an interactive avatar session
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"avatarIds\": [\n    \"av_6c9edb85a2f947e5\"\n  ],\n  \"livekitUrl\": \"wss://your-app.livekit.cloud\",\n  \"livekitToken\": \"<your-livekit-token>\"\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 Start an interactive avatar session
require 'uri'
require 'net/http'

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

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  \"avatarIds\": [\n    \"av_6c9edb85a2f947e5\"\n  ],\n  \"livekitUrl\": \"wss://your-app.livekit.cloud\",\n  \"livekitToken\": \"<your-livekit-token>\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://developers.synthesia.io/api/interactive-avatars/sessions")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"avatarIds\": [\n    \"av_6c9edb85a2f947e5\"\n  ],\n  \"livekitUrl\": \"wss://your-app.livekit.cloud\",\n  \"livekitToken\": \"<your-livekit-token>\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://developers.synthesia.io/api/interactive-avatars/sessions', [
  'body' => '{
  "avatarIds": [
    "av_6c9edb85a2f947e5"
  ],
  "livekitUrl": "wss://your-app.livekit.cloud",
  "livekitToken": "<your-livekit-token>"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Start an interactive avatar session
using RestSharp;

var client = new RestClient("https://developers.synthesia.io/api/interactive-avatars/sessions");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"avatarIds\": [\n    \"av_6c9edb85a2f947e5\"\n  ],\n  \"livekitUrl\": \"wss://your-app.livekit.cloud\",\n  \"livekitToken\": \"<your-livekit-token>\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Start an interactive avatar session
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "avatarIds": ["av_6c9edb85a2f947e5"],
  "livekitUrl": "wss://your-app.livekit.cloud",
  "livekitToken": "<your-livekit-token>"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://developers.synthesia.io/api/interactive-avatars/sessions")! 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()
```