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

# Get an assistant message

GET https://api.videogen.io/v1/assistant-messages/{messageId}

Returns a single assistant chat message by id. Poll after a POST that returned `messageId` until `status` is `succeeded`, `failed`, or `cancelled`. Also supported for `USER` messages (which reach terminal state as soon as they're accepted).

Reference: https://docs.videogen.io/rest-api-reference/assistant/get-assistant-message

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

### Path parameters

- `messageId` (string, required) — The assistant message id (e.g. `vg_mesg_...`) returned by an assistant POST.

## Response

### 200

The assistant chat message.

- `AssistantMessage`
  - `role`: `user` (user)
    - `attachments` (list of AssistantMessageAttachment, required) — Files attached to this message.
    - `content` (string, required) — The user's message text.
    - `createdAt` (integer, required) — Seconds since epoch (Unix timestamp) when the message was created.
    - `messageId` (string, required) — Opaque assistant message id (e.g. `vg_mesg_...`).
    - `status` (enum, required) — Lifecycle status of an assistant chat message. `pending` and `running` are in-progress; `succeeded`, `failed`, and `cancelled` are terminal.
      - Allowed values: `pending`, `running`, `succeeded`, `failed`, `cancelled`
  - `role`: `assistant` (assistant)
    - `actions` (list of AssistantAction, required) — Actionable widgets the assistant offered on this message (plans, edits, tools, generate). Empty when none were offered.
    - `attachments` (list of AssistantMessageAttachment, required) — Files attached to this message.
    - `content` (string, required, nullable) — The assistant's text reply. `null` while `status` is `pending` or `running`; may be empty when the assistant only offered widgets.
    - `createdAt` (integer, required) — Seconds since epoch (Unix timestamp) when the message was created.
    - `error` (ApiError, required, nullable) — Error details. `null` unless `status` is `failed`.
    - `generation` (StartWorkflowRunResponse, required, nullable) — Present when this message kicked off a workflow run (via `autoGenerate` on start, or acting on a workflow suggestion): the workflow run to poll via `GET /v1/workflows/runs/{workflowRunId}`.
    - `messageId` (string, required) — Opaque assistant message id (e.g. `vg_mesg_...`).
    - `status` (enum, required) — Lifecycle status of an assistant chat message. `pending` and `running` are in-progress; `succeeded`, `failed`, and `cancelled` are terminal.
      - Allowed values: `pending`, `running`, `succeeded`, `failed`, `cancelled`
    - `workflowSuggestions` (list of AssistantWorkflowSuggestion, required) — Workflow starting points the assistant suggested on this message. Empty when none were offered.

## Types

### AssistantMessageAttachment

A file linked to an assistant chat message.

- `displayName` (string, required) — Human-readable name of the attachment.
- `fileId` (string, optional, nullable) — File id (e.g. `vg_file_...`) when the attachment is a storage file. `null` for attachments that are not resolvable storage files.

### AssistantAction

An actionable widget the assistant offered on this turn. Act on it with `POST /v1/assistants/{assistantId}/actions/{actionId}` unless `requiresApp` is true.

- `actionId` (string, required) — Opaque id to pass to the act-on-action endpoint.
- `kind` (enum, required) — Normalized category of an actionable widget the assistant offered. `APPROVE_PLAN` accepts a proposed generation plan; `APPLY_EDIT` applies a proposed edit (e.g. a rewritten script); `RUN_TOOL` runs an inline tool; `GENERATE` starts building the video; `OPEN_IN_APP` requires the full web app — open the assistant's `projectUrl` instead of acting via the API.
  - Allowed values: `APPROVE_PLAN`, `APPLY_EDIT`, `RUN_TOOL`, `GENERATE`, `OPEN_IN_APP`
- `label` (string, required) — Human-readable label describing what acting on this will do.
- `requiresApp` (boolean, required) — When true, this action can only be completed in the web app; open the assistant's `projectUrl` instead of calling the API.
- `detail` (AssistantActionDetail, optional) — Optional extra data for rendering this action inline without opening the app.

### ApiError

Standard error body returned with every non-2xx response (the `default` response of every operation). The HTTP status code conveys the error class; this body carries the details: - `400` invalid request, `401` missing or invalid API key, `403` not permitted (e.g. plan or add-on required, see `requirement`), `404` not found, `409` conflict, `429` rate limited or out of credits, `5xx` server error. Common `code` values include `invalid_request`, `invalid_api_key`, `not_authorized`, `not_found`, `insufficient_credits`, and `rate_limited`. Always branch on `code` (and `requirement.type` when present) rather than parsing `message`.

- `message` (string, required) — Human-readable error description. For display and logging only; do not branch on its exact text.
- `code` (string, optional, nullable) — Machine-readable error code in snake_case (e.g. `invalid_api_key`, `insufficient_credits`). `null` when no specific code applies.
- `requirement` (ErrorRequirement, optional, nullable) — What is needed to resolve the error. Present when the error can be fixed by fulfilling a specific requirement (e.g. purchasing an add-on); `null` otherwise.
- `internalErrorCode` (string, optional, nullable) — Opaque internal error code for debugging. Include this when contacting support. `null` when not applicable.

### StartWorkflowRunResponse

Returned when a workflow run is accepted. Poll `GET /v1/workflows/runs/{workflowRunId}` or subscribe to webhooks for completion. When the start request set `autoExport: true`, wait until `status` is `succeeded` and use `downloadUrl`.

- `workflowRunId` (string, required) — Opaque workflow run id (e.g. `vg_work_...`).
- `projectId` (string, required) — Id of the project created for this workflow run (e.g. `vg_proj_...`).
- `projectUrl` (string, required) — Deep link to open this project in the VideoGen web editor. Not required for an API-only integration: store `projectId` and use the Projects API (export, remix, metadata). Use `projectUrl` when a person should open the project in the app to review or edit it manually. The project is visible only to members of your team and any project collaborators, the same access model as a project created in the dashboard.
- `remixActionIds` (list of string, required) — Opaque remix action ids (e.g. `vg_rmix_...`), one per `remixActions` entry in request order. Empty when no remix actions were requested. Each runs after the video is built; poll `GET /v1/projects/{projectId}/remix-actions`.

### AssistantWorkflowSuggestion

A starting-point workflow the assistant suggests for the conversation. Act on it with `POST /v1/assistants/{assistantId}/actions/{actionId}` to select the workflow and continue.

- `actionId` (string, required) — Opaque id to pass to the act-on-action endpoint to select this workflow.
- `workflowType` (enum, required) — Identifier of the suggested workflow.
  - Allowed values: `SCRIPT_TO_VIDEO`, `VOICEOVER_TO_VIDEO`, `SLIDESHOW_TO_VIDEO`, `STORYBOARD_TO_VIDEO`, `PROMPT_TO_VIDEO_CLIP`
- `title` (string, required) — Short human-readable name of the suggested workflow.
- `description` (string, required) — One-line explanation of what this workflow will do.

### AssistantActionDetail

Extra data for rendering this action inline (in a chat surface or integration) without opening the web app. Fields are populated only when relevant to the action's kind; all are optional.

- `summary` (string, optional, nullable) — Human-readable summary of the proposed plan or edit (for `APPROVE_PLAN` and `APPLY_EDIT` actions).
- `creditsRemaining` (integer, optional, nullable) — Credits currently remaining on your team (for the usage/credits widget). A whole number of credits.
- `estimatedCredits` (integer, optional, nullable) — Estimated credit cost of the current workflow (for the cost-estimate widget). A whole number of credits.

### ErrorRequirement

What is needed to resolve an error, when it can be fixed by fulfilling a specific requirement (e.g. purchasing an add-on or upgrading the plan).

- `type` (string, required) — Machine-readable requirement type in snake_case (e.g. `purchase_add_on`, `upgrade_plan`).
- `details` (map from string to string, optional) — Key-value pairs with requirement-specific context (e.g. the add-on id to purchase).

## Examples

**Response**

```json
{
  "role": "user",
  "attachments": [
    {
      "displayName": "string",
      "fileId": "string"
    }
  ],
  "content": "string",
  "createdAt": 1,
  "messageId": "string",
  "status": "pending"
}
```

**SDK Code**

```python
import requests

url = "https://api.videogen.io/v1/assistant-messages/messageId"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```