Authentication

In order to access this API, the user agent needs to send your API key in the Authorization header using Bearer schema. You can request an API key from the 'API' section inside your dashboard.

Authorization: Bearer <your api token>

Authentication demo using the API key

const headers = new Headers();
headers.append("Authorization", "Bearer <your api token>");

const formdata = new FormData();

const requestOptions = {
  method: ...,
  body: ...,
  headers: headers,
};

fetch(url, requestOptions)
  

Image Upscaler

The image upscale feature provides a better image to the user by increasing its resolution.

Online demo

Method: POST

Endpoint: https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-upscaler

Authorization: Bearer <your api token>

Request Body - multipart/form-data

file - File

Required

The reference image to upscale.

Supported file formats: PNG, JPG, WEBP, PDF.

face_enhance - boolean

Whether or not to enhance the face(s) of the image.

Default value: true

upscale_size - integer

The image upscaling size.

Range: 2-10

Default value: 2

ai_model - string

Used to determine which AI model to use when upscaling an image.

Default value: standard

Enum values

standard

Best choice for upscaling various types of images, including those with people, objects, and a wide range of other subjects.

pro

Ideal for detailed photography. Preserves more details compared to the standard model, though it requires additional processing time.

creative

Perfect for adding artistic details to your image. This model introduces creative elements, diverging from the original image.

POSThttps://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-upscaler

const url = "https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-upscaler"

const headers = new Headers();
headers.append("Authorization", "Bearer <your api token>");

const formdata = new FormData();

formdata.append("file", "image.png");
formdata.append("face_enhance", true);
formdata.append("upscale_size", 2);

const requestOptions = {
  method: 'POST',
  body: formdata,
  headers: headers,
};

fetch(url, requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log("error", error));
  
RESPONSE - 200

{
    "image_url": "...",
    "operation_id": "..."
}

Image Vectorizer

The image vectorizer endpoint is used to convert a reaster image into a vector file.

Online demo

Method: POST

Endpoint: https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-vectorizer

Authorization: Bearer <your api token>

Request Body - multipart/form-data

file - File

Required

The reference image to vectorizer.

Supported file formats: PNG, JPG, WEBP, AVIF, PDF, SVG.

format - string

The file format in which to vectorize the image.

Default value: svg

Enum values

svg

Use to receive a vector file in SVG format.

eps

Use to receive a vector file in EPS format

POSThttps://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-vectorizer

const url = "https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-vectorizer"

const headers = new Headers();
headers.append("Authorization", "Bearer <your api token>");

const formdata = new FormData();

formdata.append("file", "image.png");
formdata.append("format", 'svg');

const requestOptions = {
  method: 'POST',
  body: formdata,
  headers: headers,
};

fetch(url, requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log("error", error));
  
RESPONSE - 200

{
    "image_url": "...",
    "operation_id": "..."
}

Background Remover

The image background removal tool is used to automatically remove the background from an image.

Online demo

Method: POST

Endpoint: https://creative-ai-api.vercel.app/api/v2.0/ai-tools/background-remover

Authorization: Bearer <your api token>

Request Body - multipart/form-data

file - File

Required

The reference image to remove the background from.

Supported file formats: PNG, JPG, WEBP, PDF

POSThttps://creative-ai-api.vercel.app/api/v2.0/ai-tools/background-remover

const url = "https://creative-ai-api.vercel.app/api/v2.0/ai-tools/background-remover"

const headers = new Headers();
headers.append("Authorization", "Bearer <your api token>");

const formdata = new FormData();

formdata.append("file", "image.png");

const requestOptions = {
  method: 'POST',
  body: formdata,
  headers: headers,
};

fetch(url, requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log("error", error));
  
RESPONSE - 200

{
    "image_url": "...",
    "operation_id": "..."
}

Image Generator

Generate images from text.

Online demo

Method: POST

Endpoint: https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-generator

Authorization: Bearer <your api token>

Request Body - application/json

prompt - string

Required

The prompt parameter is the text that directs the AI to create an image based on your description. It captures the concept or scene you want the AI to visualize. A well-crafted prompt, like "A peaceful forest at night with a glowing moon," helps ensure accurate results.

negative_prompt - string

The negative_prompt parameter allows you to guide the AI by indicating what you don't want in the image, refining the result to better match your vision.

number_of_results - string

Describes the number of images the API will generate and return.

Range: 1-4

Default value: 1

aspect_ratio - string

Describes the aspect ratio which will be applied on the generated image(s).

Default value: 1:1

Enum values

1:1

Perfectly square, providing a harmonious and proportional layout.

9:16

Ideal for vertical content, designed to captivate and enhance visual storytelling.

16:9

Widescreen format, ideal for capturing larger landscapes.

4:3

Elegant horizontal format, portrait orientation.

3:4

Portrait-oriented, gracefully accentuating vertical features.

3:2

A classic proportion that offers a broader perspective.

POSThttps://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-generator

const url = "https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-generator"

const headers = new Headers();
headers.append("Authorization", "Bearer <your api token>");
headers.append("Content-Type", "application/json");


const requestOptions = {
  method: 'POST',
  body: JSON.stringify({
    "prompt": "A medieval castle siege taking place in France in 1356."
    "negative_prompt": "Mythological creatures"
    "number_of_results": 3
    "aspect_ratio": "16:9"
  }),
  headers: headers,
};

fetch(url, requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log("error", error));
  
RESPONSE - 200

{
    "image_url": "...",
    "operation_id": "..."
}

Image Colorizer

The image colorizer endpoint is used to colorize a black-and-white image.

Online demo

Method: POST

Endpoint: https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-colorizer

Authorization: Bearer <your api token>

Request Body - multipart/form-data

file - File

Required

The original image to colorize.

Supported file formats: PNG, JPG, WEBP

POSThttps://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-colorizer

const url = "https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-colorizer"

const headers = new Headers();
headers.append("Authorization", "Bearer <your api token>");

const formdata = new FormData();

formdata.append("file", "image.png");

const requestOptions = {
  method: 'POST',
  body: formdata,
  headers: headers,
};

fetch(url, requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log("error", error));
  
RESPONSE - 200

{
    "image_url": "...",
    "operation_id": "..."
}

Image Inpaint

The image inpaint endpoint is used to removed unwanted parts from an image.

Online demo

Method: POST

Endpoint: https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-inpaint

Authorization: Bearer <your api token>

Request Body - multipart/form-data

image - File

Required

The original image to inpaint.

Supported file formats: PNG, JPG, WEBP

Demo:

mask - File

Required

An image containing the negative mask of the unwanted parts to delete.

Supported file formats: PNG, JPG, WEBP

Demo:

POSThttps://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-inpaint

const url = "https://creative-ai-api.vercel.app/api/v2.0/ai-tools/image-inpaint"

const headers = new Headers();
headers.append("Authorization", "Bearer <your api token>");

const formdata = new FormData();

formdata.append("image", "image.png");
formdata.append("mask", "mask.png");

const requestOptions = {
  method: 'POST',
  body: formdata,
  headers: headers,
};

fetch(url, requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log("error", error));
  
RESPONSE - 200

{
    "image_url": "...",
    "operation_id": "..."
}