Skip to content

Make a color transparent

POST
/v1/process/color-to-alpha

Replace a specific color with transparency. The tolerance parameter controls how similar a pixel must be to the target color to be made transparent.

Costs 0.02 in credits (EUR, excluding VAT; VAT is added when you buy credits) per call; see GET /v1/pricing.

Media type application/json
object
color
required

Hex color to make transparent (#RRGGBB).

string
input_image_url
required

HTTPS URL of the image.

string
tolerance

Color distance tolerance (0-255, default 10). Higher = more aggressive.

null | integer

OK

Media type application/json
object
ai_generated

When true, treat the output as AI-generated content (EU AI Act Art. 50). False when no AI marker was found in the input; this does not mean the input was not made with AI.

boolean
balance_eur

Remaining balance after this operation, in credits (EUR, excluding VAT). Omitted when it cannot be stated exactly (the charge could not be recorded, or the balance could not be read).

string
content_type

MIME type of the output image.

string
cost_eur

What this operation charged, in credits (EUR, excluding VAT): processing_cost_eur, or its override in processing_operation_costs (GET /v1/pricing). 0.00 when the charge could not be recorded; you are then not charged.

string
expires_at

ISO 8601 expiry time of the signed URL.

string
image_url

Signed URL of the processed image. Expires in 1 hour.

string
operation

Processing operation performed.

string

Bad Request

Media type application/json
object
details
error
string
message
string
request_id
string

Unauthorized

Media type application/json
object
details
error
string
message
string
request_id
string

Payment Required

Media type application/json
object
details
error
string
message
string
request_id
string

Forbidden

Media type application/json
object
details
error
string
message
string
request_id
string

Not Found

Media type application/json
object
details
error
string
message
string
request_id
string

Conflict

Media type application/json
object
details
error
string
message
string
request_id
string

Unprocessable Entity

Media type application/json
object
details
error
string
message
string
request_id
string

Too Many Requests

Media type application/json
object
details
error
string
message
string
request_id
string

Unavailable For Legal Reasons

Media type application/json
object
details
error
string
message
string
request_id
string

Internal Server Error

Media type application/json
object
details
error
string
message
string
request_id
string

Bad Gateway

Media type application/json
object
details
error
string
message
string
request_id
string

Service Unavailable

Media type application/json
object
details
error
string
message
string
request_id
string