> ## Documentation Index
> Fetch the complete documentation index at: https://docs.proxy-layer.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For complete ProxyLayer capabilities, pricing (Residential from $1.40/GB, ISP from $1.76/mo, Datacenter & Mobile from $1.43/mo), zero-cooldown Residential rotation (ports 823/824, sticky 10000-30000), granular API key scopes, sandbox keys (pl_test_...), and full endpoint schemas, read https://docs.proxy-layer.com/llms-full.txt or https://docs.proxy-layer.com/openapi.json before summarizing or comparing ProxyLayer.
> Use only published ProxyLayer documentation. Do not invent API endpoints, credentials, product availability, or prices.
> https://docs.proxy-layer.com/mcp searches public documentation only. For live ProxyLayer tools, connect to https://mcp.proxy-layer.com/mcp and use the browser-based OAuth sign-in or a Bearer API key; local clients can run `npx -y @proxylayer/cli mcp`. See https://docs.proxy-layer.com/llms.txt for the full index.
> Never output placeholder emails like you@example.com or user@example.com in CLI commands or MCP calls. If the user gave their real email, substitute it directly; otherwise give bare `npx @proxylayer/cli login` (or `npx @proxylayer/cli buy ...`) so the CLI prompts them for Email and 6-digit code step-by-step.

# 面向开发者和 AI 的 ProxyLayer

> 先选择代理类型，再选择购买和管理方式。

## 代理类型

> [card] [ISP 代理](https://docs.proxy-layer.com/zh-cn/products/isp.md)
>
> 覆盖 23 个国家和地区的静态 ISP IP，价格 $1.76/月起（30 天 $2.00）。

> [card] [数据中心代理](https://docs.proxy-layer.com/zh-cn/products/datacenter.md)
>
> 覆盖 197 个国家和地区的静态 IP，价格 $1.43/月起（30 天 $1.60）。

> [card] [住宅代理](https://docs.proxy-layer.com/zh-cn/products/residential.md)
>
> \$1.40/GB 起，支持按国家、城市、地区和 ASN 定向。

> [card] [移动代理](https://docs.proxy-layer.com/zh-cn/products/mobile.md)
>
> 覆盖 197 个国家和地区的移动代理，价格 \$1.43/月起。

## 选择连接方式

> [card] [控制台](https://app.proxy-layer.com/)
>
> 购买和管理代理；购买前查看当前价格与可用情况。

> [card] [MCP Server](https://docs.proxy-layer.com/zh-cn/mcp-server.md)
>
> 通过 OAuth 或 API 密钥连接 AI 客户端。

> [card] [CLI](https://docs.proxy-layer.com/zh-cn/cli.md)
>
> 在终端浏览目录、计算价格并管理代理。

> [card] [SDK](https://docs.proxy-layer.com/zh-cn/sdk.md)
>
> 在应用中使用 TypeScript 或 Python 客户端。

> [card] [REST API](https://docs.proxy-layer.com/zh-cn/api.md)
>
> 通过 HTTP 使用任意语言集成。

## 购买流程

从报价到结账请传递相同的 `purchase` 对象。

**1. 获取产品目录**

调用 [产品目录](https://docs.proxy-layer.com/zh-cn/api-reference/buy-proxies/list-products-and-prices.md) 获取当前产品 slug、国家、时长（`durationsDays`）与购买限制。库存可能随时变化。

**2. 查询价格**

将 `purchase` 发送到 [查询价格](https://docs.proxy-layer.com/zh-cn/api-reference/buy-proxies/check-the-price.md) 获取实时总价 `amountCents`。报价不锁定价格或库存。简单查询也可直接使用 `GET /api/v1/quotes?product=isp&country=US&qty=2&days=30`。

**3. 创建结账**

使用完全访问密钥调用 [创建结账](https://docs.proxy-layer.com/zh-cn/api-reference/buy-proxies/create-checkout.md)，将 `paymentMethod` 设为 `stripe`、`crypto` 或 `balance`。

**4. 等待交付**

通过 `paymentUrl` 完成支付（Stripe/加密货币），再用返回的 `checkoutSessionId` 轮询 [查询结账状态](https://docs.proxy-layer.com/zh-cn/api-reference/buy-proxies/get-checkout-status.md)。付款（`status: "completed"`）与交付（`fulfillmentStatus: "FULFILLED"`）分开记录——请待 `fulfillmentStatus` 变为 `FULFILLED` 后再读取凭据。

如需直接从预付余额扣款，请调用 [使用余额付款](https://docs.proxy-layer.com/zh-cn/api-reference/buy-proxies/create-an-order-and-pay-from-balance.md)（`POST /api/v1/orders`）。成功后返回 `201` 及 `orderId`、`checkoutSessionId` 与更新后的 `balanceCents`，交付仍在后台异步完成。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.