Videos¶
This section lists the implemented endpoints under this capability.
Create video¶
POST /v1/videos
OpenAI-compatible video generation endpoint.
Reference: https://platform.openai.com/docs/api-reference/videos/create
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Request Body¶
- Content-Type:
multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | no | Model name |
| prompt | string | no | Prompt |
| seconds | string | no | Generation duration in seconds |
| input_reference | string | no | Reference image file |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Video task created successfully | object |
| 400 | Invalid request parameters | ErrorResponse |
Get video task status¶
GET /v1/videos/{task_id}
OpenAI-compatible endpoint for querying video task status.
Returns detailed task status information.
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| task_id | path | string | yes | Video task ID |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Video task status retrieved successfully | object |
| 404 | Task not found | ErrorResponse |
Get video content¶
GET /v1/videos/{task_id}/content
Get the generated video file content for a completed task.
This endpoint proxies the video file stream.
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| task_id | path | string | yes | Video task ID |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Video content retrieved successfully | string |
| 404 | Video does not exist or is not complete | ErrorResponse |
Kling text-to-video¶
POST /kling/v1/videos/text2video
Generate a video from a text prompt using Kling models.
Supported models include kling-v1, kling-v1-5, and more.
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Request Body¶
- Content-Type:
application/json - Schema:
VideoRequest
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | no | Model or style ID |
| prompt | string | no | Text prompt |
| image | string | no | Image input (URL or Base64) |
| duration | number | no | Video duration (seconds) |
| width | integer | no | Video width |
| height | integer | no | Video height |
| fps | integer | no | Video frame rate |
| seed | integer | no | Random seed |
| n | integer | no | Number of videos to generate |
| response_format | string | no | Response format |
| user | string | no | User identifier |
| metadata | object | no | Extended parameters (such as negative_prompt, style, quality_level, etc.) |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Video generation task created successfully | VideoResponse |
| 400 | Invalid request parameters | ErrorResponse |
Get Kling text-to-video task status¶
GET /kling/v1/videos/text2video/{task_id}
Query the status and result of a Kling text-to-video task.
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| task_id | path | string | yes | Task ID |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Task status retrieved successfully | VideoTaskResponse |
| 404 | Task not found | ErrorResponse |
Kling image-to-video¶
POST /kling/v1/videos/image2video
Generate a video from an image using Kling models.
The image field accepts either an image URL or Base64-encoded image data.
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Request Body¶
- Content-Type:
application/json - Schema:
VideoRequest
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | no | Model or style ID |
| prompt | string | no | Text prompt |
| image | string | no | Image input (URL or Base64) |
| duration | number | no | Video duration (seconds) |
| width | integer | no | Video width |
| height | integer | no | Video height |
| fps | integer | no | Video frame rate |
| seed | integer | no | Random seed |
| n | integer | no | Number of videos to generate |
| response_format | string | no | Response format |
| user | string | no | User identifier |
| metadata | object | no | Extended parameters (such as negative_prompt, style, quality_level, etc.) |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Video generation task created successfully | VideoResponse |
| 400 | Invalid request parameters | ErrorResponse |
Get Kling image-to-video task status¶
GET /kling/v1/videos/image2video/{task_id}
Query the status and result of a Kling image-to-video task.
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| task_id | path | string | yes | Task ID |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Task status retrieved successfully | VideoTaskResponse |
| 404 | Task not found | ErrorResponse |
Jimeng video generation¶
POST /jimeng/
Jimeng official API style endpoint for video generation.
Use the Action query parameter to choose the operation:
- CVSync2AsyncSubmitTask: submit a video generation task
- CVSync2AsyncGetResult: query task result
The Action and Version query parameters are required.
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Action | query | string | yes | API action type |
| Version | query | string | yes | API version |
Request Body¶
- Content-Type:
application/json
| Field | Type | Required | Description |
|---|---|---|---|
| req_key | string | no | Request type identifier |
| prompt | string | no | Text description |
| binary_data_base64 | array[string] | no | Base64-encoded image data |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Request processed successfully | object |
| 400 | Invalid request parameters | ErrorResponse |
Create video generation task¶
POST /v1/video/generations
Submit a video generation task. Supports both text-to-video and image-to-video workflows.
Returns a task ID that can be used with the GET status endpoint.
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Request Body¶
- Content-Type:
application/json - Schema:
VideoRequest
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | no | Model or style ID |
| prompt | string | no | Text prompt |
| image | string | no | Image input (URL or Base64) |
| duration | number | no | Video duration (seconds) |
| width | integer | no | Video width |
| height | integer | no | Video height |
| fps | integer | no | Video frame rate |
| seed | integer | no | Random seed |
| n | integer | no | Number of videos to generate |
| response_format | string | no | Response format |
| user | string | no | User identifier |
| metadata | object | no | Extended parameters (such as negative_prompt, style, quality_level, etc.) |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Video generation task created successfully | VideoResponse |
| 400 | Invalid request parameters | ErrorResponse |
Get video generation task status¶
GET /v1/video/generations/{task_id}
Query the status and result of a video generation task.
Task status values:
- queued: waiting in queue
- in_progress: generation in progress
- completed: finished successfully
- failed: generation failed
Authentication¶
- Bearer Token (
Authorization: Bearer <token>)
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| task_id | path | string | yes | Task ID |
Responses¶
| Status | Description | Schema |
|---|---|---|
| 200 | Task status retrieved successfully | VideoTaskResponse |
| 404 | Task not found | ErrorResponse |