POST向https://stablediffusionapi.com/api/v1/enterprise/update_s3端点发送请求。您必须传递下面列出的请求正文参数才能更新 S3 详细信息。信息 您可以使用任何 S3 兼容服务,例如 Cloudflare R2、Digital Ocean Spaces、AWS S3、Google Cloud Storage、Alibaba OSS、Backblaze 等。
危险 您需要在 S3 存储桶上提供 PutObjectAcl。否则您将无法将图像上传到 S3 存储桶。以下是 stackoverflow 的链接,了解如何执行此操作: https://stackoverflow.com/questions/36272286/getting-access-denied-when-calling-the-putobject-operation-with-bucket-level-per
curl --location --request POST 'https://stablediffusionapi.com/api/v1/enterprise/update_s3' \
--header 'Content-Type: application/json' \
--data-raw '{
"key": "enterprise_api_key",
"public_url": "https://d1okzptojspljx.cloudfront.net/generations/",
"region_name": "us-east-1",
"endpoint_url": "https://stable-diffusion-api.s3.amazonaws.com",
"aws_access_key_id": "access-key",
"aws_secret_access_key": "secret-key",
"image_directory": "generations"
}'{
"Version": "string",
"Statement": [
{
"Sid": "string",
"Effect": "string",
"Action": [
"string"
],
"Resource": [
"string"
]
}
]
}