> 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 Model 1 generation

POST https://api.videogen.io/v1/models/model-1/generations
Content-Type: application/json

Generate an MP4 with Model 1. Returns immediately; poll the generation endpoint for completion. Uses separate Model 1 team quota, not generation credits. Every admitted attempt holds an hourly slot and reserves its duration; failed attempts retain both under the existing recovery policy. Reuse the same Idempotency-Key after a network timeout.

Reference: https://docs.videogen.io/rest-api-reference/models/start-model-1-generation

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

### Headers

- `Idempotency-Key` (string, required) — A unique key per intended generation. Identical retries return the same generation; conflicting inputs return 409.

### Body (application/json)

This endpoint expects a StartModel1GenerationRequest.

- `prompt` (string, required)
- `seconds` (integer, optional, default: 10)
- `imageFileIds` (list of string, optional, default: []) — Ordered reference images: up to 9 distinct file ids, each fully uploaded and accessible. References guide generation; they do not guarantee an opening frame. Output settings follow current Model 1 defaults.

## Response

### 202

Generation admitted, or an identical submission replayed.

- `generationId` (string, required) — Opaque generation id (vg_mgen_...). Store as-is.

## Errors

### 429 Too Many Requests Error

Hourly or lifetime Model 1 quota exceeded. Branch on code. Only hourly exhaustion includes Retry-After. Buying generation credits does not increase Model 1 quota.

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

## Types

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

**Request**

```json
{
  "prompt": "string"
}
```

**Response**

```json
{
  "generationId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.videogen.io/v1/models/model-1/generations"

payload = { "prompt": "string" }
headers = {
    "Idempotency-Key": "Idempotency-Key",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```