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

# REST API overview

> Quick reference for the VideoGen REST API: base URL, authentication, request format, and response conventions.

## Base URL

```
https://api.videogen.io
```

## Authentication

All requests require a bearer token in the `Authorization` header:

```
Authorization: Bearer sk_videogen_live_...
```

Get your API key from [app.videogen.io/api](https://app.videogen.io/api). The full key is only shown once when you create it.

The bearer token can also be an OAuth 2.1 access token if your app acts on behalf of other VideoGen users (see [Sign in with VideoGen](/oauth)).

## Request format

* All request bodies are JSON (`Content-Type: application/json`).
* Workflow endpoints are asynchronous: `POST /v1/workflows/...` returns `202 Accepted` with `{ workflowRunId, projectId, projectUrl }`. Use `projectId` for API follow-ups (export, remix). `projectUrl` is optional and opens the project in the app editor. Poll `GET /v1/workflows/runs/{workflowRunId}` until `status` is terminal. See [Workflows](/workflows).
* Tool endpoints are asynchronous too: `POST /v1/tools/...` returns `202 Accepted` with a `toolExecutionId`. Poll `GET /v1/tools/executions/{toolExecutionId}` until `status` is `succeeded`, `failed`, or `cancelled`.
* Text generation is synchronous: `POST /v1/text/generate` returns `200 OK` with the generated `text` inline (no polling).
* Either async surface can notify you via [webhooks](/webhook-events) instead of polling.

## IDs

All IDs are prefixed strings (e.g. `vg_work_...`, `vg_tool_...`, `vg_file_...`). Store them as-is and do not parse them.