API Endpoint Access URL
https://api.pixlab.io/colorspace_cmyk
Get Your API Key & Try COLORSPACE_CMYK Now ↗Description
Change the colorspace of a given image to the CMYK color model. Ideal for developers and creators looking to optimize images for print.
HTTP Methods
GET, POST
HTTP Parameters
Required
Fields | Type | Description |
---|---|---|
img |
URL | Input image URL. If you want to upload your image directly from your app, then submit a multipart/form-data POST request. |
key |
String | Your PixLab API Key ↗. You can also embed your key in the WWW-Authenticate: HTTP header and omit this parameter if you want to. |
Optional
Fields | Type | Description |
---|---|---|
blob |
Boolean | By default, this API endpoint returns a JSON Object holding the link to the image output. Set to true to receive the raw image binary instead. |
POST Request Body
Use when submitting via POST instead of GET:
Allowed Content-Types:
multipart/form-data
(for direct image uploads)application/json
(for pre-uploaded images)
Call store endpoint first if you need to upload an image before processing.
HTTP Response
Returns application/json
if the optional blob parameter is not set.
This endpoint returns a JSON response when the blob parameter is omitted. When blob is enabled, the endpoint returns raw image binary data instead. The JSON response contains these fields:
Fields | Type | Description |
---|---|---|
status |
Integer | Status code 200 indicates success. Any other code indicates an error. |
link |
URL | URL to the processed image stored on pixlab.xyz servers. You can configure custom S3 storage (see your console for configuration). |
id |
String | Unique identifier for the processed image. |
error |
String | Error description when status ≠ 200. |
Code Samples
# Refer to the PixLab Github Repository at: https://github.com/symisc/pixlab for the full list of production ready code samples...
// Refer to the PixLab Github Repository at: https://github.com/symisc/pixlab for the full list of production ready code samples...
# Refer to the PixLab Github Repository at: https://github.com/symisc/pixlab for the full list of production ready code samples...
# Refer to the PixLab Github Repository at: https://github.com/symisc/pixlab for the full list of production ready code samples...
Similar API Endpoints
colorspace_rgb, colorspace_gray, colorspace_ycbcr, colorspace_hsl, colorspace_srgb, colorspace_transparent, image_colorspace, grayscale