Session API
Session API 是 NexaLayer 的核心。写操作建议携带Idempotency-Key。创建前请用 GET https://api.nexalayer.net/v1/public/products 核对 product_no。示例使用 dynamic_2(2026-11-29 时在现网目录中),库存可能变化。
创建 Session
quantity 表示 GB,可以使用小数;Static Session 的 quantity 表示 IP 数量,必须是整数。价格按账号和产品实时计算,请以 /products 使用 IPProxy 汇率换算后的 USD 价格为准。
静态 Session 可包含:
查询 Session
include_credentials 是查询参数,默认 false。active 状态下总会返回 host、port 和 protocol。只有 include_credentials=true 时才会返回 proxy.username、proxy.password 和 proxy.full_url。该参数不从 JSON body 读取。POST /sessions 不接受此参数,受理响应为 status=creating,不含代理凭据。
若读取价格后供应商价格已变化,创建会返回 HTTP 409 PRICE_MISMATCH,不会下单。请重新读取价格后再试。错误码说明见 Error codes。
轮换 Dynamic Session
include_credentials,默认不返回用户名、密码和 full_url。续费接口不接受该参数;续费成功且 Session 为 active 时,响应会包含代理凭据。
支持原因: