一键美化

优质
小牛编辑
116浏览
2023-12-01

通过人工智能技术对图像进行自动润色,补偿曝光,调整对比度、色调和亮度等,使图像得到增强和美化。

模式一

返回二进制文件流

模式二

返回base64字符串

美化API调用示例代码

github地址: https://github.com/picup-shop

  • cURL
  • Python
  • PHP
  • Java
  • nodejs
  • .net
  • Objective-C
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
        -F 'file=@/path/to/file.jpg'     \
        -f 'https://picupapi.tukeli.net/api/v1/matting?mattingType=4' \
        -o out.png
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
        -F 'file=@/path/to/file.jpg'     \
        -f 'https://picupapi.tukeli.net/api/v1/matting?mattingType=4' \
        -o out.png
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
        -F 'file=@/path/to/file.jpg'     \
        -f 'https://picupapi.tukeli.net/api/v1/matting?mattingType=4' \
        -o out.png
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
        -F 'file=@/path/to/file.jpg'     \
        -f 'https://picupapi.tukeli.net/api/v1/matting?mattingType=4' \
        -o out.png
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
        -F 'file=@/path/to/file.jpg'     \
        -f 'https://picupapi.tukeli.net/api/v1/matting?mattingType=4' \
        -o out.png
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
        -F 'file=@/path/to/file.jpg'     \
        -f 'https://picupapi.tukeli.net/api/v1/matting?mattingType=4' \
        -o out.png
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
        -F 'file=@/path/to/file.jpg'     \
        -f 'https://picupapi.tukeli.net/api/v1/matting?mattingType=4' \
        -o out.png

API文档说明

接口描述

用户向服务请求获取某张图中的人物,服务器返回人物的PNG图片。

请求说明

  • 请求URl: https://picupapi.tukeli.net/api/v1/matting?mattingType=4
  • 请求方式: POST
  • 返回类型: PNG图像
  • 输入参数:

    (1) 请求参数(Header)

    参数参数类型描述
    Content-Typestringmultipart/form-data
    APIKEYstring您的专属API Key

    (2) 请求参数(Body)

    参数必填
    file图片文件

返回说明

  • 正常返回

    直接返回content-type为image/png,图片处理后的二进制文件。

  • 错误返回
    {
      "code": 1001, //
      "data": null
      "msg": '余额不足',
      "time": 1590462453264
    }

美化API调用示例代码

github地址: https://github.com/picup-shop

  • cURL
  • Python
  • PHP
  • Java
  • nodejs
  • .net
  • Objective-C
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
         -F 'file=@/path/to/file.jpg'     \
         -f 'https://picupapi.tukeli.net/api/v1/matting2?mattingType=4&crop=true'
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
         -F 'file=@/path/to/file.jpg'     \
         -f 'https://picupapi.tukeli.net/api/v1/matting2?mattingType=4&crop=true'
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
         -F 'file=@/path/to/file.jpg'     \
         -f 'https://picupapi.tukeli.net/api/v1/matting2?mattingType=4&crop=true'
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
         -F 'file=@/path/to/file.jpg'     \
         -f 'https://picupapi.tukeli.net/api/v1/matting2?mattingType=4&crop=true'
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
         -F 'file=@/path/to/file.jpg'     \
         -f 'https://picupapi.tukeli.net/api/v1/matting2?mattingType=4&crop=true'
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
         -F 'file=@/path/to/file.jpg'     \
         -f 'https://picupapi.tukeli.net/api/v1/matting2?mattingType=4&crop=true'
  • curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
         -F 'file=@/path/to/file.jpg'     \
         -f 'https://picupapi.tukeli.net/api/v1/matting2?mattingType=4&crop=true'

API文档说明

接口描述

用户向服务请求获取某张图的美化后的图像,服务器返回原图的美化后图像。

请求说明

  • 请求URl: https://picupapi.tukeli.net/api/v1/matting2?mattingType=4
  • 请求方式: POST
  • 返回类型: PNG图像
  • 输入参数:

    (1) 请求参数(Header)

    参数参数类型描述
    Content-Typestringmultipart/form-data
    APIKEYstring您的专属API Key

    (2) 请求参数(Body)

    参数必填
    file图片文件

返回说明

  • 正常返回
    {
        "code": 0,
        "data": {
        "imageBase64": "iVBORw0KGgo..." //返回图像的base64编码
        },
        "msg": null,
        "time": 1590462453264
    }
  • 错误返回
    {
      "code": 1001, //
      "data": null
      "msg": '余额不足',
      "time": 1590462453264
    }

价格说明

您可以通过在线充值付费方式,购买API调用点数。

查看价格列表

注意:API每次成功调用,消耗1点。

常见问题

  • Q:输入的图片格式有什么要求?
  • A:支持PNG、JPG、JPEG、BMP、GIF
  • Q:支持图片大小有限制吗?
  • A:目前上传的分辨率最大4096x4096像素,图片文件大小15MB以下