Newapi uses a multi-level authentication system. The method you use depends on which API category you are calling.Documentation Index
Fetch the complete documentation index at: https://doc.hitopen.com/llms.txt
Use this file to discover all available pages before exploring further.
AI Model API authentication
All AI Model API endpoints (/v1/chat/completions, /v1/embeddings, etc.) authenticate with a Bearer token that starts with sk-. You create these tokens in Token Management in the Newapi console.
Include your token in the Authorization header of every request:
AI Model API tokens always start with
sk-. Do not use a system access token for these endpoints.Management API authentication
Management API endpoints (/api/...) support two authentication methods. Choose one.
- Access token (recommended)
Generate a system access token from Personal Settings → Security Settings → System Access Tokens in the console. Pass it as a Bearer token in every request:Example — list tokens:
New-Api-User header
Some management endpoints require you to identify the acting user by including their user ID in the request:user_id must match the account that is currently authenticated. Endpoint reference pages indicate when this header is required.
Permission levels
Management API endpoints are protected by one of four permission levels:| Level | Description |
|---|---|
| Public | No authentication required |
| User | Requires a valid session or access token |
| Admin | Requires administrator privileges |
| Root | Highest privilege level; reserved for system-level operations |