使用已托管的 URL
如果文件已经在线,你就完成了 —— 把 URL 直接传入模型的 input。
概览
无需重新上传或换取 URL。任何直接返回文件字节的公开 HTTPS URL 都可作为输入值(如 image_url、video_url、audio_url —— 确切字段名见各模型文档)。
检查清单
- 返回 HTTP 200 且
Content-Type正确(用curl -I验证)。 - 无登录、防盗链/referer 校验或内网地址。
- 不是分享页 —— Google Drive / Dropbox / 网盘 链接需用其直接下载形式。
cURL
curl -I "https://your-cdn.example.com/photo.jpg"示例
cURL
curl -X POST "https://97ai.97claude.com/api/generate" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana-image-to-image",
"input": {
"image_url": "https://your-cdn.example.com/photo.jpg",
"prompt": "restyle as watercolor"
}
}'预签名 URL
限时预签名 URL 没问题,只要在任务运行期间保持有效即可。