AI
Pass

AI Background Remover — Agent Skill

AI Background Remover — Agent Skill

Use the AI Background Remover directly from your AI agent via the AI Pass API. No browser needed — just HTTP requests.

Quick Start

  1. Create an account at aipass.one ($1 free credit on signup)
  2. Go to Developer Dashboard and create an API key
  3. Set it as $AIPASS_API_KEY in your environment
  4. Use the skill below

The Skill

The complete, ready-to-use skill file is included in this post's skillContent field. It covers:

  • curl examples for quick testing
  • Python integration code
  • Model selection and parameters

Example

curl -s -X POST https://aipass.one/apikey/v1/chat/completions \
  -H "Authorization: Bearer $AIPASS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini/gemini-3-pro-image-preview",
    "messages": [
      {"role": "system", "content": "You are an AI background removal assistant. When given an image description or request, provide guidance on achieving clean background removal. Explai"},
      {"role": "user", "content": "product photo of white sneakers on grass background"}
    ]
  }'

Related

Skill File

---
name: bg-remover
description: Remove backgrounds from images using AI Pass image editing API.
version: 1.0.0
---

# AI Background Remover Skill

Remove backgrounds from images using AI image editing.

## Requirements
- AI Pass API key (create at https://aipass.one/panel/developer.html)
- Set as environment variable: `$AIPASS_API_KEY`

## Usage

### Text-based Background Removal Guidance (curl)
```bash
curl -s -X POST https://aipass.one/apikey/v1/chat/completions \
  -H "Authorization: Bearer $AIPASS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5-mini",
    "messages": [
      {"role": "system", "content": "You are an AI background removal assistant. When given an image description or request, provide guidance on achieving clean background removal. Explain edge detection, transparency, and best practices for product photos, portraits, and complex backgrounds."},
      {"role": "user", "content": "product photo of white sneakers on grass background"}
    ]
  }'
```

Response: `r.choices[0].message.content` — guidance text.

### Image Editing (SDK — browser-based)
For actual image background removal, use the AI Pass SDK in a web app:
```javascript
const result = await AiPass.editImage({
  model: 'gemini/gemini-3-pro-image-preview',
  image: imageFile,
  prompt: 'Remove the background, make it transparent'
});
const url = result.data[0].url;
```

### Python
```python
import requests, os

def get_bg_removal_tips(description):
    r = requests.post(
        "https://aipass.one/apikey/v1/chat/completions",
        headers={
            "Authorization": f"Bearer {os.environ['AIPASS_API_KEY']}",
            "Content-Type": "application/json"
        },
        json={
            "model": "gpt-5-mini",
            "messages": [
                {"role": "system", "content": "You are an AI background removal assistant. When given an image description or request, provide guidance on achieving clean background removal. Explain edge detection, transparency, and best practices for product photos, portraits, and complex backgrounds."},
                {"role": "user", "content": description}
            ]
        }
    )
    return r.json()["choices"][0]["message"]["content"]

print(get_bg_removal_tips("product photo of white sneakers on grass background"))
```

## Notes
- Text model: `gpt-5-mini` (guidance and tips)
- Image edit model: `gemini/gemini-3-pro-image-preview` (actual background removal via SDK)
- $1 free credit on signup at https://aipass.one
- Create API key at https://aipass.one/panel/developer.html

## Related
- App: https://aipass.one/apps/bg-remover
- User guide: https://aipass.one/blog/ai-bg-remover-guide
- Dev tutorial: https://aipass.one/blog/build-bg-remover-tutorial
Download Skill File