> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loova.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

All Loova API requests require Bearer token authentication.

## Authorization Header

Include your API key in the `Authorization` header:

```http theme={null}
Authorization: Bearer <api_key>
```

## Where to Get Your API Key

Go to the Loova API Dashboard:

[https://loova.ai/api](https://loova.ai/api)

After signing up, you can create and manage your API key there.

## Example Request

```bash theme={null}
curl -X GET "https://api.loova.ai/api/v1/tasks?task_id=<record_id>" \
  -H "Authorization: Bearer <api_key>"
```

## Common Authentication Errors

Authentication may fail if:

* the `Authorization` header is missing
* the API key is invalid
* the API key has been deleted or rotated

When a request fails, the API returns the standard response envelope:

```json theme={null}
{
  "code": 401,
  "trace_id": "trace_xxx",
  "message": "Authentication failed",
  "data": null
}
```

## Security Best Practices

* Keep your API key private
* Do not expose your API key in client-side code
* Do not commit your API key to public repositories
* Rotate your API key if you suspect it has been leaked
* Store your API key in a secure server-side environment variable whenever possible
