cd /news/ai-tools/show-hn-drop-in-replacement-for-the-… · home › topics › ai-tools › article
[ARTICLE · art-176368] src=airgallery.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Show HN: Drop-in replacement for the remove.bg API, which shuts down Dec 1

AirGallery launched a drop-in replacement for the remove.bg API ahead of remove.bg's December 1 shutdown, offering a remove-background endpoint at airgallery.com/functions/v1/remove-background authenticated with a Bearer developer key. AirGallery also shipped a stateless Streamable HTTP Model Context Protocol server at airgallery.com/functions/v1/mcp-server, listed in the official MCP Registry as com.airgallery/airgallery, exposing 60 tools including 27 AI image tools such as remove_background, upscale_image and text_to_image. Developer keys are scoped to read, write and ai, with AI calls deducting credits and missing-scope requests returning 403.

key takeaway

Developers facing remove.bg's December 1 shutdown can point the same base64-image POST at AirGallery's remove-background endpoint with an ag_ Bearer key, and wire the same key into its 60-tool MCP server at airgallery.com/functions/v1/mcp-server.

read9 min views2 publishedNov 25, 2026
Show HN: Drop-in replacement for the remove.bg API, which shuts down Dec 1
Image: source

Back to Docs

Developers

Programmatic access to every AirGallery capability — image generation, gallery management, credits, and social — over both a REST API and a Model Context Protocol server.

Quickstart #

  1. Sign in to AirGallery and visit /api-keys to generate a developer key. Copy theag_… value — it's shown once.
  2. Make sure you have credits at /credits if you plan to call AI tools.
  3. Call the REST API or wire the MCP server into your agent client.
curl -X POST https://airgallery.com/functions/v1/remove-background \
  -H "Authorization: Bearer ag_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "image": "data:image/png;base64,iVBORw0KG…" }'

Authentication #

Every authenticated endpoint accepts a Bearer token in the Authorization header. Two token types are supported, and both work for every protected REST endpoint and MCP tool (creating, revoking and deleting API keys takes a JWT).

Developer API Key

Long-lived, scoped (read, write, ai), revocable. Best for server-side integrations, automations, and MCP clients.

Authorization: Bearer ag_abc123…

Supabase JWT

Short-lived session token from supabase.auth. Best for first-party clients that already use Supabase Auth.

Authorization: Bearer eyJhbGciOiJIUzI1NiIs…

Scopes

  • read Browse public gallery, view profiles, read your own data.
  • write Save/delete artworks, update profile, follow/like.
  • ai Run AI tools (deducts credits).

Missing-scope calls return 403 with { "error": "API key missing required scope: …" }. JWT-authenticated callers always have all scopes.

MCP Server #

AirGallery ships an MCP server (Model Context Protocol) over Streamable HTTP. Any MCP-compatible agent — Claude Desktop, Cursor, MCP Inspector, your own LLM app — can plug in and call the same tools that power the AirGallery UI.

Listed in the official MCP Registry as com.airgallery/airgallery and on Glama:

Endpoint

https://airgallery.com/functions/v1/mcp-server

Transport: stateless Streamable HTTP. Send JSON-RPC 2.0 messages with POST; replies come back as JSON or a short SSE stream (there is no standing GET stream). Also reachable at https://airgallery.com/mcp. Protocol versions 2025-03-26 and 2025-06-18; clients on newer versions are served 2025-06-18. Messages over 4.5 MB (large base64 images, upscale_image results) need the same server at https://wgbduttegyrwiukjhubh.supabase.co/functions/v1/mcp-server.

Available tools — 60 total

Gallery (7)

  • list_public_artworks
  • search_artworks
  • get_artwork
  • list_my_artworks
  • save_artwork
  • update_artwork
  • delete_artwork

Credits (4)

  • get_credit_balance
  • get_credit_costs
  • get_pricing_tiers
  • buy_credits

Create (1)

  • create_image

AI Image Tools (27)

  • remove_background
  • enhance_image
  • upscale_image
  • text_to_image
  • ai_replace
  • ai_expand
  • object_remover
  • colorize_image
  • cartoonize
  • style_transfer
  • relight_image
  • dslr_transform
  • photo_repair
  • old_photo_restore
  • ai_filters
  • retro_transform
  • polaroid_transform
  • headshot_generator
  • portrait_retouch
  • avatar_generator
  • meme_generator
  • product_studio
  • logo_mockup
  • poster_generator
  • aspect_ratio_change
  • generate_tags
  • studio_generate_layout

Profile & Social (7)

  • get_my_profile
  • update_my_profile
  • get_user_profile
  • follow_user
  • unfollow_user
  • like_artwork
  • unlike_artwork

Portfolios (4)

  • list_my_portfolios
  • get_portfolio
  • publish_portfolio
  • get_public_portfolio

White-Label (2)

  • list_my_white_label_galleries
  • get_white_label_gallery

Design Studio (8)

  • studio_list_documents
  • studio_get_document
  • studio_create_document
  • studio_add_frames
  • studio_add_elements
  • studio_update_objects
  • studio_delete_objects
  • studio_add_font

List tools over raw HTTP

curl -X POST https://airgallery.com/functions/v1/mcp-server \
  -H "Authorization: Bearer ag_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

Connect from an MCP client #

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop.

{
  "mcpServers": {
    "airgallery": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://airgallery.com/functions/v1/mcp-server",
        "--header",
        "Authorization: Bearer ag_YOUR_API_KEY"
      ]
    }
  }
}

REST: AI Tool Endpoints #

Each AI tool is its own edge function under https://airgallery.com/functions/v1/<name>. All accept POST with a JSON body. All require auth (API keys need the ai scope) and consume credits; generate-tags is free the first time for one of your own untagged artworks. Credits are charged when the call starts and refunded automatically if it fails.

airgallery.com accepts request and response bodies up to 4.5 MB. For larger images (up to 25 MB), and for topaz-upscale, which returns the full-size image inline, call the same function at https://wgbduttegyrwiukjhubh.supabase.co/functions/v1/<name> with the same headers and body.

/image-transform Core multi-modal transform (powers Create); pick a model, cost depends on it

/remove-background Remove image background (transparent PNG, or a solid colour with bg_color)

/enhance-image General clean-up, sharpen, denoise or fix lighting

/object-remover Remove objects painted over in red

/ai-replace Replace an area painted over in red with new content

/ai-expand Outpaint / extend image boundaries

/ai-filters Apply artistic AI filters

/aspect-ratio Change aspect ratio, filling new space with AI

/cartoonize Convert photos to cartoon / anime

/colorize-image Add color to B&W photos

/dslr-transform Professional DSLR camera look

/headshot-generator Generate professional headshots

/logo-mockup Place a logo on realistic mockups

/meme-generator Memes with custom text

/old-photo-restore Restore vintage photographs

/photo-repair Fix blur, noise or low resolution

/polaroid-transform Classic instant-photo effect

/portrait-retouch Enhance and retouch portraits

/poster-generator Create poster / flyer layouts

/product-studio E-commerce product photography

/relight-image Change scene lighting

/retro-image Retro/vintage film effects

/style-transfer Repaint a photo in the style of a second image

/text-to-image Generate images from text

/topaz-upscale Topaz AI upscaling, 1–6x or to an exact outputWidth / outputHeight

/studio-layout Design a layout from a brief: a frame and positioned text, shape and image layers for Design Studio

/avatar-generator Stylized AI avatars from a photo

/generate-tags Auto-generate descriptive tags (free the first time for a saved artwork)

Images can be passed as base64 data URIs (data:image/png;base64,…) or as HTTPS URLs. Responses return the result image (a data URI or URL) as processedImage, image or generatedImage depending on the tool; errors return { "error": "…" }. The MCP tool descriptions list each tool's fields and allowed values.

image-transform models

Body: { "images": [ …up to 5 ], "customPrompt": "…", "preset": "none", "model": "nano-banana-2" }. Send images, a prompt, or both. Every model accepts reference images except recraft-v4.1`` recraft-v4.1-flash, which is text-to-image only (images return a 400, refunded). Also accepted over the API: gpt-image-mini (GPT Image 1 Mini, 3 cr).

  • nano-banana-2 Nano Banana 23 cr
  • nano-banana-2-lite Nano Banana 2 Lite2 cr
  • nano-banana-pro Nano Banana Pro6 cr
  • gpt-image-2.6-flare GPT Image 2.6 Flare8 cr
  • gpt-image-2.6-sunburst GPT Image 2.6 Sunburst8 cr
  • flux-3 FLUX 33 cr
  • flux-3-klein FLUX 3 Klein1 cr
  • mai-image-2.7 MAI-Image 2.73 cr
  • mai-image-2.7-flash MAI-Image 2.7 Flash1 cr
  • grok-imagine-2 Grok Imagine 2.04 cr
  • seedream-5.5 Seedream 5.52 cr
  • seedream-5-pro Seedream 5.0 Pro2 cr
  • muse-image Muse Image1 cr
  • minimax-h3 MiniMax H32 cr
  • recraft-v4.1 Recraft V4.12 cr
  • recraft-v4.1-flash Recraft V4.1 Flash1 cr
  • mai-image-2.6 MAI-Image 2.63 cr
  • gpt-image-2.5-flare GPT Image 2.5 Flare8 cr
  • gpt-image-2.5-sunburst GPT Image 2.5 Sunburst8 cr
  • gpt-image GPT Image 28 cr
  • nano-banana Nano Banana3 cr

remove.bg-compatible API #

remove.bg's website and self-service API close on December 1, 2026. To move code written for their API, change the URL to POST https://airgallery.com/v1.0/removebg and put an AirGallery ag_… key in the same X-Api-Key header. Each call costs 1 credit, refunded if it fails.

  • Input: image_file ,image_file_b64 orimage_url , as multipart form data, a urlencoded form or JSON.
  • bg_color (a hex like81d4fa or a color name) puts the subject on a solid color.size ,type ,crop andchannels are accepted and ignored.format must beauto orpng ;bg_image_url isn't supported.
  • Output: the PNG bytes, or { "data": { "result_b64": "…" } } when you sendAccept: application/json , withX-Credits-Charged ,X-Width andX-Height headers.
  • Errors use remove.bg's shape: { "errors": [{ "title": "…", "code": "auth_failed" }] } .
  • Uploads over 4.5 MB: use https://wgbduttegyrwiukjhubh.supabase.co/functions/v1/remove-background/v1.0/removebg (up to 25 MB), or passimage_url .
curl -H "X-Api-Key: ag_YOUR_API_KEY" \
  -F "image_file=@photo.jpg" \
  -F "size=auto" \
  -f https://airgallery.com/v1.0/removebg -o no-bg.png

REST: Credits API #

Single endpoint POST https://airgallery.com/functions/v1/credits — the operation is selected by an action field in the body. A missing or unknown action returns 400.

Get the authenticated user's credit balance.

Request:

{ "action": "balance" }

Response:

{ "balances": [{ "credit_type_id": "...", "credit_type_name": "AirGallery", "credit_type_symbol": "AG", "balance": 42 }] }

Retrieve available credit packages and pricing. Public: no auth needed.

Request:

{ "action": "pricing-tiers" }

Response:

{ "pricing_tiers": [{ "id": "...", "name": "Starter", "price": 5, "credits": 50, "currency": "USD" }] }

Create a Stripe checkout session for purchasing credits. success_url and cancel_url are optional (default: /credits).

Request:

{ "action": "checkout", "pricing_tier_id": "tier_xxx", "success_url": "https://…", "cancel_url": "https://…" }

Response:

{ "url": "https://checkout.stripe.com/..." }

Register or sync the current user with the credits system. Grants the one-time signup credits on first call, except to disposable email addresses and past two new accounts per network per day (then welcome_credits is 0 and welcome_skipped is "disposable_email" or "ip_limit").

Request:

{ "action": "sync-user", "name": "Jane Doe" }

Response:

{ "success": true, "welcome_credits": 10 }

REST: API Key Management #

Single endpoint POST https://airgallery.com/functions/v1/api-keys — selected by the action field. Use the API Keys dashboard for a UI, or call these directly to automate key rotation. An ag_ key can list keys; creating, revoking and deleting them needs a signed-in session token (Supabase JWT), and an API key gets a 403.

Create a new developer API key (max 10 active per user). Returned key shown only once. JWT-only.

Request:

{ "action": "create", "name": "My App", "scopes": ["read","write","ai"], "expires_in_days": 90 }

Response:

{ "success": true, "api_key": "ag_xxx…", "key_prefix": "ag_xxx…", "scopes": ["read","write","ai"], "expires_at": "2025-…" }

List the caller's API keys (does not return the secret). Works for JWT or API-key callers.

Request:

{ "action": "list" }

Response:

{ "keys": [{ "id": "…", "name": "…", "key_prefix": "ag_…", "scopes": ["read"], "is_active": true }] }

Disable an API key without deleting it. JWT-only — an API key cannot revoke siblings.

Request:

{ "action": "revoke", "key_id": "uuid" }

Response:

{ "success": true }

Permanently delete an API key. JWT-only.

Request:

{ "action": "delete", "key_id": "uuid" }

Response:

{ "success": true }

Errors & Rate Limits #

Rate Limits

Per-IP, 5–120 requests/min depending on endpoint. 429 includes Retry-After in seconds.

Credit Deduction

Credits are charged when a tool run starts and refunded automatically if it fails, so failed operations cost nothing.

Idempotency

AI calls are not idempotent — outputs are non-deterministic. Cache responses client-side if you need stability.

── more in #ai-tools 4 stories · sorted by recency
── more on @airgallery 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-drop-in-repl…] indexed:0 read:9min 2026-11-25 · —