> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.aegi.run/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.aegi.run/_mcp/server.

# Current fading setup

GET https://api.aegi.run/v1/music/guilds/{guildId}/fading

Reference: https://docs.aegi.run/api-reference/aegis/music/current-fading-setup

## Authentication

- `Authorization` header (bearer token, required) — Create a key at [https://aegi.run](https://aegi.run), then send it as `Authorization: Bearer aegis.<key>`.

## Request

### Path parameters

- `guildId` (string, required)

## Response

### 200

The fading setup.

- `data` (FadingResult, required)

## Errors

### 403 Forbidden Error

The API key is not linked to a bot.

- `error` (ErrorResponseError, required)
- `requestId` (string, optional)

### 404 Not Found Error

No player in that guild.

- `error` (ErrorResponseError, required)
- `requestId` (string, optional)

### 409 Conflict Error

Conflicts with the current player state.

- `error` (ErrorResponseError, required)
- `requestId` (string, optional)

### 422 Unprocessable Entity Error

The request cannot be carried out as given.

- `error` (ErrorResponseError, required)
- `requestId` (string, optional)

### 503 Service Unavailable Error

The music workers are unavailable or timed out.

- `error` (ErrorResponseError, required)
- `requestId` (string, optional)

## Types

### FadingResult

- `fading` (Fading, required)

### ErrorResponseError

- `code` (enum, required)
  - Allowed values: `bad_request`, `unauthorized`, `invalid_api_key`, `api_key_revoked`, `forbidden`, `player_limit`, `not_found`, `method_not_allowed`, `conflict`, `validation_error`, `rate_limited`, `internal_error`, `service_unavailable`
- `message` (string, required)
- `details` (any, optional, nullable)

### Fading

- `enabled` (boolean, required)
- `trackStart` (FadingTrackStart, optional) — Fade in as a track begins.
- `trackEnd` (FadingTrackEnd, optional) — Fade out as a track ends.
- `trackStop` (FadingTrackStop, optional) — Fade out when playback stops.
- `seek` (FadingSeek, optional) — Fade out and back in around a seek.
- `ducking` (FadingDucking, optional) — Duck while a mix layer plays.

### FadingTrackStart

Fade in as a track begins.

- `duration` (integer, required) — Length of the ramp, in milliseconds.
- `curve` (enum, required)
  - Allowed values: `linear`, `exponential`, `logarithmic`, `s-curve`

### FadingTrackEnd

Fade out as a track ends.

- `duration` (integer, required) — Length of the ramp, in milliseconds.
- `curve` (enum, required)
  - Allowed values: `linear`, `exponential`, `logarithmic`, `s-curve`

### FadingTrackStop

Fade out when playback stops.

- `duration` (integer, required) — Length of the ramp, in milliseconds.
- `curve` (enum, required)
  - Allowed values: `linear`, `exponential`, `logarithmic`, `s-curve`

### FadingSeek

Fade out and back in around a seek.

- `duration` (integer, required) — Length of the ramp, in milliseconds.
- `curve` (enum, required)
  - Allowed values: `linear`, `exponential`, `logarithmic`, `s-curve`

### FadingDucking

Duck while a mix layer plays.

- `duration` (integer, required) — Length of the ramp, in milliseconds.
- `curve` (enum, required)
  - Allowed values: `linear`, `exponential`, `logarithmic`, `s-curve`

## Examples

**Response**

```json
{
  "data": {
    "fading": {
      "enabled": true,
      "trackStart": {
        "duration": 1500,
        "curve": "s-curve"
      },
      "trackEnd": {
        "duration": 1500,
        "curve": "s-curve"
      },
      "trackStop": {
        "duration": 1500,
        "curve": "s-curve"
      },
      "seek": {
        "duration": 1500,
        "curve": "s-curve"
      },
      "ducking": {
        "duration": 1500,
        "curve": "s-curve"
      }
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.aegi.run/v1/music/guilds/123456789012345678/fading"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.aegi.run/v1/music/guilds/123456789012345678/fading';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.aegi.run/v1/music/guilds/123456789012345678/fading"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.aegi.run/v1/music/guilds/123456789012345678/fading")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.aegi.run/v1/music/guilds/123456789012345678/fading")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.aegi.run/v1/music/guilds/123456789012345678/fading', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.aegi.run/v1/music/guilds/123456789012345678/fading");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.aegi.run/v1/music/guilds/123456789012345678/fading")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```