Migrating To Pixian.AI

Get API Key

To help you migrate to Pixian.AI, we've implemented select legacy-service-compatible API endpoints. If you're currently using one of these services, migrating to Pixian.AI can be as simple as changing the endpoint and API key.

remove.bg POST
https://api.pixian.ai/v1.0/removebg

Endpoint to facilitate migration from remove.bg. We support the main parameters of their API. Unsupported or partially supported parameters are noted below.

If you're only using supported parameters, then migrating should be as simple as changing the endpoint URL and API Key:

# Install "remove_bg" first (https://github.com/remove-bg/ruby)
require "remove_bg"

RemoveBg::Api::URL = "https://api.pixian.ai"  # <-- Change the endpoint

RemoveBg.from_file("example.jpeg",
  # Use Pixian.AI API Key:
  api_key: "INSERT_API_KEY_HERE"
).save("pixian_result.png")

Parameters

The input image must be provided as one of:


Binary

A binary file.


String

A base64-encoded string. The string can be at most 1 megabyte in size.


String

A URL to fetch.

Must be a .bmp, .gif, .jpeg, .png, or .tiff file.

The maximum image upload size (= width × height) is 32,000,000 pixels, which gets shrunk to 25,000,000 pixels. Please pre-shrink your images to the latter size or smaller before uploading.


Enum, default: auto

Supported.

auto is interpreted as full. The rest are unchanged.


Enum, default: auto

Supported.

We also support full resolution for png output, so you do not need to resort to zip for large images.

The color.jpeg file in our zip output has black where the alpha is zero, instead of replicating the original pixels.


Boolean
Supported.

Supported.

Enum, default: rgba
Supported.

Supported.

Boolean, default: false

Pass in true to indicate that this is a test image.

Omit or pass in false for production images.

Test images are free to process, but the result will have a watermark embedded.

Pixian-specific parameter, may not be available in SDKs.

Result Headers

X-Type We always return other
X-Width, X-Height Supported and returned.
X-Max-Width, X-Max-Height Supported and returned when the input image was shrunk before processing.
X-Credits-Charged The actual credits charged.
X-Credits-Calculated The calculated credits that would have been charged if this were a production request. Only returned for test requests.
X-Foreground-Top, X-Foreground-Left, X-Foreground-Width, X-Foreground-Height Supported and returned.
X-Vcs-Ref Not supported and not returned.
X-Build-Date Not supported and not returned.
X-Version Not supported and not returned.
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Returned, but not fully supported.

If you're not being throttled, we return 500, 400, and [now].

If you're being throttled, we return 500, 0, and [15 seconds from now].

Pixian.AI does not apply hard rate limiting - we have a different philosophy and approach. Please see the discussion on our API docs page

Retry-After Returned, but operates on a different heuristic.

Unsupported Parameters

type, type_level Ignored. We always return X-Type=other
roi Ignored.
scale Ignored.
position Ignored.
add_shadows Ignored.
semitransparency Ignored.
bg_image_url Ignored.
bg_image_file Ignored.

Need one of the currently unsupported parameters? Please send us an email

Get API Key