Access three core image processing capabilities via the Cutout.Pro REST API:
Images are processed by the Cutout.Pro API using AI. Each call consumes credits (standard: 1 credit/image; preview mode: 0.25 credits/image).
Use CaseRecommended APIRemove background from products, people, or animalsBackground RemoverExtract face/hair region for avatarsFace CutoutTurn a blurry photo into HDPhoto EnhancerSuper-resolution for anime/cartoon imagesPhoto Enhancer (faceModel=anime)Get facial landmark coordinatesFace Cutout (faceAnalysis=true)
.env file: CUTOUT_API_KEY=your_key_herepip install -r scripts/requirements.txtpython scripts/cutout.py --api bg-remover --image photo.jpgSee references/setup-guide.md for full setup instructions.
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
bash
# 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
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
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.
FilePurposereferences/setup-guide.mdInitial setup, API Key retrieval, troubleshootingreferences/api-reference.mdFull API docs, parameters, response formats, error codesscripts/cutout.pyMain scriptscripts/config.pyConfiguration management (API Key, endpoints, limits)scripts/requirements.txtPython dependencies