You can use any S3 compatible service like Cloudflare R2, Digital Ocean Spaces, AWS S3, Google Cloud Storage, Alibaba OSS, Backblaze, etc.
You need to give PutObjectAcl on S3 bucket. Else you won’t be able to upload images to S3 bucket.
Here is link to stackoverflow on how to do it: https://stackoverflow.com/questions/36272286/getting-access-denied-when-calling-the-putobject-operation-with-bucket-level-per

Request

Send a POST request to below endpoint. You have to pass the below listed request body parameters to update the S3 details.
curl
--request POST 'https://modelslab.com/api/v1/enterprise/update_s3' \

Body

json
{  
  "key": "enterprise_api_key",  
  "deploy_type": "text_to_image",  
  "public_url": "https://cdn2.stablediffusionapi.com/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"
}

Google Cloud Example

json
{  
  "key": "enterprise_api_key",  
  "deploy_type": "text_to_image",  
  "public_url": "https://cdn2.stablediffusionapi.com/generations/",  
  "region_name": "US-CENTRAL1",  
  "endpoint_url": "https://storage.googleapis.com",  
  "aws_access_key_id": "access-key",  
  "aws_secret_access_key": "secret-key",  
  "image_directory": "generations"
}

Body Attributes

key
string
required
Your enterprise API Key of the particular server deploy type you want to add S3 details for.
deploy_type
string
This is the server type you want to add the S3 details for. Options: text_to_image, image_editing, voice_cloning, text_to_3d, video, face_gen, deepfake, realtime, super_resolution, flux, flux_headshot, interior. Default: text_to_image.
public_url
string
required
A public URL on which images can be accessed. Ensure your bucket is publicly accessible.
region_name
string
required
S3 region name.
endpoint_url
string
required
S3 endpoint URL.
aws_access_key_id
string
required
S3 bucket access key.
aws_secret_access_key
string
required
S3 bucket secret key.
image_directory
string
required
Directory inside the S3 bucket to store images (e.g., generations). Ensure it is publicly accessible to access images via direct links.