> For the complete documentation index, see [llms.txt](https://cosmo.atomatrix.gg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cosmo.atomatrix.gg/api/overview.md).

# Overview

## API Access

This section provides guidance on utilizing the Cosmo API. Be advised that in order to access the API, it is necessary to purchase the API Addon from BuiltByBit and follow the instructions for its integration into Cosmo.

## 3rd Party Addons

Developers are welcome to create resources as add-ons for Cosmo that utilize the API. Be sure to make it clear that the resource is a **Cosmo Addon** and requires the **API Addon** to function.

Please refer to [this](/addons/creating-an-addon.md) page to view more information on creating an addon.

## User API

By default, any user can create an API Key and use the User API. If you'd like to restrict API usage to a certain role (specific level, donators, etc.). You can restrict the API command permissions to those roles by going to Server Settings -> Integrations in your Discord Server and clicking on your bot.

Just be aware that once a user creates an API Key, restricting their access to the command will not revoke their API Key. So it's recommended to give access to a permanent role rather than Server Boosters, Patreon Supporters, etc.

## Endpoints

View all the endpoints available in the Cosmo API on the dedicated page:

{% content-ref url="/pages/nU2eTpHxakoZxjxX3L0H" %}
[Endpoints](/api/endpoints.md)
{% endcontent-ref %}

## Errors

When any response other than **200** or **201** is returned. The error is described in the message under the **error** key. Example:

```json
{"error": "This is a description of the error you just received"}
```


---

# 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://cosmo.atomatrix.gg/api/overview.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.
