上传图片
POST
https://stablediffusionapi.com/api/v1/enterprise/upload_image企业上传图像端点将图像上传到您的 S3 存储桶。
信息
您应该拥有自己的 S3 存储桶才能使用此端点。
**使用此端点**更新您的 S3 存储桶详细信息。
POST
向 https://stablediffusionapi.com/api/v1/enterprise/upload_image 接口发送请求。
笔记
确保您以base64格式传递图像。
请求参数
Body 参数application/json
key
string
必需
您的企业API Key用于请求授权。
base64_image
string
必需
待上传图片的base64字符串。
image_type
string
必需
图像的扩展名或类型;选项:png、jpeg、jpg
示例
{
"key": "enterprise_api_key",
"base64_image": "iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAABe1JREFUaIHdms9PVFcUxz/zA2YhFRAUQVjVH1EXVBFIEBxNq2n/BKMB2RgDahCCCxOX/gG17YYfUVmYxh9VlCC1QcFGg4mKdmGi/ZGgLkQYQKogkJnbxZkH782bx7w3zDBtT3Iyc+fec+75zrv33HPOfS4SQx5gO7An/LkJWA9kRIz7APwBvAAeA33AEyCYIDvipjLge2AUUHHyaFhH6TLbDsA3wK92DM3OFrYzFrgH7FsOABuBX6IZUVSEqqlBtbejBgZQ4+MopYw8NiZ9bW2o6mrUunWWgHqADckA4AKagE/6CX0+VG0t6t49VChkNjwWh0Kovj7UoUOo9HQTmE9AQ3juhFAmcEM/ideLOnoU9eaNc+Ot+PVrVH296I4AdB1YuVQQa4FBveLyctSzZ4kDEMlPn6JKS01gHgN5SwHxu6bM5UI1N6NmZ5MHQuPZWVRjo8ypA/MyHjArEf+uAOXxyCZONoBI7uhApaUZwPwGZNkF4QJuasJpaajOzuUHofG1a6Z9cx2bDqAJ3XLq6EgdCI3PnTMtsxOxQGxA52JPnkw9CI0bG02uedNiQOYPu/Ly5dnYdnl21uTNfrYC8bU2yOtNrouNlwcHxfHowEQNZ+Zjp2PHUm+0FdfVGYD0R4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De8XPkGN/3te3ti4/iAsXTCAeYX4JISblIddd88usqWl5HMDMjOyJiOX0AqlhxUV5+icDqLIyqYonC8STJybvpD2JuEFotBLdniG8b+rqnEcAi/HQkBx2EdcGCviJOJaTFbmQ6y7DCwPp6VKdvHt38UDRioNBCVGqq6O+MDCNeKekJN8b0B2aes7PlzJmayvqwYPoJdDRUelraUEdOIBau9YyjOlGzrSk017kFaWYcVVWlrCdsUjs9OVyAIikEiSMHrZpaDQeDuswRbFOKFHrz42U9vcgGedG4HPkPRY9vUcKBdqLZ3eAZ0hJakn0DwRcaPWWv+9kAAAAAElFTkSuQmCC",
"image_type": "png"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
status
string
必需
message
string
必需
image_url
string
必需
示例
{
"status": "success",
"message": "image uploaded",
"image_url": "https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/2789658481681896990.png"
}
最后修改时间: 1 年前