> For the complete documentation index, see [llms.txt](https://docs.castmagic.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.castmagic.io/authentication.md).

# Authentication

Generate a new API secret in your [Castmagic developer dashboard](https://app.castmagic.io/developer). If you don't have a developer dashboard, reach out to <justin@castmagic.io> for access.

Once you have an API secret, include it with an Authorization header in each request:

```
Authorization: Bearer API_SECRET
```

Keep your API secret safe! You can generate as many as you would like, however we're unable to reveal your secret again once it has been generated.


---

# 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:

```
GET https://docs.castmagic.io/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
