印漾美图 API
Postman示例代码
API 参考
| 接口 | 请求参数 | 返回数据 |
|---|---|---|
| 积分余额 /oapi/open/balance |
{
"appid": "",
"time": 1706177416,
"sign": "6b8fedc55c7ab3785e711ae7403a41cd4ea3ddc6"
} |
{
"code": 1,
"message": "请求成功",
"data": {
"name": "x",
"balance": "770"
}
} |
| 抠图/美颜/增强 /oapi/open/ability module说明: MT:抠图,SK:美颜,EH:增强 |
{
"appid": "",
"time": 1706177416,
"module": "MT",
"origin_src": "http://wbimg.fivebit.cn/or.jpg",
"sign": "6b8fedc55c7ab3785e711ae7403a41cd4ea3ddc6"
} |
{
"code": 1,
"message": "请求成功",
"data": {
"key": "MT1706177468313304911028",
"url": "MT1706177468313304911028_rgba.png"
}
} |
|
证件照 /oapi/open/idphoto color颜色: 438edb,ffffff,ff0000,66b5f2 一个或者多个 is_beauty是否美颜: 1:是 0:否 template_id模板:见证照模版 |
{
"appid": "",
"time": 1706177416,
"color": "438edb,ffffff",
"origin_src": "http://wbimg.fivebit.cn/or.jpg",
"sign": "6b8fedc55c7ab3785e711ae7403a41cd4ea3ddc6"
} |
{
"code": 1,
"message": "请求成功",
"data": {
"urls": {
"acaeb6": "ID1706253617673297296407_acaeb6_Q95.jpg",
"ffffff": "ID1706253617673297296407_ffffff_Q95.jpg"
}
}
} |
图片限制
You can request one of three formats via the parameter:
format
| Format | Resolution | Pros and cons | Example |
|---|---|---|---|
| PNG |
Up to 10 Megapixels
e.g. 4000x2500 |
+ Simple integration
+ Supports transparency - Large file size |
Download
7 MB |
| JPG |
Up to 25 Megapixels
e.g. 6250x4000 |
+ Simple Integration
+ Small file size - No transparency supported |
Download
1 MB |
| ZIP |
Up to 25 Megapixels
e.g. 6250x4000 |
+ Small file size
+ Supports transparency - Integration requires compositing |
Download
3 MB |
Rate Limit
You can process up to 500 images per minute through the API, depending on the input image resolution in megapixels.
Examples:
| Input image | Megapixels | Effective Rate Limit |
|---|---|---|
| 625 x 400 | 1 MP | 500 images per minute |
| 1200 x 800 | 1 MP | 500 images per minute |
| 1600 x 1200 | 2 MP | 500 / 2 = 250 images per minute |
| 2500 x 1600 | 4 MP | 500 / 4 = 125 images per minute |
| 4000 x 2500 | 10 MP | 500 / 10 = 50 images per minute |
| 6250 x 4000 | 25 MP | 500 / 25 = 20 images per minute |
Exceedance of rate limits leads to a HTTP status 429 response (no credits charged). Clients can use the following response headers to gracefully handle rate limits:
| Response header | Sample value | Description |
|---|---|---|
X-RateLimit-Limit
|
500
|
Total rate limit in megapixel images |
X-RateLimit-Remaining
|
499
|
Remaining rate limit for this minute |
X-RateLimit-Reset
|
1704443714
|
Unix timestamp when rate limit will reset |
Retry-After
|
59
|
Seconds until rate limit will reset (only present if rate limit exceeded) |
Higher Rate Limits are available upon request.