简体中文
cURL
curl --request POST \ --url https://veo3apiai.redpandaai.co/api/file-base64-upload \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "base64Data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...", "uploadPath": "images/base64", "fileName": "my-image.png" }'
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" } }
通过 Base64 编码上传文件到服务器。
iVBORw0KGgoAAAANSUhEUgAA...
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...
所有 API 需要通过 Bearer Token 进行身份验证。
获取 API Key:
使用方法: 在请求头中添加: Authorization: Bearer YOUR_API_KEY
文件上传成功
The response is of type object.
object