pika视频延长
POST
https://openapi.w8x.cn/api/pika/extend最长可以延长到15秒,初次生成3秒后每次延4秒:3+4+4+4=15
延长的同时可以二次调整参数
Request Body
请求体
参数 | 类型 | 必需 | 描述 |
---|---|---|---|
promptText | text | 否 | 上一个视频的提示。您可以使用Get Job端点获取它。可以在job.params.promptText中找到 |
options | Options | 是 | 上一个视频的选项。您可以使用Get Job端点获取它。可以在job.params.options中找到 |
video | text | 是 | 您想要编辑的视频的URL。您可以使用Get Job端点获取它。可以在videos[0].resultUrl中找到,最好是pika的原视频链接 |
ref | text | 否 | 您可以附加到完成的参考 |
webhookOverride | text | 否 | 用于覆盖默认Webhook的Webhook URL |
请求参数
Body 参数application/json
key
string
你的key
promptText
string
必需
video
string
必需
最好是pika的原视频链接
options
object
必需
aspectRatio
string
必需
frameRate
integer
必需
camera
object
必需
parameters
object
必需
extend
boolean
必需
示例
{
"key":"你的key",
"promptText": "your old prompt or a new prompt",
"video": "your-url-here", //the url of the video you want to extend
"options": {
"aspectRatio": "5:2",
"frameRate": 20,
"camera": {
"pan": "right",
"tilt": "up",
"rotate": "cw",
"zoom": "in"
},
"parameters": {
"guidanceScale": 16,
"motion": 2,
"negativePrompt": "ugly",
"seed": 144124
},
"extend": false
}
}
示例代码
返回响应
成功(200)
失败(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
必需
msg
string
必需
data
object
必需
job
object
必需
video
object
必需
exec_time
number
必需
ip
string
必需
示例
成功示例
{
"code": 200,
"msg": "提交生成成功",
"data": {
"job": {
"id": "0ddd943f-c724-445b-b389-fe2661e0070a",
"adjusted": false,
"accountId": "z123I5GukOugL1vcG2Mf",
"extended": 1,
"pikaJobId": "0ddd943f-c724-445b-b389-fe2661e0070a",
"params": {
"options": {
"aspectRatio": "16:9",
"frameRate": 24,
"camera": {
"rotate": null,
"zoom": null,
"tilt": null,
"pan": null
},
"parameters": {
"motion": 1,
"guidanceScale": 12,
"negativePrompt": "",
"seed": 144124
},
"extend": true
},
"userId": "92b68ee2-a71d-4500-1234-4eea210d0cac",
"promptText": "robed villain striding across reflective floor. temple enfilade. scene made of rectilinear shimmering pattern of scales. sinister awakening face made of flickering neon accents. luminous sequential eye stacks. contained in flaring morse lightwire sequences. repetition of form",
"video": "https://example.video/cc81fd6034c6c69a324b0162e9364427083975e46e6298b3a1b.mp4"
},
"promptText": "robed villain striding across reflective floor. temple enfilade. scene made of rectilinear shimmering pattern of scales. sinister awakening face made of flickering neon accents. luminous sequential eye stacks. contained in flaring morse lightwire sequences. repetition of form",
"requestType": "extend",
"upscaled": false,
"createdAt": {}
},
"video": {
"accountId": "z123I5GukOugL1vcG2Mf",
"id": "0ddd943f-c724-445b-b389-fe2661e0070a",
"jobId": "0ddd943f-c724-445b-b389-fe2661e0070a",
"status": "queued",
"pikaVideoId": "0ddd943f-c724-445b-b389-fe2661e0070a"
}
},
"exec_time": 1.378803,
"ip": ""
}
最后修改时间: 7 个月前