# Authentication

The Perceptis API uses bearer API keys. Create a key in **Developer Settings** in the Perceptis web app, store it securely, and send it on every API request.

Perceptis API access requires a paid Business or Enterprise organization plan. Free, Starter, and trial organizations are not eligible.

## Create an API key

1. Open **Developer Settings** in Perceptis.
2. Create a new API key.
3. Copy the plaintext key when it is shown.
4. Store it in a secret manager or environment variable.

The plaintext key is shown only once. If you lose it, revoke the old key and create a new one.

Keys look similar to:

```
sk-live-per-<random-base64url>
```

Treat the full key as opaque. Do not parse, log, or commit it.

## Authorization header

Send the key as a bearer token:

```http
Authorization: Bearer <your-api-key>
Content-Type: application/json
```

`Content-Type: application/json` is required for `POST /api/v1/generate`.

## Key behavior

* Use the same API key to poll a job that created it.
* Revoked or invalid keys receive `401`.
* If your organization is not eligible for API access, including after a downgrade or trial change, requests receive `403`.
* API usage draws from your organization's credit pool.

## Security practices

* Store keys in a secret manager or environment variable.
* Use separate keys for separate integrations when possible.
* Revoke keys that are no longer needed.
* Rotate keys if you suspect exposure.


---

# 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.perceptis.ai/perceptis-api-v1/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.
