Appearance
生成代理
创建不同类型的代理IP,支持静态IP、动态IP、静态流量和动态流量四种代理类型。
代理类型说明
| 代理类型 | 说明 | 特点 |
|---|---|---|
| 静态IP代理 | 按时间计费,IP固定不变 | 稳定性高,适合长期使用 |
| 动态IP代理 | 按时间计费,IP可定期刷新 | IP可更换,灵活性高 |
| 静态流量代理 | 按流量计费,IP固定不变 | 按实际使用流量付费 |
| 动态流量代理 | 按流量计费,IP可定期刷新 | 按流量计费且IP可更换 |
接口列表
| 接口 | 方法 | 描述 |
|---|---|---|
| 创建静态IP代理 | POST | 创建按时间计费的固定IP代理 |
| 创建动态IP代理 | POST | 创建按时间计费的可更换IP代理 |
| 创建静态流量代理 | POST | 创建按流量计费的固定IP代理 |
| 创建动态流量代理 | POST | 创建按流量计费的可更换IP代理 |
创建静态IP代理
创建按时间计费的固定IP代理,IP地址在购买期间保持不变。
接口信息
| 项目 | 说明 |
|---|---|
| 接口地址 | https://api.ipflex.ink/token/static/ip |
| 请求方法 | POST |
| 认证方式 | Bearer Token(从后台获取) |
| Content-Type | application/json |
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
number | integer | 是 | 创建数量,1-10 | 5 |
network_type | string | 否 | 网络类型:HTTP、SOCKS5,默认 HTTP | HTTP |
country_id | integer | 否 | 国家 ID(从地区查询接口获取) | 1 |
state_id | integer | 否 | 州/省 ID | 1 |
city_id | integer | 否 | 城市 ID | 1 |
payway_id | integer | 否 | 支付方式 ID(默认账户余额) | 1 |
请求示例
bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"number": 5,
"network_type": "HTTP",
"country_id": 1
}' \
https://api.ipflex.ink/token/static/ippython
import requests
headers = {
'Authorization': 'Bearer YOUR_TOKEN'
}
response = requests.post(
'https://api.ipflex.ink/token/static/ip',
headers=headers,
json={
'number': 5,
'network_type': 'HTTP',
'country_id': 1
}
)
print(response.json())响应示例
json
{
"code": 0,
"msg": "success",
"data": [
{
"id": 293241,
"ip": "",
"host": "proxy.ipflex.ink",
"port": 12345,
"username": "AKgStGv6ulth",
"password": "ATkpsMk1",
"expired_on": 1768116314,
"country": "United States",
"state": "",
"city": ""
}
]
}响应字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
code | integer | 状态码,0表示成功 |
msg | string | 响应消息 |
data | array | 创建的代理列表 |
data[].id | integer | 代理ID |
data[].ip | string | 代理IP地址(创建时可能为空,稍后分配) |
data[].host | string | 代理主机地址 |
data[].port | integer | 代理端口 |
data[].username | string | 认证用户名 |
data[].password | string | 认证密码 |
data[].expired_on | integer | 过期时间戳 |
data[].country | string | 国家名称 |
data[].state | string | 州/省名称 |
data[].city | string | 城市名称 |
创建动态IP代理
创建按时间计费的可更换IP代理,支持手动或自动刷新IP地址。
接口信息
| 项目 | 说明 |
|---|---|
| 接口地址 | https://api.ipflex.ink/token/variable/ip |
| 请求方法 | POST |
| 认证方式 | Bearer Token(从后台获取) |
| Content-Type | application/json |
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
number | integer | 是 | 创建数量,1-10 | 5 |
network_type | string | 否 | 网络类型:HTTP、SOCKS5,默认 HTTP | HTTP |
country_id | integer | 否 | 国家 ID | 1 |
state_id | integer | 否 | 州/省 ID | 1 |
city_id | integer | 否 | 城市 ID | 1 |
payway_id | integer | 否 | 支付方式 ID | 1 |
请求示例
bash
curl -u username:password \
-H "Content-Type: application/json" \
-d '{
"number": 5,
"network_type": "HTTP",
"country_id": 1
}' \
https://api.ipflex.ink/token/variable/ippython
import requests
response = requests.post(
'https://api.ipflex.ink/token/variable/ip',
auth=('username', 'password'),
json={
'number': 5,
'network_type': 'HTTP',
'country_id': 1
}
)
print(response.json())响应示例
json
{
"tokens": [
{
"id": 12346,
"token": "user123_token2",
"ip": "203.0.113.43",
"port": 8080,
"username": "user123",
"password": "pass123",
"country": "United States",
"city": "New York",
"network_type": "HTTP",
"expire_time": "2024-02-08T12:00:00Z",
"refresh_url": "https://api.ipflex.ink/token/dynamic/ip/refresh/12346"
}
],
"total_count": 5,
"success_count": 5
}响应字段说明
与静态IP代理相同,额外包含:
| 字段 | 类型 | 说明 |
|---|---|---|
tokens[].refresh_url | string | 刷新IP的URL(手动或自动刷新时使用) |
创建静态流量代理
创建按流量计费的固定IP代理,仅根据实际使用的代理流量付费。
接口信息
| 项目 | 说明 |
|---|---|
| 接口地址 | https://api.ipflex.ink/token/static/traffic |
| 请求方法 | POST |
| 认证方式 | Bearer Token(从后台获取) |
| Content-Type | application/json |
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
number | integer | 是 | 创建数量,1-10 | 5 |
network_type | string | 是 | 网络类型:HTTP、SOCKS5 | HTTP |
country_id | integer | 是 | 国家 ID(从地区查询接口获取) | 233 |
state_id | integer | 否 | 州/省 ID | 1456 |
city_id | integer | 否 | 城市 ID | 110968 |
注意
流量代理按实际使用流量计费,不需要payway_id参数。创建时不会扣费,仅在使用流量时计费。
请求示例
bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"number": 1,
"network_type": "HTTP",
"country_id": 233
}' \
https://api.ipflex.ink/token/static/trafficpython
import requests
headers = {
'Authorization': 'Bearer YOUR_TOKEN'
}
response = requests.post(
'https://api.ipflex.ink/token/static/traffic',
headers=headers,
json={
'number': 1,
'network_type': 'HTTP',
'country_id': 233
}
)
print(response.json())响应示例
json
{
"code": 0,
"msg": "success",
"data": [
{
"id": 293250,
"ip": "185.112.242.29",
"host": "proxy.ipflex.ink",
"port": 12345,
"username": "OZ6ba1X2nUei",
"password": "W1Fe5BIe",
"expired_on": 0,
"country": "United States",
"state": "",
"city": ""
}
]
}响应字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
code | integer | 状态码,0表示成功 |
msg | string | 响应消息 |
data | array | 创建的代理列表 |
data[].id | integer | 代理ID(Token ID) |
data[].ip | string | 代理IP地址 |
data[].host | string | 代理主机地址 |
data[].port | integer | 代理端口 |
data[].username | string | 认证用户名 |
data[].password | string | 认证密码 |
data[].expired_on | integer | 过期时间戳(0表示按流量计费无固定过期时间) |
data[].country | string | 国家名称 |
data[].state | string | 州/省名称 |
data[].city | string | 城市名称 |
创建动态流量代理
创建按流量计费的可更换IP代理,结合了流量计费和IP可更换的优点。
接口信息
| 项目 | 说明 |
|---|---|
| 接口地址 | https://api.ipflex.ink/token/variable/traffic |
| 请求方法 | POST |
| 认证方式 | Bearer Token(从后台获取) |
| Content-Type | application/json |
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
number | integer | 是 | 创建数量,1-10 | 5 |
network_type | string | 是 | 网络类型:HTTP、SOCKS5 | HTTP |
country_id | integer | 是 | 国家 ID(从地区查询接口获取) | 233 |
state_id | integer | 否 | 州/省 ID | 1456 |
city_id | integer | 否 | 城市 ID | 110968 |
注意
动态流量代理按实际使用流量计费,不需要payway_id参数。创建时不会扣费,仅在使用流量时计费。IP地址可以定期刷新。
请求示例
bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"number": 1,
"network_type": "HTTP",
"country_id": 233
}' \
https://api.ipflex.ink/token/variable/trafficpython
import requests
headers = {
'Authorization': 'Bearer YOUR_TOKEN'
}
response = requests.post(
'https://api.ipflex.ink/token/variable/traffic',
headers=headers,
json={
'number': 1,
'network_type': 'HTTP',
'country_id': 233
}
)
print(response.json())响应示例
json
{
"tokens": [
{
"id": 12348,
"token": "user123_token4",
"ip": "203.0.113.45",
"port": 1080,
"username": "user123",
"password": "pass123",
"country": "United States",
"city": "Seattle",
"network_type": "SOCKS5",
"traffic_quota": 10737418240,
"traffic_used": 0,
"refresh_url": "https://api.ipflex.ink/token/dynamic/ip/refresh/12348"
}
],
"total_count": 3,
"success_count": 3
}