Skip to main content
POST
https://zeus.agentspro.cn
/
api
/
auth
/
api-token
curl --request POST \
  --url https://zeus.agentspro.cn/api/auth/api-token \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "[email protected]",
    "password": "your-password"
  }'
{
  "token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6Inh4eCJ9...",
  "user": {
    "id": "user_abc123",
    "email": "[email protected]",
    "name": "Frank"
  },
  "expires_in": "30d"
}
Obtain a JWT Token directly using email and password, without going through the browser login flow. The token can be used to call any authenticated API on the AI Backend.

Use Cases

  • CLI tools calling the Agent API
  • Third-party system integrations
  • Postman / cURL debugging
  • Automation scripts

Authentication Flow

This endpoint is served by the Next.js web layer (not the AI Backend), because JWT issuance relies on Better Auth.
email
string
required
Registered email address
password
string
required
Password
token
string
JWT Token (valid for 30 days). Usage: Authorization: Bearer <token>
user
object
User information
expires_in
string
Token validity period: 30d
curl --request POST \
  --url https://zeus.agentspro.cn/api/auth/api-token \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "[email protected]",
    "password": "your-password"
  }'
{
  "token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCIsImtpZCI6Inh4eCJ9...",
  "user": {
    "id": "user_abc123",
    "email": "[email protected]",
    "name": "Frank"
  },
  "expires_in": "30d"
}