Theme
Submit Video Generation Task
POST
https://www.kkiai.com/runwayml/v1/image_to_video
Official documentation: https://docs.dev.runwayml.com/api/#tag/Start-generating/paths/~1v1~1image_to_video/post
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Header Parameters
| Parameter Name | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Required | application/json | |
Accept | string | Required | application/json | |
Authorization | string | Required | Bearer {{YOUR_API_KEY}} |
Body Parameters (application/json)
| Parameter Name | Type | Required | Description |
|---|---|---|---|
promptImage | string | Required | Required. HTTPS URL or data URI containing the encoded image as the first frame of the generated video |
model | string | Required | Required. Specifies the model variant to use. Optional values: "gen4_turbo" or "gen3a_turbo" |
ratio | string | Required | Required. Output video resolution in the format "width:height". Different models support different resolutions |
seed | integer | Required | Optional. Random seed value (0-4294967295). The same seed produces similar results for the same request |
promptText | string | Required | Optional. String (≤1000 characters) describing the content expected to appear in the video |
duration | integer | Required | Optional. Video duration in seconds. Optional values: 5 or 10. Default is 10 |
Request Example
json
{
"promptImage": "https://www.bt.cn/bbs/template/qiao/style/image/btlogo.png",
"model": "gen4_turbo",
"promptText": "cat dance",
"watermark": false,
"duration": 5,
"ratio": "1280:768"
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/runwayml/v1/image_to_video' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"promptImage": "https://www.bt.cn/bbs/template/qiao/style/image/btlogo.png",
"model": "gen4_turbo",
"promptText": "cat dance",
"watermark": false,
"duration": 5,
"ratio": "1280:768"
}'Response
🟢 200 Success
Response Body
| Parameter Name | Type | Required | Description |
|---|---|---|---|
code | integer | Required | |
message | string | Required | |
request_id | string | Required | |
data | object | Required | |
└ task_id | string | Required | |
└ task_status | string | Required | |
└ created_at | integer | Required | |
└ updated_at | integer | Required |
Response Example
json
{
"id": "4665a07c-7641-4809-a133-10786201bb56",
"prompt": "",
"state": "pending",
"queue_state": null,
"created_at": "2024-12-22T13:38:40.139409Z",
"batch_id": "",
"video": null,
"video_raw": null,
"liked": null,
"estimate_wait_seconds": null,
"thumbnail": null,
"last_frame": null
}