Remove.bg API Migration to Leonardo: Requests, Responses and Privacy

Remove.bg API Migration to Leonardo: Requests, Responses and Privacy

Updated November 3, 2026 · Published by Rewarx

Remove.bg API Migration to Leonardo: Requests, Responses and Privacy

The remove.bg API page announces the Leonardo move from December 1, 2026. Create a new Leonardo account and API key; existing credentials do not carry over. This guide maps the documented contract and provides a proposed acceptance checklist. No paid API request was made, and the sample below has not been validated end to end.

The contract changes

AreaLeonardo Sync contract
EndpointPOST https://cloud.leonardo.ai/api/rest/v2/generationssync
AuthenticationAuthorization: Bearer LEONARDO_API_KEY
BodyJSON; explicit model remove-bg; source nested under parameters.guidances.image_reference
ResultJSON results[0].url; with base64:true decode results[0].dataB64
FormatsPNG, JPG and WebP; ZIP and format=auto unsupported
StorageBy default, input and output persist in the Leonardo library and CDN (ephemeral:false). Set ephemeral:true for no lasting library assets; the URL response then expires after 30 minutes. With base64:true, the response uses dataB64 instead of that URL.
CostRead the cost object in the response; verify current account pricing.

Resolve the privacy documentation mismatch

The September 1 announcement says Sync does not store images. The current technical guide says inputs and outputs persist by default unless ephemeral:true is set. Use that explicit setting and validate it against your account requirements. public:false controls feed visibility when assets are persisted; it does not select temporary storage. This storage clarification was checked against the technical guide on November 6, 2026. No live API request was executed for this review.

Read the current storage specification

Minimal URL-input example

import os
import requests

# Documentation-adapted example; no live API request executed for this article.
response = requests.post(
    "https://cloud.leonardo.ai/api/rest/v2/generationssync",
    headers={"Authorization": "Bearer " + os.environ["LEONARDO_API_KEY"]},
    json={
        "model": "remove-bg",
        "ephemeral": True,
        "parameters": {
            "size": "full",
            "format": "png",
            "guidances": {"image_reference": [
                {"image": {"type": "URL", "url": os.environ["SOURCE_IMAGE_URL"]}}
            ]}
        }
    },
    timeout=(10, 120),
)
response.raise_for_status()
result = response.json().get("results", [])
if not result or not result[0].get("url"):
    raise RuntimeError("Expected one downloadable result URL")
# Download promptly and validate the file before publishing to your catalog.
print(result[0]["url"])

Acceptance tests before switching traffic

  • Store old and new client configuration separately. Run against non-sensitive reference images first.
  • Confirm empty-result and non-JSON errors do not get written as image files.
  • Validate a real alpha channel, dimensions and decodable output; a .png suffix alone proves none of those properties.
  • Verify ephemeral behavior in the library and confirm your downloader completes before URL expiry.
  • Exercise timeout and rate-limit paths. Avoid blind retries after an ambiguous completion; first establish request state and possible billing.
  • Record account-specific costs, throughput and manual correction work before projecting a monthly budget.
  • Retain the known-good client and a dated rollback decision until all acceptance criteria pass.

Known gaps and compatibility limits

Treat missing features as migration work, not harmless renamed fields. Separate alpha-matte consumers, background replacement and unsupported response fields need their own fixtures. The official guide has detailed mappings. Rewarx’s background-removal API endpoint was not verified in this review and is not presented as a drop-in replacement.

Choose your next step

  • Official migration overview
  • Alternatives by task
  • Developer migration guide
  • Inspect Rewarx’s background-removal entry page

Official sources checked November 3, 2026

  • remove.bg API migration date
  • Leonardo announcement and credentials
  • Leonardo request, response and storage guide
https://www.rewarx.com/blogs/removebg-api-vs-rewarx-automating-background-removal-at-scale

Rewarx Studio | AI-Powered Product Photography & Image Generator

Turn snapshots into professional, high-converting product photos in batches. Cut costs by 90% and launch your collection in minutes.

Create Stunning Product Photos in Batches

Rewarx Studio is fine-tuned to understand the material physics and lighting requirements of 20+ specialized industries, including electronics, cosmetics, fashion, jewelry, home decor, and beverages.

Our virtual photography studio provides precise control over lighting, depth, and material textures. Perfect for high-end catalog shots, Etsy, Amazon, Shopify, and eBay sellers.

The Full AI Production Suite

  • AI Photography Studio: Professional virtual photography with precise control over lighting and textures.
  • AI Lookalike Creator: Match the aesthetic, lighting, and composition of any reference photo.
  • AI Model Studio: Integrate professional human models with your products naturally with realistic shadows.
  • AI Ghost Mannequin: Create a 3D "Invisible" mannequin effect showing inner linings and volume.
  • AI Mockup Generator: Apply patterns and graphics onto 3D items with absolute physical accuracy.
  • AI Group Shot Studio: Cohesively synthesize multiple products into a single scene with perfect lighting.
  • AI Product Page Builder: Generate conversion-optimized listing asset sets in a single click.
  • AI Commercial Ad Poster: Combine product focal points with premium typography for high-converting ads.

Corporate Headquarters

Rewarx Limited, Suite 400, 548 Market Street, San Francisco, CA 94104, United States. Email: studio@rewarx.com