API服务

价格方案

API调用价格

功能 价格(积分/次) 说明
描边处理 0.5 为图片添加精美的描边效果
反色处理 1.0 将图片颜色反转,创造独特视觉效果
矢量化处理 2.5 将位图转换为矢量图形,保持清晰度

积分充值

¥9.9

100积分

约500次基础调用

¥29.9

500积分

约2500次基础调用

自定义金额

1元=1积分

版本说明

积分计费

  • 按积分计费
  • 支持所有图片处理功能
  • 需要注册并获取access_token
  • 处理速度快
  • 支持批量处理
  • 提供技术支持
  • 每天登录可获得10积分
  • 支持积分充值(1元=1积分)

认证

所有API请求都需要在请求参数中包含token:

{
    "token": "your_token_here",
    ...其他参数
}

获取token

用户注册后即可获得长期有效的token,请在个人中心查看。

通用说明

所有API请求和响应均使用JSON格式。

所有图片处理API都支持以下两种方式:

  • 通过URL处理图片
  • 通过文件上传处理图片

所有请求都需要包含token参数。

描边处理

为图片添加描边效果

POST /api/image-processing/outline/

请求参数:

参数名 类型 必填 说明
token string 用户token
image_url string 图片URL地址
thickness number 描边粗细,默认1
color string 描边颜色,默认白色

请求示例:

Python
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)),默认黑色

请求示例:

Python
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地址

请求示例:

Python
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 服务器内部错误