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

# API Introduction

<Columns cols={1}>
  Interact with Ducky Radio and control compatible providers via HTTP.

  Continue reading for an introduction to the Ducky Radio API
</Columns>

<hr />

## Authentication

##### There no authentication required. Ducky Radio is designed to run and be accessed locally.

Although no tokens or API keys are required, all `POST` endpoints require a specific header to be set to an arbitrary value, outlined in the documentation for each endpoint.

## Connection Info

##### Ducky Radio runs on port `1234` by default

Once running, the API can be accessed at [`http://localhost:1234/api`](http://localhost:1234/api)

## Sending your First Request

##### Once Ducky Radio is running, you can test the API's functionality with a simple GET request.

<Steps>
  <Step title="Play Music">
    Play a song using the connected provider of your choice. If you can view the ducky radio logs, wait for the `newTrack` event to be fired before continuing.
  </Step>

  <Step title="Send GET Request">
    Run the following command in the terminal of your choice

    ```bash theme={null}
    curl --request GET \
    --url http://localhost:1234/api/tracks/nowplaying
    ```

    <RequestExample dropdown>
      ```bash theme={null}
      curl --request GET \
      --url http://localhost:1234/api/tracks/nowplaying
      ```

      ```js theme={null}
      const requestOptions = {
          method: "GET",
          redirect: "follow"
      };

      fetch("http://localhost:1234/api/tracks/nowplaying", requestOptions)
          .then((response) => response.json())
          .then((result) => result.data ? console.log(result.data) : console.error(result.error))
          .catch((error) => console.error(error));

      ```
    </RequestExample>
  </Step>

  <Step title="😎 Observe">
    You should receive a JSON response. It will either be a [Track](types/track) object, or an object with an `error` string.

    [See Endpoint Documentation](endpoint/get/current_track)
  </Step>
</Steps>

<hr />

## Next Steps

Once you've got the API up and running, continue to the [Endpoints](endpoint) section to learn about all of the ways to interact with Ducky Radio over HTTP

<Card title="API Endpoints" icon="webhook" href="endpoint" cta="Explore API Endpoints" />
