# auth.md

LumixAI supports agent access to the generation API with server-side API keys.

## Audience

AI agents, developer tools, automation systems, and backend services that need to discover LumixAI models, create image or video generation jobs, poll job status, and download generated media.

## Registration

- Human registration page: https://lumixai.live/register
- API documentation: https://lumixai.live/docs
- Protected resource metadata: https://lumixai.live/.well-known/oauth-protected-resource
- Authorization metadata: https://lumixai.live/.well-known/oauth-authorization-server

## Credential Type

Use an API key created in the LumixAI dashboard. The raw key is shown once and should be stored server-side.

Send the key on protected API calls:

```http
X-API-Key: YOUR_LUMIXAI_API_KEY
```

## Public Discovery Endpoints

These endpoints do not require authentication:

- GET http://api:8080/v1/models
- GET http://api:8080/v1/models/catalog
- GET http://api:8080/v1/models/credits/catalog
- GET http://api:8080/v1/videos/models

## Protected Endpoints

These endpoints require X-API-Key:

- POST http://api:8080/v1/images/jobs
- GET http://api:8080/v1/images/jobs/{id}
- GET http://api:8080/v1/images/results/{id}/download
- POST http://api:8080/v1/videos/jobs
- GET http://api:8080/v1/videos/jobs/{id}
- GET http://api:8080/v1/videos/results/{id}/download
- POST http://api:8080/v1/images/quote
- POST http://api:8080/v1/videos/quote

## Security Notes

Do not expose X-API-Key in browser code. Agents should call LumixAI from a server-side runtime or a secure local tool environment.
