← 返回
内容创作 Key 中文

A Python CLI skill for Cutout.Pro visual APIs — background removal, face cutout, and photo enhancement. Supports file upload & image URL input.

Call Cutout.Pro visual processing APIs to perform background removal, face cutout, and photo enhancement. Supports both file upload and image URL input, retu...
调用 Cutout.Pro 视觉处理 API 进行背景移除、人像抠图和照片增强,支持文件上传与图片 URL 输入。
cutout-pro
内容创作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 490
下载
💾 21
安装
1
版本
#latest

概述

Cutout.Pro Visual API — Image Processing Toolkit

Overview

Access three core image processing capabilities via the Cutout.Pro REST API:

  1. Background Remover — Automatically detects the foreground, removes the background, and returns a transparent PNG
  2. Face Cutout — Precisely segments the face and hair region, with support for 68-point facial landmark detection
  3. Photo Enhancer — AI super-resolution enhancement that transforms blurry, low-quality photos into high-definition images

When to Use This Skill

  • When the user needs to remove an image background
  • When the user needs to extract a face or avatar region
  • When the user needs to improve photo clarity or resolution
  • When the user mentions "background removal", "cutout", "portrait segmentation", or related topics
  • When the user mentions "image enhancement", "super resolution", "photo restoration", or related topics

Do Not Use This Skill When

  • The task is unrelated to image processing
  • The user needs to generate a new image (not process an existing one)
  • The user needs video processing (use another tool)

How It Works

Images are processed by the Cutout.Pro API using AI. Each call consumes credits (standard: 1 credit/image; preview mode: 0.25 credits/image).

API Comparison

Use CaseRecommended API
--------------------------
Remove background from products, people, or animalsBackground Remover
Extract face/hair region for avatarsFace Cutout
Turn a blurry photo into HDPhoto Enhancer
Super-resolution for anime/cartoon imagesPhoto Enhancer (faceModel=anime)
Get facial landmark coordinatesFace Cutout (faceAnalysis=true)

Quick Start

  1. Go to https://www.cutout.pro/user/secret-key to get your API Key
  2. Add it to your .env file: CUTOUT_API_KEY=your_key_here
  3. Install dependencies: pip install -r scripts/requirements.txt
  4. Run the script: python scripts/cutout.py --api bg-remover --image photo.jpg

See references/setup-guide.md for full setup instructions.

1. Operation Modes

CLI ArgumentFunctionEndpoint
---------------------------------
--api bg-removerBackground removal (file upload, binary response)/api/v1/matting?mattingType=6
--api bg-remover --base64Background removal (file upload, Base64 response)/api/v1/matting2?mattingType=6
--api bg-remover --urlBackground removal (image URL, Base64 response)/api/v1/mattingByUrl?mattingType=6
--api face-cutoutFace cutout (file upload, binary response)/api/v1/matting?mattingType=3
--api face-cutout --base64Face cutout (file upload, Base64 response)/api/v1/matting2?mattingType=3
--api face-cutout --urlFace cutout (image URL, Base64 response)/api/v1/mattingByUrl?mattingType=3
--api photo-enhancerPhoto enhancement (file upload, binary response)/api/v1/photoEnhance
--api photo-enhancer --base64Photo enhancement (file upload, Base64 response)/api/v1/photoEnhance2
--api photo-enhancer --urlPhoto enhancement (image URL, Base64 response)/api/v1/photoEnhanceByUrl

2. Usage Examples

# Background removal — upload file, save as PNG
python scripts/cutout.py --api bg-remover --image product.jpg --output out.png

# Background removal — pass image URL, get Base64
python scripts/cutout.py --api bg-remover --url "https://example.com/photo.jpg"

# Background removal — crop whitespace, add white background
python scripts/cutout.py --api bg-remover --image photo.jpg --crop --bgcolor FFFFFF

# Face cutout — upload file, save as PNG
python scripts/cutout.py --api face-cutout --image portrait.jpg --output face.png

# Face cutout — get Base64 + 68 facial landmarks
python scripts/cutout.py --api face-cutout --image portrait.jpg --base64 --face-analysis

# Photo enhancement — upload file, save HD image
python scripts/cutout.py --api photo-enhancer --image blurry.jpg --output hd.png

# Photo enhancement — anime/cartoon super-resolution
python scripts/cutout.py --api photo-enhancer --image anime.jpg --face-model anime

# Preview mode (0.25 credits, max 500×500)
python scripts/cutout.py --api bg-remover --image photo.jpg --preview

3. Parameters

ParameterDescriptionDefault
---------------------------------
--apiSelect API: bg-remover, face-cutout, photo-enhancerRequired
--imageLocal image file path
--urlImage URL (replaces --image in URL mode)
--outputOutput file pathdata/outputs/
--base64Return Base64 JSON instead of binary streamfalse
--cropCrop whitespace (bg-remover/face-cutout only)false
--bgcolorBackground color, hex (e.g. FFFFFF) or blur
--previewPreview mode, max 500×500, costs 0.25 creditsfalse
--output-formatOutput format: png, webp, jpg_75, etc.png
--face-analysisReturn facial landmarks (face-cutout --base64 only)false
--face-modelEnhancement model: quality or anime (photo-enhancer only)quality

4. Output

Images are saved to data/outputs/ with the naming pattern: {api}_{timestamp}.png

Metadata is saved in a .meta.json file containing: API type, parameters, processing time, and file size.

Integration with Other Tools

  • Image editing: Use background removal first, then composite a new background
  • Avatar generation: Face cutout → crop → generate avatar
  • Photo restoration: Photo enhancement → background removal → composite

Limits & Quotas

  • Supported formats: PNG, JPG, JPEG, BMP, WEBP
  • Maximum resolution: 4096×4096 pixels
  • Maximum file size: 15 MB
  • QPS limit: up to 5 concurrent requests per second
  • Credit cost: 1 credit/image (standard), 0.25 credits/image (preview mode)

File Reference

FilePurpose
---------------
references/setup-guide.mdInitial setup, API Key retrieval, troubleshooting
references/api-reference.mdFull API docs, parameters, response formats, error codes
scripts/cutout.pyMain script
scripts/config.pyConfiguration management (API Key, endpoints, limits)
scripts/requirements.txtPython dependencies

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-20 05:23 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,080
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,213
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,906