Skip to content

🎬 视频模型 pika

  • 2024.10.16 本站已经支持 视频模型 pika
  • pika 本身无 api, 跟 GPTs 一样是通过逆向得来,
  • 支持 文生视频 图生视频
  • 计费是按次数,一次一个视频
  • 如何使用 访问 https://pika.ddaiai.com 看下面的 在线测试

在线测试 1.访问 https://pika.ddaiai.com (如果被墙了,换下二级域名前缀 suibian)


2.如果发现被墙了 可以自己换地址 https://suibian.ddaiai.comsuibian 换其他的 如 https://2025.ddaiai.com 都能访问

在线测试

PIKA API

创建视频任务

post https://api.openai-hk.com/pika/generate

shell
curl 'https://api.openai-hk.com/pika/generate' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer hk-你的key' \
  --data '{"pikaffect":"","promptText":"moving","model":"1.5","options":{"aspectRatio":1.7777777777777777,"frameRate":24,"camera":{},"parameters":{"guidanceScale":12,"motion":1,"negativePrompt":""},"extend":false}}'
curl 'https://api.openai-hk.com/pika/generate' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer hk-你的key' \
  --data '{"pikaffect":"","promptText":"moving","model":"1.5","options":{"aspectRatio":1.7777777777777777,"frameRate":24,"camera":{},"parameters":{"guidanceScale":12,"motion":1,"negativePrompt":""},"extend":false}}'

请求体

json
{
  "pikaffect": "",
  "promptText": "moving",
  "model": "1.5",
  "options": {
    "aspectRatio": 1.7777777777777777,
    "frameRate": 24,
    "camera": {},
    "parameters": {
      "guidanceScale": 12,
      "motion": 1,
      "negativePrompt": ""
    },
    "extend": false
  },
  "image": ""
}
{
  "pikaffect": "",
  "promptText": "moving",
  "model": "1.5",
  "options": {
    "aspectRatio": 1.7777777777777777,
    "frameRate": 24,
    "camera": {},
    "parameters": {
      "guidanceScale": 12,
      "motion": 1,
      "negativePrompt": ""
    },
    "extend": false
  },
  "image": ""
}

关键字段说明

字段类型说明
pikaffectstring官方视频效果,可以留空 当配置上效果后有配音Levitate Decapitate Eye-pop Ta-da Deflate Crumble Dissolve Squish Inflate Melt Crush Cake-ify Explode 后续官方可能还会增加
promptTextstring提示词
imagestring存在就必须有值,可以是 base64 或者图片 url
modelstring模型版本 1.5 2.0
optionsobject视频设置
options.aspectRationumber宽高比例 如果是图片这个要去掉
options.parameters.negativePromptstring不出现的物体

返回体 返回的 id 我们称之为 taskId 在后面的步骤中用到

json
{
  "id": "c1d16f47-16c2-4798-8733-5ed9903885cc"
}
{
  "id": "c1d16f47-16c2-4798-8733-5ed9903885cc"
}

查看任务状态

get https://api.openai-hk.com/pika/feed/{taskId}

curl

shell
curl 'https://api.openai-hk.com/pika/feed/66e0818e-05fb-454e-b246-a6f253e9ffbf' \
  -H 'Authorization: Bearer hk-你的key'
curl 'https://api.openai-hk.com/pika/feed/66e0818e-05fb-454e-b246-a6f253e9ffbf' \
  -H 'Authorization: Bearer hk-你的key'

返回体

json
{
  "id": "66e0818e-05fb-454e-b246-a6f253e9ffbf",
  "promptText": "Plane fly",
  "videos": [
    {
      "id": "66e0818e-05fb-454e-b246-a6f253e9ffbf",
      "status": "finished",
      "seed": 3183047765,
      "resultUrl": "https://cdn.pika.art/v1/66e0818e-05fb-454e-b246-a6f253e9ffbf/Plane_fly_seed3183047765.mp4",
      "sharingUrl": "https://cdn.pika.art/v1/66e0818e-05fb-454e-b246-a6f253e9ffbf/Plane_fly_seed3183047765_share.mp4",
      "videoPoster": "https://cdn.pika.art/v1/66e0818e-05fb-454e-b246-a6f253e9ffbf/poster.jpg",
      "imageThumb": "https://cdn.pika.art/v1/66e0818e-05fb-454e-b246-a6f253e9ffbf/thumbnail.jpg",
      "duration": 5,
      "error": "",
      "progress": 100
    }
  ]
}
{
  "id": "66e0818e-05fb-454e-b246-a6f253e9ffbf",
  "promptText": "Plane fly",
  "videos": [
    {
      "id": "66e0818e-05fb-454e-b246-a6f253e9ffbf",
      "status": "finished",
      "seed": 3183047765,
      "resultUrl": "https://cdn.pika.art/v1/66e0818e-05fb-454e-b246-a6f253e9ffbf/Plane_fly_seed3183047765.mp4",
      "sharingUrl": "https://cdn.pika.art/v1/66e0818e-05fb-454e-b246-a6f253e9ffbf/Plane_fly_seed3183047765_share.mp4",
      "videoPoster": "https://cdn.pika.art/v1/66e0818e-05fb-454e-b246-a6f253e9ffbf/poster.jpg",
      "imageThumb": "https://cdn.pika.art/v1/66e0818e-05fb-454e-b246-a6f253e9ffbf/thumbnail.jpg",
      "duration": 5,
      "error": "",
      "progress": 100
    }
  ]
}

返回关键字段说明

字段类型说明
idstring任务 id
promptTextstring提示词
videosarray视频数组
videos[].idstring视频 id
videos[].statusstring视频状态 finished 为完成 error 为错误
videos[].seednumber视频种子
videos[].resultUrlstring视频地址
videos[].videoPosterstring封面图片
videos[].sharingUrlstring视频分享地址
videos[].errorstring当状态为error 有错误说明
videos[].progressnumber进度

ingredient:多图创建视频任务

post https://api.openai-hk.com/pika/generate

  • 注意请求体内不能带 image
  • ingredient 是一个图片数组 可以是 url 也可以是 base64
  • ingredients-modeprecise 精确模式 或者 creative 创意模式
  • model 必须为 2.0
  • 请求体
json
{
  "pikaffect": "",
  "model": "2.0",
  "promptText": "pick it",
  "options": {
    "aspectRatio": 1.7777777777777777,
    "frameRate": 24,
    "camera": {},
    "parameters": {
      "guidanceScale": 12,
      "motion": 1,
      "negativePrompt": ""
    },
    "extend": false,
    "ingredients-mode": "precise"
  },
  "ingredient": [
    "https://www.openai-hk.com/res/img/open.png",
    "https://cos.aitutu.cc/gpts/o1-all.jpg"
  ]
}
{
  "pikaffect": "",
  "model": "2.0",
  "promptText": "pick it",
  "options": {
    "aspectRatio": 1.7777777777777777,
    "frameRate": 24,
    "camera": {},
    "parameters": {
      "guidanceScale": 12,
      "motion": 1,
      "negativePrompt": ""
    },
    "extend": false,
    "ingredients-mode": "precise"
  },
  "ingredient": [
    "https://www.openai-hk.com/res/img/open.png",
    "https://cos.aitutu.cc/gpts/o1-all.jpg"
  ]
}