> ## 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 /v1/auth/register：PIN 用户注册

> 在咏唱引擎 PIN 服务上注册新用户。需要唯一的用户名、邮箱以及至少 6 位的密码。

使用用户名、邮箱与密码创建新的 PIN 用户账户。用户名在整个服务中必须唯一。注册后，使用 `/v1/auth/login` 获取会话令牌。

## 接口

**POST** `/v1/auth/register`

认证：无

## 请求体

<ParamField body="username" type="string" required>
  期望的用户名。必须唯一。
</ParamField>

<ParamField body="email" type="string" required>
  用户的邮箱地址。
</ParamField>

<ParamField body="password" type="string" required>
  密码，最小长度为 6 个字符。
</ParamField>

## 响应

<ResponseField name="id" type="string">
  新创建用户的唯一标识符。
</ResponseField>

## 示例

```bash theme={null}
curl -X POST http://localhost:8001/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"username":"alice","email":"alice@example.com","password":"secret123"}'
```

```json theme={null}
{
  "id": "usr_2vPqN9xL5wR8"
}
```

如果用户名为已被占用，接口返回 `409 Conflict`：

```json theme={null}
{
  "error": "conflict",
  "detail": "username already exists"
}
```
