Skip to content

模型调用中引用资源 ​

模型调用请求体中,如果使用上传的资源,需要使用 tkres_ 开头的资源 UUID,并以 asset:// 协议引用。

示例:

shell
curl --location 'https://neolink.com/api/v1/contents/generations/tasks' \
--header 'Authorization: Bearer <API Key>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "<Model ID>",
    "content": [
         {
            "type": "text",
            "text": "让图片1中的人做视频1的蛋糕"
        },
        {
          "type": "video_url",
          "video_url": {
              "url": "https://ark-project.tos-cn-beijing.volces.com/doc_video/r2v_tea_video1.mp4"
          },
          "role": "reference_video"
        },
        {
            "type": "image_url",
            "image_url": {
                "url": "asset://tkres_06acdeb4b45f4aa283908e1acc58abe8"
            },
            "role": "reference_image"
        }
    ],
    "generate_audio":true,
    "ratio": "16:9",
    "duration": 11,
    "watermark": false
}'

如果当前 API Key 无权访问资源,请求会被拒绝。