# Pixverse C1 API Complete API reference for Pixverse C1 video generation models. All variants use the unified video task endpoint. ## Model Variants | Model | ID | Description | | ----- | --- | ----------- | | **Pixverse C1 Text to Video** | `pixverse-c1-text-to-video` | Generate video from a text prompt | | **Pixverse C1 Image to Video** | `pixverse-c1-image-to-video` | Animate from a single first-frame image | | **Pixverse C1 Transition** | `pixverse-c1-transition` | Generate a transition between a first-frame and last-frame image | ## Quick Comparison | Feature | Text to Video | Image to Video | Transition | | ------- | ------------- | -------------- | ---------- | | `prompt` | Required | Required | Required | | `aspect_ratio` | Optional (default `16:9`); see supported ratios below | Not used (follows input image) | Not used (follows input images) | | `image_url` | — | Required | Required (first frame) | | `image_end_url` | — | — | Required (last frame) | | Duration | 1–15 seconds | 1–15 seconds | 1–15 seconds | | Resolution | `360p`, `540p`, `720p`, `1080p` | Same | Same | | Audio | Optional via `sound` | Optional via `sound` | Optional via `sound` | Text-to-video models support aspect ratios: `21:9`, `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `3:2`, `2:3`. ## Pixverse C1 Text to Video ### Endpoint ``` POST /api/v1/video/task ``` ### Request Parameters #### Required | Parameter | Type | Description | | --------- | ---- | ----------- | | `model_name` | string | Must be `"pixverse-c1-text-to-video"` | | `prompt` | string | Video generation prompt | | `duration` | integer | Video length in seconds (`1`–`15`) | | `resolution` | string | One of `360p`, `540p`, `720p`, `1080p` | #### Optional | Parameter | Type | Description | | --------- | ---- | ----------- | | `aspect_ratio` | string | Default `16:9`. One of `21:9`, `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `3:2`, `2:3` | | `sound` | boolean | Whether to generate audio for the video | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/video/task', { method: 'POST', headers: { Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json', }, body: JSON.stringify({ model_name: 'pixverse-c1-text-to-video', prompt: 'A drone shot over coastline at golden hour', duration: 5, resolution: '720p', aspect_ratio: '16:9', sound: true, }), }); const { data } = await response.json(); const taskId = data.task_id; ``` ## Pixverse C1 Image to Video ### Request Parameters #### Required | Parameter | Type | Description | | --------- | ---- | ----------- | | `model_name` | string | Must be `"pixverse-c1-image-to-video"` | | `prompt` | string | Video generation prompt | | `duration` | integer | Video length in seconds (`1`–`15`) | | `resolution` | string | One of `360p`, `540p`, `720p`, `1080p` | | `image_url` | string | URL of the first-frame image | #### Optional | Parameter | Type | Description | | --------- | ---- | ----------- | | `sound` | boolean | Whether to generate audio for the video | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/video/task', { method: 'POST', headers: { Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json', }, body: JSON.stringify({ model_name: 'pixverse-c1-image-to-video', prompt: 'Slow zoom in; soft natural motion', duration: 5, resolution: '720p', image_url: 'https://example.com/first-frame.jpg', sound: false, }), }); const { data } = await response.json(); const taskId = data.task_id; ``` ## Pixverse C1 Transition Generates motion between a **first** and **last** keyframe image. ### Request Parameters #### Required | Parameter | Type | Description | | --------- | ---- | ----------- | | `model_name` | string | Must be `"pixverse-c1-transition"` | | `prompt` | string | Describes the motion between the two frames | | `duration` | integer | Video length in seconds (`1`–`15`) | | `resolution` | string | One of `360p`, `540p`, `720p`, `1080p` | | `image_url` | string | URL of the first-frame image | | `image_end_url` | string | URL of the last-frame image | #### Optional | Parameter | Type | Description | | --------- | ---- | ----------- | | `sound` | boolean | Whether to generate audio for the video | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/video/task', { method: 'POST', headers: { Authorization: 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json', }, body: JSON.stringify({ model_name: 'pixverse-c1-transition', prompt: 'Smooth cinematic morph between the two scenes', duration: 6, resolution: '720p', image_url: 'https://example.com/start.jpg', image_end_url: 'https://example.com/end.jpg', sound: true, }), }); const { data } = await response.json(); const taskId = data.task_id; ``` ## Response Format ### Initial Response ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "submitted" } } ``` ### Polling Response Poll `GET /api/v1/video/{taskId}` to check status: ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "succeed", "task_status_msg": null, "task_result": { "credit": 0.2, "videos": [ { "url": "https://example.com/generated-video.mp4" } ] } } } ``` ### Status Values - `submitted`: Task accepted and waiting to be processed - `processing`: Video generation in progress - `succeed`: Video generation completed - `failed`: Video generation failed ## Best Practices 1. **Resolution**: Use `720p` or `1080p` for a balance of quality and generation time; use `360p` or `540p` for faster iteration. 2. **Transitions**: Use sharp, well-lit first and last frames so the model can interpolate motion reliably. 3. **Audio**: Set `sound` when you want synchronized ambient audio; omit or set `false` for silent output. 4. **Polling**: Poll every 5–10 seconds until `task_status` is `succeed` or `failed`.