功能 | 价格(积分/次) | 说明 |
---|---|---|
描边处理 | 0.5 | 为图片添加精美的描边效果 |
反色处理 | 1.0 | 将图片颜色反转,创造独特视觉效果 |
矢量化处理 | 2.5 | 将位图转换为矢量图形,保持清晰度 |
100积分
约500次基础调用
500积分
约2500次基础调用
1元=1积分
所有API请求都需要在请求参数中包含token:
{
"token": "your_token_here",
...其他参数
}
用户注册后即可获得长期有效的token,请在个人中心查看。
所有API请求和响应均使用JSON格式。
所有图片处理API都支持以下两种方式:
所有请求都需要包含token参数。
为图片添加描边效果
POST /api/image-processing/outline/
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
token | string | 是 | 用户token |
image_url | string | 是 | 图片URL地址 |
thickness | number | 否 | 描边粗细,默认1 |
color | string | 否 | 描边颜色,默认白色 |
import requests
url = "http://www.vectorizer.cn/api/image-processing/outline/"
data = {
"token": "your_token_here",
"image_url": "https://example.com/image.jpg",
"thickness": 2,
"color": "#ffffff"
}
response = requests.post(url, json=data)
print(response.json())
{
"code": 200,
"msg": "请求成功",
"output_url": "https://www.vectorizer.cn/media/output/123.png"
}
将图片颜色反转
POST /api/image-processing/invert/
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
token | string | 是 | 用户token |
image_url | string | 是 | 图片URL地址 |
color | string | 否 | 反色后的颜色,支持hex格式(如#ffffff)或rgb格式(如rgb(255,255,255)),默认黑色 |
import requests
url = "http://www.vectorizer.cn/api/image-processing/invert/"
data = {
"token": "your_token_here",
"image_url": "https://example.com/image.jpg",
"color": "#ffffff" # 可选参数,指定反色后的颜色
}
response = requests.post(url, json=data)
print(response.json())
{
"code": 200,
"msg": "请求成功",
"output_url": "https://www.vectorizer.cn/media/output/124.png"
}
将位图转换为矢量图形
POST /api/image-processing/vectorize/
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
token | string | 是 | 用户token |
image_url | string | 是 | 图片URL地址 |
import requests
url = "http://www.vectorizer.cn/api/image-processing/vectorize/"
data = {
"token": "your_token_here",
"image_url": "https://example.com/image.jpg"
}
response = requests.post(url, json=data)
print(response.json())
{
"code": 200,
"msg": "请求成功",
"output_url": "https://www.vectorizer.cn/media/output/125.svg"
}
错误码 | 说明 |
---|---|
400 | 请求参数错误 |
401 | 未认证或认证失败 |
402 | 额度不足 |
404 | 资源不存在 |
429 | 请求过于频繁 |
500 | 服务器内部错误 |