开发者接入指南
GoodStudy AI 提供企业级高可用图像处理与解析接口,助您极速赋能业务应用。
快速开始
所有接口请求均需通过 HTTP Header 进行 API Key 鉴权:
x-api-key: sk-xxxxxxxxxxxxxxxxxxxxxxxx
通用请求地址 (Base URL)
https://goodgoodstudy-nb.top
测试额度: 如果您还没有 API Key,请联系管理员 QQ: 359817060 免费获取测试 Key。
发丝级万物抠图
POST
/api/remove-bg
采用顶尖视觉模型,精准识别商品、人物边缘,一键实现发丝级精细抠图并返回透明底图 (PNG)。
请求参数 (JSON)
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
image | String | 是 | 图片的 Base64 编码 (可不带 data:image/jpeg;base64, 前缀) |
only_human | Boolean | 否 | 是否使用纯净人像抠图模式 (默认 true)。如果抠商品、汽车等静物,请传 false。 |
curl -X POST "https://goodgoodstudy-nb.top/api/remove-bg" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"image": "base64_encoded_string_here",
"only_human": true
}'
import requests
url = "https://goodgoodstudy-nb.top/api/remove-bg"
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"image": "base64_encoded_string_here",
"only_human": True
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const axios = require('axios');
const url = 'https://goodgoodstudy-nb.top/api/remove-bg';
const headers = {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
};
const data = {
image: 'base64_encoded_string_here',
only_human: true
};
axios.post(url, data, { headers })
.then(res => console.log(res.data))
.catch(err => console.error(err));
{
"code": 200,
"msg": "success",
"data": {
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA..."
},
"request_id": "c1f7a0db"
}
AI 证件照制作
POST
/api/idphoto
智能检测人脸区域,自动裁剪至标准尺寸并精准替换底色,轻松生成符合规范的高清证件照。
请求参数 (JSON)
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
image | String | 是 | 原始人物照片 Base64 编码 |
height | Int | 否 | 目标像素高度 (默认 413) |
width | Int | 否 | 目标像素宽度 (默认 295,即标准一寸照比例) |
color | String | 否 | 十六进制底色代码 (如: 438ed8 经典蓝),传 transparent 返回透明底 |
curl -X POST "https://goodgoodstudy-nb.top/api/idphoto" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"image": "base64_encoded_string_here",
"height": 413,
"width": 295,
"color": "438ed8"
}'
import requests
url = "https://goodgoodstudy-nb.top/api/idphoto"
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"image": "base64_encoded_string_here",
"height": 413,
"width": 295,
"color": "438ed8"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const axios = require('axios');
const url = 'https://goodgoodstudy-nb.top/api/idphoto';
const headers = { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' };
const data = {
image: 'base64_encoded_string_here',
height: 413,
width: 295,
color: '438ed8'
};
axios.post(url, data, { headers }).then(res => console.log(res.data));
{
"code": 200,
"msg": "success",
"data": {
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."
},
"request_id": "b2e4f1cd"
}
智能去水印 (无痕消除)
POST
/api/remove-watermark
秒级移除图像中无关内容、文字或复杂水印。基于背景纹理自动补偿生成技术,实现无痕视觉修复。
请求参数 (JSON)
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
image | String | 是 | 原始图片 Base64 编码 |
mask | String | 是 | 遮罩图片 Base64 编码(白色为需要消除的区域,黑色为保留区域,分辨率需与原图一致) |
curl -X POST "https://goodgoodstudy-nb.top/api/remove-watermark" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"image": "base64_image_data...",
"mask": "base64_mask_data..."
}'
import requests
url = "https://goodgoodstudy-nb.top/api/remove-watermark"
headers = {"x-api-key": "YOUR_API_KEY", "Content-Type": "application/json"}
payload = {
"image": "base64_image_data...",
"mask": "base64_mask_data..."
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const axios = require('axios');
const url = 'https://goodgoodstudy-nb.top/api/remove-watermark';
const headers = { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' };
const data = {
image: 'base64_image_data...',
mask: 'base64_mask_data...'
};
axios.post(url, data, { headers }).then(res => console.log(res.data));
{
"code": 200,
"msg": "success",
"data": {
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."
},
"request_id": "a9d3c4e1"
}
AI 画质高清修复
POST
/api/hd-restore
针对模糊照片、老照片、低分辨率图片进行画质提升,超分辨率放大、去噪并自动恢复色彩质感。
请求参数 (JSON)
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
image | String | 是 | 需要修复的原始图片 Base64 编码 |
curl -X POST "https://goodgoodstudy-nb.top/api/hd-restore" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"image": "base64_image_data..."
}'
import requests
url = "https://goodgoodstudy-nb.top/api/hd-restore"
headers = {"x-api-key": "YOUR_API_KEY", "Content-Type": "application/json"}
payload = {"image": "base64_image_data..."}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const axios = require('axios');
const url = 'https://goodgoodstudy-nb.top/api/hd-restore';
const headers = { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' };
const data = { image: 'base64_image_data...' };
axios.post(url, data, { headers }).then(res => console.log(res.data));
{
"code": 200,
"msg": "success",
"data": {
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
},
"request_id": "8a3b12ef"
}
短视频图文无水印解析
POST
/api/parse-video
覆盖抖音、快手、小红书等数十个主流内容平台。输入平台分享链接,一键提取超清无水印媒体资产及视频文案。
请求参数 (JSON)
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
url | String | 是 | 客户端复制的包含原链的分享口令文本(会自动提取 URL) |
curl -X POST "https://goodgoodstudy-nb.top/api/parse-video" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"url": "5.60 mJg:/ 这么美的风景,快来看看吧~ https://v.douyin.com/idTXYZ/"
}'
import requests
url = "https://goodgoodstudy-nb.top/api/parse-video"
headers = {"x-api-key": "YOUR_API_KEY", "Content-Type": "application/json"}
payload = {
"url": "5.60 mJg:/ 这么美的风景,快来看看吧~ https://v.douyin.com/idTXYZ/"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const axios = require('axios');
const url = 'https://goodgoodstudy-nb.top/api/parse-video';
const headers = { 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' };
const data = { url: '5.60 mJg:/ 这么美的风景... https://v.douyin.com/idTXYZ/' };
axios.post(url, data, { headers }).then(res => console.log(res.data));
{
"code": 200,
"msg": "success",
"data": {
"type": "video", // 类型:video 视频, images 图文
"title": "这么美的风景,快来看看吧~",
"cover": "https://...", // 封面图直链
"url": "https://...", // 无水印视频下载直链
"images": [] // 如果 type 为 images,此数组将包含所有高清图片直链
},
"request_id": "c1f7a0db"
}
状态码字典
| 状态码 (HTTP) | 含义说明 |
|---|---|
| 200 | 请求成功并已扣费,业务逻辑处理完成。 |
| 400 | 参数错误 (格式不正确、参数缺失) 或解析不支持该平台。 |
| 401 | API Key 无效或未携带授权 Header。 |
| 402 | 账户余额不足,需前往管理后台充值。 |
| 403 | 账户被封禁,或未开通该接口的访问权限。 |
| 429 | 请求过于频繁,触发 QPS 限流保护。 |
| 500 | AI 模型处理报错或服务器内部异常。 |