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

# Authentication

You must make all API calls over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). Calls that you make over plain HTTP will fail. API requests without authentication will also fail.

**Where to find API keys**

The ***client\_id\_key*** and ***client\_secret\_key*** are found in the settings page which is accessible from the navigation bar if you have a paid account.

**Public API requests**

Public facing API requests (i.e. called with client-side requests) should have client\_id\_key set in the request headers.

```
client_id_key: 'ae3a42a7-8803-4d49-944a-2dfba8111b5a'
```

**Private API requests**

Private facing API requests (i.e. called within server-side requests) should have client\_id\_key ***and*** client\_secret\_key set in the request headers.

You should never expose the ***client\_secret\_key*** in publicly accessible areas such as GitHub, client-side code, and so forth. You can recycle your keys if you feel you have inadvertently exposed the keys at anytime.

```
client_id_key: 'ae3a42a7-8803-4d49-944a-2dfba8111b5a'
client_secret_key: 'be3b42b7-8803-4d49-944b-2dfbb8111b5b'
```

**Recycling keys**

The client\_id\_key and client\_secret\_key can be recycled in the settings page which is accessible from the navigation bar if you have a paid account. Make sure you update any code that has reference to the old keys to reflect the new keys.


---

# 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://swallow-1.gitbook.io/swallow/developer-api/authentication.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.
