Background removal
Collection of VergingAI Agent Skills
npx -y skills add verging-ai/agent-skills --skill background-removalAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
AI Background Removal - Remove background from images, create transparent PNG. Supports JPG, PNG, WebP local files and remote URLs. One credit per image.
SKILL.md
3.7 KB, 922 tokens by cl100k_base, as published. Nobody here has run it
background-removal - AI Background Removal
Remove image backgrounds with AI via verging.ai. Returns transparent PNG.
Command Format
/background-removal --image <image file or URL> [options]
Options
| Option | Short | Description | Default |
|---|---|---|---|
| --image | -i | Image file path or URL | Required |
| --api-key | -k | API Key | $VERGING_API_KEY |
| --output | -o | Save path for result | Current directory |
| --download | -d | Auto download result | false |
Authentication
Recommended: Authorization: ApiKey <your_key>
# ✅ Recommended (canonical form)
curl -H "Authorization: ApiKey vrg_sk_your_key_here" https://verging.ai/api/v1/auth/me
# ✅ Also works (Bearer with API key is supported)
curl -H "Authorization: Bearer vrg_sk_your_key_here" https://verging.ai/api/v1/auth/me
Get your API key: https://verging.ai → Login → Avatar → API Keys
API Reference (Exact Formats)
1. Check Credits
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
https://verging.ai/api/v1/auth/me
Response: {"email":"...","name":"...","credits":100}
2. Create Background Removal Job (Multipart with file — direct upload)
# ⚠️ image is a FILE upload (@path) — server handles R2 upload internally
# ⚠️ You do NOT need to use /upload-video separately for background removal
curl -X POST https://verging.ai/api/v1/background-removal/create-job \
-H "Authorization: ApiKey $VERGING_API_KEY" \
-F "image=@/tmp/verging-bg-removal/photo.jpg" \
-F "file_name=photo.jpg" \
-F "job_type=background-removal"
Response: {"code":10000,"result":{"job_id":"456"},"message":{"en":"Request Success","zh":"提交任务成功"}}
3. Poll Job Status
curl -H "Authorization: ApiKey $VERGING_API_KEY" \
"https://verging.ai/api/v1/background-removal/jobs?job_ids=456"
Response: [{"id":456,"status":"COMPLETED","progress":100,"result_url":"https://...","image_url":"https://...","created_at":"...","updated_at":"..."}]
Status values: PENDING → PROCESSING → COMPLETED (or FAILED)
Execution Flow (Follow Exactly)
- Parse args → extract image path/URL
- Download remote image (if URL):
curl -L -o /tmp/verging-bg-removal/photo.jpg "URL" - Validate → check file exists, format is JPG/PNG/WebP, size < 10MB
- Check credits → GET /api/v1/auth/me (needs 1 credit)
- Create job → POST /background-removal/create-job (Multipart with
image=@path— server uploads to R2 internally, no separate upload step needed) - Poll status → GET /background-removal/jobs?job_ids=X every 5 seconds until COMPLETED
- Return/download result → show result_url, optionally curl download
Critical Notes
- Use
Authorization: ApiKey <key>(recommended) —Bearer <key>also works - No separate upload step needed — create-job handles R2 upload internally when you provide
image=@path imagemust be a file upload (@path) — NOT a URL string- Cost: 1 credit per image (fixed)
- Supported formats: JPG, PNG, WebP (max 10MB)
- Temp directory:
/tmp/verging-bg-removal/
Privacy & Security
- Set key via env:
export VERGING_API_KEY="your_key" - Never expose API key in public repos
- Temp files cleaned up after use
What ships with it: 1 file
1.1 KB alongside SKILL.md
- README.md1.1 KB