Generate(参考主体生成视频)
POST
/pika/generate来自pika的参考主体生成视频,此模式为2.0模型独有
价格:0.2 PTC / 秒
请求参数
Mode for ingredients generation. Can be either creative or precise. It is only available for modelVersion 2.0-contextualize.
Input ingredient images you want to start from. 50MB limit. This is required for 2.0 contextualized generation.
5 is recommended
2.0-contextualize
A text description that guides the generative process. This is required for text-to-video generation
A JSON-formatted string containing various settings and parameters to be applied during the generative process. This should have the keys below:
The aspect ratio of the video, defined as the ratio of width to height. Must be from 0.4 to 2.5. The default value is 1.0, which means the video is square.
The frame rate of the video, specified as frames per second. Must be from 8 to 24. The default value is 24.
Camera options for the video adjustment. The default value is {"zoom":null,"pan":null,"tilt":null,"rotate":null}.
Consistency of the generation with the text prompt. Can be from 5 to 25. The default value is 12.
The strength of the camera motion. Can be from 0 to 4. The default value is None.
Description of what to exclude from the generated video, e.g. ugly, bad, terrible. The default value is an ''.
Additional parameters for video adjustment. The default value is {"seed":null}.
{
"modelVersion": "2.0-contextualize",
"promptText": "A fluffy penguin",
"duration": 5,
"options": {
"aspectRatio": 1.777,
"frameRate": 24
},
"ingredientMode": "precise",
"ingredients": [
"https://file.302ai.cn/gpt/photoshow/20240806/feed8cfd4dba495bb444a3de183fd385.jpeg",
"https://file.302ai.cn/gpt/photoshow/20240806/feed8cfd4dba495bb444a3de183fd385.jpeg"
]
}
示例代码
返回响应
{
"success": true,
"code": 0,
"error": "<string>",
"data": {
"id": "<string>",
"modelVersion": "1.0",
"duration": 123
}
}