> ## 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/login：PIN 用户登录

> 使用用户名与密码认证 PIN 用户，获取 JWT 令牌及过期时间戳。无需 API 密钥。

使用此接口认证用户并获取短期 JWT 令牌。返回的令牌可用于基于会话的请求，但 PIN API 主要依赖 API 密钥进行集成访问。

## 接口

**POST** `/v1/auth/login`

认证：无

## 请求体

<ParamField body="username" type="string" required>
  用户注册的用户名。
</ParamField>

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

## 响应

<ResponseField name="token" type="string">
  本次会话的 JWT 令牌。
</ResponseField>

<ResponseField name="expires_at" type="string">
  令牌过期的 ISO 8601 时间戳。
</ResponseField>

## 示例

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

```json theme={null}
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_at": "2025-02-10T14:30:00Z"
}
```
