> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelslab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update S3 Details

> This endpoint is used to update the S3 details on your dedicated server.

<Info>
  **You can use any S3 compatible service like Cloudflare R2, Digital Ocean Spaces, AWS S3, Google Cloud Storage, Alibaba OSS, Backblaze, etc.**
</Info>

<Warning>
  You need to give PutObjectAcl on S3 bucket. Else you won't be able to upload images to S3 bucket.
</Warning>

<Tip>
  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`
</Tip>

## Request

Send a `POST` request to below endpoint. You have to pass the below listed request body parameters to update the S3 details.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v1/enterprise/update_s3' \
```

## Body

```json json theme={null}
{  
  "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 json theme={null}
{  
  "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

<ParamField body="key" type="string" required>
  Your enterprise API Key of the particular server deploy type you want to add S3 details for.
</ParamField>

<ParamField body="deploy_type" 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`, `qwen`, `qwen_tts`, `flux_kontext_dev`, `image_to_video_ultra`, `z_image_turbo`. Default: `text_to_image`.
</ParamField>

<ParamField body="public_url" type="string" required>
  A public URL on which images can be accessed. Ensure your bucket is publicly accessible.
</ParamField>

<ParamField body="region_name" type="string" required>
  S3 region name.
</ParamField>

<ParamField body="endpoint_url" type="string" required>
  S3 endpoint URL.
</ParamField>

<ParamField body="aws_access_key_id" type="string" required>
  S3 bucket access key.
</ParamField>

<ParamField body="aws_secret_access_key" type="string" required>
  S3 bucket secret key.
</ParamField>

<ParamField body="image_directory" type="string" required>
  Directory inside the S3 bucket to store images (e.g., `generations`). Ensure it is publicly accessible to access images via direct links.
</ParamField>
