> For the complete documentation index, see [llms.txt](https://cider.gitbook.io/welcome-to-gitbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cider.gitbook.io/welcome-to-gitbook/docs/3.legacy-docs/3.legacy-plugins/client-rest-api.md).

# REST API

Cider offers a simple REST API to remotely control the app.

URL: <http://localhost:9000/api/>

## Endpoints

{% tabs %}
{% tab title="/playback" %}

| Endpoint     | Description                               |
| ------------ | ----------------------------------------- |
| /playpause   | Toggle between play and pause             |
| /play        | Play                                      |
| /pause       | Pause                                     |
| /stop        | Stop the current song                     |
| /next        | Skip to the next song in the queue        |
| /previous    | Go back to the previous song in the queue |
| {% endtab %} |                                           |

{% tab title="/musickit" %}

| Endpoint      | Method | Description                                                                                                                                                                                        | Usage                                                                                         |
| ------------- | :----: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| /v3           |  POST  | <p>Access the MusicKit instance and use the v3 API routes<br><a href="https://developer.apple.com/documentation/applemusicapi/"><https://developer.apple.com/documentation/applemusicapi/></a></p> | <p>Takes 3 parameters.<br><code>route</code><br><code>body</code><br><code>options</code></p> |
|               |        |                                                                                                                                                                                                    |                                                                                               |
|               |        |                                                                                                                                                                                                    |                                                                                               |
|               |        |                                                                                                                                                                                                    |                                                                                               |
|               |        |                                                                                                                                                                                                    |                                                                                               |
| {% endtab %}  |        |                                                                                                                                                                                                    |                                                                                               |
| {% endtabs %} |        |                                                                                                                                                                                                    |                                                                                               |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cider.gitbook.io/welcome-to-gitbook/docs/3.legacy-docs/3.legacy-plugins/client-rest-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
