简体中文
cURL
image_from_url
curl --request POST \ --url https://kieai.redpandaai.co/api/file-url-upload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "fileUrl": "https://example.com/images/sample.jpg", "uploadPath": "images/downloaded", "fileName": "my-downloaded-image.jpg"}'
200
example
{ "success": true, "code": 200, "msg": "文件上传成功", "data": { "fileName": "uploaded-image.png", "filePath": "images/user-uploads/uploaded-image.png", "downloadUrl": "https://tempfile.redpandaai.co/xxx/images/user-uploads/uploaded-image.png", "fileSize": 154832, "mimeType": "image/png", "uploadedAt": "2025-01-01T12:00:00.000Z" }}
http://example.com/file.jpg
https://example.com/file.jpg
所有接口都需要通过 Bearer Token 方式进行认证。
获取 API Key:
使用方式: 在请求头中添加: Authorization: Bearer YOUR_API_KEY
文件上传成功
The response is of type object.
object