Hotpot API Documentation

Integrate Hotpot functionality into your app, website, or company workflow with the Hotpot API.

Self-hosted options are available for companies requiring on-premise solutions for privacy or regulatory reasons.

The API is based on REST.

Access to the Hotpot API is available upon request.

API Testing & Code Creation

To simplify integration with Hotpot and other APIs, use our free API testing tool. This simpler version of Postman also creates code for other APIs besides Hotpot.

Demos

The API endpoints below power the Hotpot.ai AI services and graphic platform. View the Tools page for product demos of the AI service.

View code examples on our Github repo.

Partners

The Hotpot API is designed for enterprise-level scalability and reliability, suitable for bursty workloads or sustained high-volume traffic.

To ensure we adopt best practices and state-of-the-art technologies, Hotpot is proud to partner with leaders in cloud infrastructure and machine learning.

See partners.

Authentication

All API requests require authentication. To authenticate to the API, pass the Authorization HTTP header with the valid API key on each request. You can view and manage API credentials from your account.

Authorization: yMHw4UidZM1Hha82AZtMjI50bYCfC3sdX7vvB

Base URL

https://api-bin.hotpot.ai/

Credits

You can view the number of API credits left for any given service in the X-API-Credits-Left HTTP response header.

Responses

The Hotpot API uses standard HTTP status codes to communicate the result of API operations.

Status Codes
200
Success. Enjoy this amazing TikTok video. You deserve it.
400
Bad request. Invalid parameter values were provided.
401
Unauthorized. Make sure to include your API key in the Authorization HTTP header.
403
Forbidden. The API key you included in the Authorization header is not valid.
404
Missing endpoint. Make sure you use the correct URL path.
429
Rate limit or service quota exceeded. Make sure you have enough credits left in your account. Please employ exponential backoff before retrying.
500
Internal server errors. Please try again later or contact us if problems persist.

Art Maker

Create art with our AI image generator. Describe an image then let our AI interpret your words and transform them into art.

Endpoint
POST /make-art
Request Parameters
inputText
Required
Accepted Values: String.
The description of the graphic to be created. Please be specific and limit descriptions to 300 characters.
outputDim
Required
Accepted Values: 256, 512, 736.
The dimensions of the output graphic. Only square images are supported, but rectangular support is coming soon.
Request Example
curl -H 'Authorization: API_KEY_HERE' \
     -F 'inputText=A pig in the style of Starry Night by Vincent Van Gogh' \
     -F 'outputDim=256' \
     -o '/Users/porky/funky-pig.jpg' \
     https://api-bin.hotpot.ai/make-art
Response Properties
The resulting image.

Art Personalizer

Create personalized art with AI. Our deep learning model uses Neural Style Transfer to offer arbitrary artistic style transfer, allowing you to extract the style from one image and apply it to another. Most image style transfer models are trained on fixed, pre-defined styles. Ours is designed for flexibility and can accommodate styles not encountered during the training phase.

Endpoint
POST /remix-art
Request Parameters
contentImage
Required
Accepted Values: Image file.
The image to change.
styleImage
Required
Accepted Values: Image file.
The image whose style will be applied to the content (base) image.
focusContent
Required
Accepted Values: true or false.
Set to true if you want the result to resemble the base image (contentImage). Setting it to false will result in a more cartoonish image.
Request Example
curl -H 'Authorization: API_KEY_HERE' \
     -F '[email protected]/Users/porky/pig.jpg' \
     -F '[email protected]/Users/porky/funky.jpg' \
     -F 'focusContent=true' \
     -o '/Users/porky/funky-pig.jpg' \
     https://api-bin.hotpot.ai/remix-art
Response Properties
The resulting image (in a binary format) after transferring style to the content image.

Background Remover

Remove the background from images with AI.

Endpoint
POST /remove-background
Request Parameters
image
Required
Accepted Values: Image file.
The image from which to remove the background.
Request Example
curl -H 'Authorization: API_KEY_HERE' \
     -F '[email protected]/Users/porky/pig.jpg' \
     -o '/Users/porky/large-pig.jpg' \
     https://api-bin.hotpot.ai/remove-background
Response Properties
The resulting image (in a binary format) after removing the background from the input image.

Color Generator

Generate color palettes or matching colors based on the given colors.

Endpoint
POST /generate-color
Request Parameters
colorList
Required
Accepted Values: Array of 1-4 strings, each representing a color in hexadecimal format.
These colors are hints for the machine learning model, which will generate matching colors based on the hints. At least 1 hint must be provided.
Request Example
curl -H 'Authorization: API_KEY_HERE' \
     -H "Content-Type: application/json"
     --data '{"colorList": ["#6DADE0"]}' \
     https://api-bin.hotpot.ai/generate-color
Response Properties
colorList
Array of hexadecimal colors.

Graphic Enlarger

Enlarge pictures, game assets, textures, and other graphics in seconds. This AI upscaler can create images of higher resolution without losing quality and is optimized for e-commerce stores, app graphics, and photo prints.

Endpoint
POST /supersize-image
Request Parameters
image
Required
Accepted Values: Image file.
The image you want to enlarge.
sizeFactor
Required
Accepted Values: 2, 4.
The multiple by which to increase image resolution.
imageStyle
Required
Accepted Values: default, anime.
The style that best describes the image to modify. Our AI accounts for different styles when extrapolating from an input image to output images of higher resolution.
noiseCancellationFactor
Required
Accepted Values: 0, 1, 2.
The level of noise cancellation applied. 0 means no noise cancellation. 1 means low noise cancellation. 2 means medium noise cancellation.
Request Example
curl -H 'Authorization: API_KEY_HERE' \
     -F '[email protected]/Users/porky/pig.jpg' \
     -F 'sizeFactor=2' \
     -F 'imageStyle=default' \
     -F 'noiseCancellationFactor=0' \
     -o '/Users/porky/big-pig.jpg' \
     https://api-bin.hotpot.ai/supersize-image
Response Properties
The resulting image (in a binary format) after enlarging it.

Image Classifier

Categorize and tag images with the latest AI technology. Normal image classifiers require pre-defined categories or extensive training for custom categories. Our classifier can tag images based on custom categories -- without training. Optimized for e-commerce and media companies.

Endpoint
POST /classify-image
Request Parameters
image
Required
Accepted Values: Image file.
The image to classify.
labelList
Required
Accepted Values: Comma-delimited string of categories to consider during classification.
Remove white space between commas
Request Example
curl -H 'Authorization: API_KEY_HERE' \
     -F '[email protected]/Users/porky/pig.jpg' \
     -F 'labelList=shirt,jeans,blue,white,short-sleeve' \
     https://api-bin.hotpot.ai/classify-image
Response Properties
{ "shirt": 0.98, "jeans": 0.01, "blue": 0.95, "white": 0.02, "short-sleeve": 0.88 }

Picture Colorizer

Colorize black and white pictures with AI.

Endpoint
POST /colorize-picture
Request Parameters
image
Required
Accepted Values: Image file.
The black and white image which you want to colorize.
renderFactor
Required
Accepted Values: 0 - 50.
The colorization factor, as described on the DeOldify GitHub.
Request Example
curl -H 'Authorization: API_KEY_HERE' \
     -F '[email protected]/Users/porky/pig.jpg' \
     -F 'renderFactor=20' \
     -o '/Users/porky/large-pig.jpg' \
     https://api-bin.hotpot.ai/colorize-picture
Response Properties
The resulting image (in a binary format) after colorization.

Picture Restorer

Restore pictures with AI by removing scratches, sharpening colors, and enhancing faces. Repairs color and black & white photos.

Endpoint
POST /restore-picture
Request Parameters
image
Required
Accepted Values: Image file.
The image you want to restore.
withScratch
Required
Accepted Values: true or false.
Does the image have scratches?
Request Example
curl -H 'Authorization: API_KEY_HERE' \
     -F '[email protected]/Users/porky/pig.jpg' \
     -F 'withScratch=true' \
     -o '/Users/porky/restored-pig.jpg' \
     https://api-bin.hotpot.ai/restore-picture
Response Properties
The resulting image (in a binary format) after restoration.