EggAPI has two authentication modes in the product:Documentation Index
Fetch the complete documentation index at: https://docs.eggapi.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
- Public server-to-server API calls use API keys.
- The website dashboard and admin tools use Better Auth session cookies.
API Key Header
Send your key as a Bearer token on every public API request:Bearer <token>, the key is inactive or expired, or the owning user is not active.
Creating Keys
Create and manage API keys from the EggAPI dashboard. API key creation is a dashboard session action; do not call it from backend jobs or customer-facing clients. When a key is created, store it immediately. Treat it like a password and only use it from server-side code.Which Endpoints Accept API Keys
Generation
POST /v1/generate accepts API keys and also supports session auth for dashboard playground use.Tasks
GET /v1/tasks/{id} and GET /v1/tasks accept API keys and session auth.Usage
GET /v1/usage and GET /v1/usage/summary require API key authentication.Dashboard
API key management, account balance, and webhook secret management use browser sessions.
Security Practices
- Keep API keys on your server. Do not expose them in frontend JavaScript, mobile apps, public repositories, or logs.
- Use separate keys for production, staging, and local development.
- Rotate a key if it may have been exposed.
- Prefer a backend endpoint you control when browser users need to trigger EggAPI generation.