跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.llmgenerator.com/llms.txt

Use this file to discover all available pages before exploring further.

POST /auth/register

用于创建新用户账户。此为公开接口,无需认证。注册成功后会向用户发送验证邮件。

请求体

email
string
必填
用户邮箱,须为合法且唯一的邮箱地址。
password
string
必填
用户密码,至少 8 位,并满足强度要求。
firstName
string
必填
名字,最多 50 个字符。
lastName
string
姓氏,最多 50 个字符。
company
string
公司名称,最多 100 个字符。

响应

success
boolean
注册是否成功。
message
string
可读的状态说明。
user
object
新创建用户的信息。
tokens
object
鉴权令牌对象。
curl -X POST https://api.llmgenerator.com/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
        "email": "user@example.com",
        "password": "securePassword123!",
        "firstName": "John",
        "lastName": "Doe",
        "company": "Acme Inc"
      }'
{
  "success": true,
  "message": "Account created successfully",
  "user": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "user@example.com",
    "name": "John Doe",
    "emailVerified": false,
    "createdAt": "2026-01-29T12:00:00.000Z"
  },
  "tokens": {
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "expiresIn": 900,
    "tokenType": "Bearer"
  }
}