> ## 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.

# 发现 PIN 训练能力与配额

> 返回当前用户可用的模型目录、训练方法、LoRA 选项、导出格式、配额、余额与定价提示。

`GET /v1/capabilities` 返回当前鉴权用户的能力发现快照：允许的基座模型、训练方法、LoRA 方法、导出格式、目标模块、配额用量、钱包余额，以及含自动干预开关的定价提示。

## 方法与路径

```http theme={null}
GET /v1/capabilities
```

## 认证

```http theme={null}
Authorization: Bearer <jwt-or-api-key>
```

## 响应

标准 PIN 信封。`data` 字段：

<ResponseField name="models" type="array of strings">
  服务端配置的基座模型白名单。
</ResponseField>

<ResponseField name="methods" type="array of strings">
  支持的任务类型（例如 `sft`、`opd`、`grpo`、`dpo`、`pretrain`、`distill`、`qat` 等）。
</ResponseField>

<ResponseField name="lora_methods" type="array of strings">
  LoRA 方法白名单（`lora`、`qlora`、`dora`、`none`）。
</ResponseField>

<ResponseField name="export_formats" type="array of strings">
  导出格式（`gguf`、`mlx`、`mnn`、`qnn`）。
</ResponseField>

<ResponseField name="target_modules" type="array of strings">
  允许的 LoRA 目标模块名。
</ResponseField>

<ResponseField name="quota" type="object">
  当前用户的 `total` / `used` 令牌配额。
</ResponseField>

<ResponseField name="balance" type="number">
  钱包余额。
</ResponseField>

<ResponseField name="pricing" type="object">
  `gpu_hour_usd`、`token_per_m_usd`，以及 `auto_intervention`（`enabled`、`conditions`）。
</ResponseField>

## 示例

```bash theme={null}
curl -s http://localhost:8001/v1/capabilities \
  -H "Authorization: Bearer $PIN_API_TOKEN"
```

```json theme={null}
{
  "code": 0,
  "data": {
    "models": ["aria/AFM-2.6B", "LiquidAI/LFM2-2.6B"],
    "methods": ["sft", "opd", "grpo", "dpo", "kto", "orpo", "simpo", "ppo", "pretrain", "distill", "qat"],
    "lora_methods": ["lora", "qlora", "dora", "none"],
    "export_formats": ["gguf", "mlx", "mnn", "qnn"],
    "quota": { "total": 1000000000, "used": 0 },
    "balance": 0,
    "pricing": {
      "gpu_hour_usd": 1.2,
      "token_per_m_usd": 0.1,
      "auto_intervention": {
        "enabled": true,
        "conditions": ["spike", "drop", "kl_explode", "len_surge", "repeat_up"]
      }
    }
  },
  "message": ""
}
```
