Authentication Methods
The project has three access methods at the same time: API Key authentication, native-compatible authentication headers, and browser login session state. First, distinguish whether you are accessing a relay route or a/api/* admin route.
Bearer Token
Used for most relay routes, including:/v1/*/v1beta/*/mj/*/suno/*/kling/v1/*/dashboard/billing/*
Claude Native-Compatible Headers
Used forPOST /v1/messages and other pages in Claude native format:
Gemini Native-Compatible Headers
Used forGET /v1beta/models and POST /v1beta/models/{model}:{action}:
?key=YOUR_API_KEY.
User Login Session State
Used for/api/user/*, backend management, and some frontend dashboard APIs. Typical characteristics:
- Authentication is controlled by middlewares such as
UserAuth,AdminAuth, andRootAuth. - On failure, many APIs still return HTTP
200, butsuccessisfalse.
OAuth Browser Flow
1. Generate state
2. Redirect to the standard OAuth provider
state, fetch user information, bind or create an account, and then establish a login session state.
Common provider values are determined by the OAuth configurations actually enabled, for example:
githubdiscordoidclinuxdo