> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /api/auth/register/phone — 使用手机号注册账户

> 使用手机号、密码与短信 OTP 创建咏唱引擎账户。需先调用 POST /api/auth/phone/send-otp 获取验证码。

使用手机号、密码与短信 OTP 码创建咏唱引擎账户。请先调用 `POST /api/auth/phone/send-otp` 将验证码发送到手机。

**方法：** `POST` **路径：** `/api/auth/register/phone` **认证：** 无

## 请求

<ParamField body="phone" type="string" required>
  E.164 格式的手机号（例如 `+8613800138000`）。
</ParamField>

<ParamField body="password" type="string" required>
  账户密码。
</ParamField>

<ParamField body="code" type="string" required>
  来自 `POST /api/auth/phone/send-otp` 的短信 OTP。
</ParamField>

<ParamField body="name" type="string">
  可选的显示名称。
</ParamField>

## 响应

<ResponseField name="token" type="string">
  会话 JWT。
</ResponseField>

<ResponseField name="user" type="object">
  新用户档案。
</ResponseField>

## 示例

```bash theme={null}
curl -X POST https://ariacompute.cn/api/auth/register/phone \
  -H "Content-Type: application/json" \
  -d '{"phone": "+8613800138000", "password": "...", "code": "123456"}'
```

## 错误

| 状态    | 含义          |
| ----- | ----------- |
| `400` | 缺失字段。       |
| `401` | OTP 无效或已过期。 |
| `409` | 手机号已注册。     |
| `429` | 尝试过多。       |
