# IP 管理

本页讲 ISP IP 的运营生命周期：替换失效 IP、刷新批次、延长计费周期、释放不再使用的 IP。

## 替换失效 IP

某 IP 被特定目标站点降权（例如 Cloudflare 信誉下降）时常发生。helodata 的策略：

* **购买后前 14 天**：免费替换，无需理由。
* **14 天后**：每个计费周期可免费替换至**批次总量的 10%**，超过部分按单 IP 价格计费。

替换方法：

1. **控制台 → ISP → 我的 IP → {批次}** — 点击行上的 **替换** 按钮。
2. 选择原因（可选，但有助于我们改进池子质量）。
3. 新 IP 1–5 分钟内交付，失效 IP 立即释放。

API：

```bash
curl -X POST \
     -H "Authorization: Bearer API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"reason": "target-blocked"}' \
     "https://api.helodata.com/v1/isp/ips/{ip_id}/replace"
```

## 整批刷新

若批次中大量 IP 对某目标已不可用，可申请**批次刷新**——一次性替换所有 IP。此操作占用整批的 14 天额度，请谨慎使用：

```bash
curl -X POST -H "Authorization: Bearer API_KEY" \
     "https://api.helodata.com/v1/isp/batches/{batch_id}/refresh"
```

每个批次每个计费周期可调用一次。

## 续费

若已绑定支付方式且余额充足，订阅在计费周期末自动续费。未开自动续费时：

* 到期前 7 天：警示邮件
* 到期前 3 天：二次警示
* 到期：IP 不可达；批次进入 7 天宽限期，期内续费可恢复原 IP
* 宽限期结束：IP 回收至池子并分配给其他客户

手动续费：

**控制台 → ISP → 我的 IP → {批次} → 续费**

或 API：

```bash
curl -X POST -H "Authorization: Bearer API_KEY" \
     -d '{"months": 1}' \
     "https://api.helodata.com/v1/isp/batches/{batch_id}/renew"
```

## 释放 IP

不再需要时：

1. **控制台 → ISP → 我的 IP → {批次} → 释放** — 释放整批
2. **逐 IP 释放** — 点击单行的垃圾桶图标（批次保留其余 IP）

**期内释放不退款**，IP 立即从你的账号中移除并回到库存池。

## 子账号间转移 IP

ISP IP 归属于**账号**，而非具体子账号。重新分配方法：

1. **控制台 → ISP → 我的 IP → {批次} → 设置 → 子账号** — 选另一子账号
2. 重新下载清单——密码变为新子账号的密码，IP+端口不变

适合团队重组或工作负载迁移时使用。

## 批次健康监测

控制台对每个批次给出健康评分，基于：

* 近期各 IP 错误率
* 替换次数
* 并发连接峰值
* 上次成功请求距今时长

健康 < 80 会触发告警（**控制台 → 告警** 可配置）。连续多个计费周期低分通常意味着工作负载已让批次过载——考虑加买 IP。

## API 速查

| 操作       | 端点                                  |
| -------- | ----------------------------------- |
| 列出批次     | `GET /v1/isp/batches`               |
| 列出批次中 IP | `GET /v1/isp/batches/{id}/ips`      |
| 替换单 IP   | `POST /v1/isp/ips/{id}/replace`     |
| 整批刷新     | `POST /v1/isp/batches/{id}/refresh` |
| 续费       | `POST /v1/isp/batches/{id}/renew`   |
| 释放       | `DELETE /v1/isp/batches/{id}`       |

完整 schema 见 [订单 API](/helodata-zh/api-can-kao/orders.md)。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.helodata.com/helodata-zh/chan-pin/overview-2/ip-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
