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

# 将训练好的模型版本接纳为生产版本

> 记录对某个模型版本的生产接纳，用于生产部署。写入一份接纳报告并将其登记在模型产物之下。

使用此接口正式将训练好的模型接纳到生产环境。系统会在模型产物旁写入一份接纳报告 JSON，并将路径登记在 `artifact_paths.acceptance` 下。你可以在报告中包含额外字段，例如 SKU 与 KV 缓存设置。

## 方法与路径

```http theme={null}
POST /v1/models/:id/accept
```

## 认证

在 `Authorization` 头中以 Bearer 令牌的形式携带你的 PIN API 令牌或 JWT。

```http theme={null}
Authorization: Bearer <token>
```

## 路径参数

<ParamField path="id" type="string" required>
  模型标识符（例如 `md_abc123def456`）。
</ParamField>

## 请求体

<ParamField body="sku" type="string" optional>
  模型 SKU 标识符。若省略，默认为基座模型名称。
</ParamField>

<ParamField body="kv_cache" type="string" optional>
  KV 缓存量化模式。若省略，默认为 `int8`。
</ParamField>

<ParamField body="..." type="any" optional>
  额外的报告字段原样持久化。
</ParamField>

### 请求体示例

```json theme={null}
{
  "sku": "custom-llama-8b-v3",
  "kv_cache": "int8",
  "eval_passed": true,
  "notes": "Approved after human review"
}
```

## 请求示例

<CodeGroup>
  ```bash curl theme={null}
  curl -s -X POST "https://api.ariacompute.com/v1/models/md_abc123def456/accept" \
    -H "Authorization: Bearer $PIN_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "sku": "custom-llama-8b-v3",
      "kv_cache": "int8",
      "eval_passed": true
    }'
  ```
</CodeGroup>

## 响应

返回标准的 PIN 成功信封，包含接纳结果。

<ResponseField name="code" type="integer" required>
  成功为 `0`，出错为非零值。
</ResponseField>

<ResponseField name="data" type="object" required>
  <Expandable title="属性">
    <ResponseField name="acceptance_path" type="string">
      所写入接纳报告的文件系统路径。
    </ResponseField>

    <ResponseField name="status" type="string">
      成功时恒为 `recorded`。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="message" type="string">
  可读消息（成功时为空）。
</ResponseField>

### 响应示例

```json theme={null}
{
  "code": 0,
  "data": {
    "acceptance_path": "/storage/md_abc123def456/acceptance.json",
    "status": "recorded"
  },
  "message": ""
}
```

## 错误

| Code | HTTP | 含义                |
| ---- | ---- | ----------------- |
| 401  | 401  | 缺失或无效的 Bearer 令牌。 |
| 404  | 404  | 模型不存在或不属于你。       |
| 500  | 500  | 内部服务器错误。          |
