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

# Start an assistant chat

POST https://api.videogen.io/v1/assistants
Content-Type: application/json

Creates a new project and sends the first message to the VideoGen AI assistant, exactly like typing into the assistant on a new project in the app. Asynchronous: the response contains the `messageId` of the assistant's pending reply (e.g. `vg_mesg_...`). Poll `GET /v1/assistant-messages/{messageId}` until `status` is `succeeded`, `failed`, or `cancelled`, or subscribe to `assistant_message.*` webhooks. Fetch the parent assistant with `GET /v1/assistants/{assistantId}` to list all messages in the chat.

Reference: https://docs.videogen.io/rest-api-reference/assistant/start-assistant-chat

## Authentication

- `Authorization` header (bearer token, required) — API key from [app.videogen.io/api](https://app.videogen.io/api). The full key is only shown once when you create it.

## Request

### Body (application/json)

This endpoint expects a StartAssistantChatRequest.

- `message` (string, required) — The first message to send to the assistant, exactly as a person would type it into the assistant on a new project.
- `autoGenerate` (boolean, optional, default: false) — When true, the assistant picks the best workflow for the message and immediately starts generating, skipping the suggestion step. When the assistant message reaches `succeeded`, its `generation` carries the workflow run to poll.

## Response

### 202

Assistant message accepted.

- `messageId` (string, required) — Opaque assistant message id for the pending assistant reply (e.g. `vg_mesg_...`). Poll `GET /v1/assistant-messages/{messageId}`.
- `assistantId` (string, required) — Opaque assistant chat id (e.g. `vg_asst_...`). Pass to `GET /v1/assistants/{assistantId}` and follow-up message/action calls.
- `projectId` (string, required) — Opaque project id for the new chat (e.g. `vg_proj_...`).
- `projectUrl` (string, required) — Deep link to open this project in the VideoGen web app.

## Examples

**Request**

```json
{
  "message": "A 30-second explainer about our new pricing tiers"
}
```

**Response**

```json
{
  "messageId": "string",
  "assistantId": "string",
  "projectId": "string",
  "projectUrl": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.videogen.io/v1/assistants"

payload = { "message": "A 30-second explainer about our new pricing tiers" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```