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

# Read S3

> Reads the S3 storage configuration of the instance

**Auth:** `TokenAccount` or `TokenInstance` • **Rate-limit:** `Global` (100/min) • **Idempotent:** yes

## Description

Returns the individual S3 configuration of the instance. The `secretKey` is **never** returned.

## Example

Performs a `GET` on the instance path and returns the `s3` object with the storage configuration. The `secretKey` field is always returned as `null` for security.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://ryzeapi.cloud/api/instance/getS3/my-instance" \
    -H "token: $Token_Instance"
  ```

  ```javascript JavaScript theme={null}
  await fetch("https://ryzeapi.cloud/api/instance/getS3/my-instance", {
    method: "GET",
    headers: {
      "token": process.env.Token_Instance
    }
  });
  ```

  ```python Python theme={null}
  import os, requests

  requests.get(
      "https://ryzeapi.cloud/api/instance/getS3/my-instance",
      headers={
          "token": os.environ["Token_Instance"]
      }
  )
  ```

  ```go Go theme={null}
  package main

  import (
      "net/http"
      "os"
  )

  func main() {
      req, _ := http.NewRequest("GET", "https://ryzeapi.cloud/api/instance/getS3/my-instance", nil)
      req.Header.Set("token", os.Getenv("Token_Instance"))
      http.DefaultClient.Do(req)
  }
  ```
</CodeGroup>

## Success response

<Tabs>
  <Tab title="S3 active">
    ```json 200 OK theme={null}
    {
      "success": true,
      "s3": {
        "enabled": true,
        "region": "us-east-1",
        "bucket": "ryzeapi-media",
        "accessKey": "AKIA...",
        "secretKey": null,
        "endpoint": "",
        "pathPrefix": "media/myinstance/"
      }
    }
    ```
  </Tab>

  <Tab title="S3 disabled">
    ```json 200 OK theme={null}
    {
      "success": true,
      "s3": {
        "enabled": false,
        "region": null,
        "bucket": null,
        "accessKey": null,
        "secretKey": null,
        "endpoint": null,
        "pathPrefix": null
      }
    }
    ```
  </Tab>
</Tabs>

<Note>
  `secretKey` is returned as `null`, the server never returns the secret key in plaintext.
</Note>

## Path parameters

<ParamField path="instance" type="string" required>
  Instance name.
</ParamField>

## Headers

<ParamField header="token" type="string" required>
  TokenAccount or TokenInstance.
</ParamField>

## Errors

| HTTP | `error.message`                         | When                      |
| :--: | --------------------------------------- | ------------------------- |
|  401 | `Invalid token`                         | Token missing or invalid. |
|  404 | `Instance not found`                    | Name does not exist.      |
|  429 | `Rate limit exceeded. Try again later.` | More than 100 req/min.    |
|  500 | `Failed to get S3 configuration`        | Database error.           |

```json theme={null}
{
  "success": false,
  "error": {
    "message": "Instance not found"
  }
}
```

## Notes

<Note>
  An empty (`""`) or `null` `endpoint` indicates official AWS S3; for MinIO, DigitalOcean Spaces, or Backblaze, this field stores the full endpoint URL.
</Note>

## Next

<CardGroup cols={2}>
  <Card title="Update S3" icon="pen-to-square" href="/en/api/instance/s3-update">
    `POST /api/instance/s3/:instance` to change.
  </Card>
</CardGroup>
