# Authentication

The Forefront API uses API keys for authentication. Visit your [API Keys](https://forefront.ai/app/api-keys) page to retrieve the API key you'll use in your requests.

All API requests should include your API key in an `Authorization` HTTP header as follows:

```
Authorization: Bearer FOREFRONT_API_KEY
```

Alternatively, instantiate your API key with the Python or Node.js package:

{% tabs %}
{% tab title="Python" %}

```python
from Forefront import forefront

client = ForefrontClient(api_key='FOREFRONT_API_KEY')
```

{% endtab %}

{% tab title="Node.js" %}

```typescript
import Forefront from "forefront"

const client = new Forefront("<YOUR API KEY>");
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Remember that your API key is a secret!** Do not share it with others or expose it in any client-side code (browsers or apps). Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.
{% endhint %}


---

# Agent Instructions: 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.forefront.ai/api-reference/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.
