Add AI technology to your app, website, or workflow with the Hotpot SaaS API.
Self-hosted solutions are offered to enterprises requiring maximum privacy and architectural control.
API access requires payment.
Contact us for API access.
Demos
These API endpoints power the Hotpot.ai AI services and graphic platform. View the Tools page for AI product demos.
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
Credits
View the number of API credits left 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.
Bad request. Invalid parameter values were provided.
Unauthorized. Please include your API key in the Authorization
HTTP header.
Forbidden. The API key in the Authorization
header is invalid.
Missing endpoint. Please verify the URL path.
Rate limit or service quota exceeded. Please verify API credits remaining and employ exponential backoff before retrying.
Internal server error. Please try again later or
contact us if problems persist.
Art Generator
Create art and images with AI. Describe ideas in a few words, and watch our AI bring it to life.
Accepted Values: String.
The description of the graphic to be created. Please be specific and limit descriptions to 380 characters.
Accepted Values: Image URL.
Provide an image as a starting point for generation. This image URL must be accessible by server, not only by browser. Because the model is optimized for certain image sizes, this image gets resized before generation.
Accepted Values: Float, [0.1-0.96].
How much to modify @seedImage. Higher values show less resemblance to @seedImage.
Accepted Values: String.
The ID representing the style of the created image. For custom styles, use ID of 0. See https://hotpot.ai/art-maker/style-catalog for styles and ID.
Accepted Values: String.
Hints to guide image generation by telling the model to avoid or minimize these properties.
Accepted Values: Boolean.
Whether to create different images for the same prompt. Default value is false.
Accepted Values: Boolean.
Whether to create a repeatable, tileable image. Usedful for game assets, backgrounds, wallpapers, and patterns. Default value is false.
curl -H 'Authorization: API_KEY_HERE' \
-F 'inputText=A pig in the style of Starry Night by Vincent Van Gogh' \
-F 'styleId=23' \
https://api.hotpot.ai/make-art
The created image as a PNG file.
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.
Accepted Values: Image file.
The image to change.
Accepted Values: Image file.
The image whose style will be applied to the content (base) image.
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.
curl -H 'Authorization: API_KEY_HERE' \
-F 'contentImage=@/Users/porky/pig.jpg' \
-F 'styleImage=@/Users/porky/funky.jpg' \
-F 'focusContent=true' \
-o '/Users/porky/funky-pig.jpg' \
https://api.hotpot.ai/remix-art
The resulting image (in binary format) after transferring style to the content image.
Background Remover
Remove the background from images with AI.
Accepted Values: Image file.
The image from which to remove the background. Either this parameter or @imageUrl must be provided.
Accepted Values: string.
The public URL to an image from which to remove the background. Either this parameter or @image must be provided.
Accepted Values: Image file.
The image to use as a new background.
Accepted Values: string.
The public URL to an image that will serve as the new background.
Accepted Values: string.
The hex color code to serve as the new background.
Accepted Values: true
or false
.
By default, the API returns an edited image with the background removed. If true, the API returns an alpha mask instead. This is useful for large images, as the alpha mask can reduce transfer time and bandwidth consumed. The alpha mask can be applied to the original image to produce an edited image on the client.
Accepted Values: jpg, png,
or webp
.
By default, the API returns PNG images. The API can also return JPG and WebP images. To compress images, use jpg
or webp
.
compressionFactor
Optional
Accepted Values: 10-100
.
By default, the API performs no compression. If fileType
is set to jpg
or webp
, the API uses a compression level of 85
, which can be customized with this parameter. This value is ignored if fileType
is not jpg
or webp
.
curl -H 'Authorization: API_KEY_HERE' \
-F 'image=@/Users/porky/pig.jpg' \
-o '/Users/porky/large-pig.jpg' \
https://api.hotpot.ai/remove-background
The image (in binary format) after removing the background from the input image. The default background is transparent. By default, the result has a transparent background. However, if a background value is provided, the result will be superimposed on this background. Only one background value can be submitted.
Object Remover
Remove people, animals, trees, and other objects from images in seconds. Our AI is designed to recognize people, trees, and other common objects, naturally erasing them from the picture and leaving behind only the photograph you want.
Accepted Values: Image file.
The image to change.
Accepted Values: Mask image.
The image file defining the areas to erase. The image must be black and white, with white pixels indicating areas to erase.
curl -H 'Authorization: API_KEY_HERE' \
-F 'image=@/Users/porky/pig.jpg' \
-F 'mask=@/Users/porky/mask.jpg' \
-o '/Users/porky/funky-pig.jpg' \
https://api.hotpot.ai/remove-object
The resulting image (in binary format) after erasing the areas indicated in the mask.
Photo Upscaler
Upscale photos, arts, game assets, textures, and more in seconds. Our AI can upscale images without sacrifing quality and is optimized for people, art, and products.
Accepted Values: Image file.
The image to upscale.
Accepted Values: 2
, 4
, 8
, 10
.
The multiple by which to increase image resolution.
Accepted Values: png
, jpg
.
The image type of the upscaled image. Defaults to png
.
Accepted Values: Integer, [1-100].
The quality or compression level of the upscaled image. Valid only for jpg
or webp
.
curl -H 'Authorization: API_KEY_HERE' \
-F 'image=@/Users/porky/pig.jpg' \
-F 'sizeFactor=2' \
-o '/Users/porky/big-pig.jpg' \
https://api.hotpot.ai/upscale-photo
The resulting image (in binary format) after enlarging it.
Picture Colorizer
Colorize black and white pictures with AI.
Accepted Values: Image file.
The black and white image which you want to colorize.
curl -H 'Authorization: API_KEY_HERE' \
-F 'image=@/Users/porky/pig.jpg' \
-F 'renderFactor=20' \
-o '/Users/porky/large-pig.jpg' \
https://api.hotpot.ai/colorize-picture
The resulting image (in binary format) after colorization.
Picture Restorer
Restore pictures with AI by removing scratches, sharpening colors, and enhancing faces. Repairs color and black & white photos.
Accepted Values: Image file.
The image you want to restore.
Accepted Values: true
or false
.
Does the image have scratches?
curl -H 'Authorization: API_KEY_HERE' \
-F 'image=@/Users/porky/pig.jpg' \
-F 'withScratch=true' \
-o '/Users/porky/restored-pig.jpg' \
https://api.hotpot.ai/restore-picture
The resulting image (in binary format) after restoration.
Stable Diffusion Normal
Stable Diffusion XL, enhanced with proprietary optimizations for improved quality and lower latency. Runs on Hotpot standard servers. See /art-generator for premium quality and to mimic Hotpot styles.
POST
/stable-diffusion-normal
Accepted Values: String.
The text to turn into an image.
Accepted Values: Image URL.
Provide an image as a starting point for generation. This image URL must be accessible by server, not only by browser. Because the model is optimized for certain image sizes, this image also gets resized before generation.
Accepted Values: Float, [0.1-0.96].
How much to modify @seedImage. Higher values show less resemblance to @seedImage.
Accepted Values: Float, [1-50].
The strength for classifier-free guidance. Higher values follow prompts more faithfully but may show lower creativity.
Accepted Values: String.
Hints to guide image generation by telling the model to avoid or minimize these properties.
Accepted Values: Integer, [1-32000000].
The seed value for generation. Omit parameter to randomize creations.
Accepted Values: Boolean.
Whether to create a repeatable, tileable image. Usedful for game assets, backgrounds, wallpapers, and patterns. Default value is false.
curl -H 'Authorization: API_KEY_HERE' \
-F 'inputText=Happy pig on a mountain' \
-o '/Users/porky/funky-pig.jpg' \
https://api.hotpot.ai/stable-diffusion-normal
The created image as a PNG file.
Stable Diffusion Premium
Enhanced version of /stable-diffusion-normal for even higher image quality and our lowest latency. Based on Stable Diffusion XL and runs on A100s. See /art-generator for maximum quality and to mimic Hotpot styles.
POST
/stable-diffusion-premium
Accepted Values: String.
The text to turn into an image.
Accepted Values: Image URL.
Provide an image as a starting point for generation. This image URL must be accessible by server, not only by browser. Because the model is optimized for certain image sizes, this image also gets resized before generation.
Accepted Values: Float, [0.1-0.96].
How much to modify @seedImage. Higher values show less resemblance to @seedImage.
Accepted Values: Float, [1-50].
The strength for classifier-free guidance. Higher values follow prompts more faithfully but may show lower creativity.
Accepted Values: String.
Hints to guide image generation by telling the model to avoid or minimize these properties.
Accepted Values: Integer, [1-32000000].
The seed value for generation. Omit parameter to randomize creations.
Accepted Values: Boolean.
Whether to create a repeatable, tileable image. Usedful for game assets, backgrounds, wallpapers, and patterns. Default value is false.
curl -H 'Authorization: API_KEY_HERE' \
-F 'image=@/Users/porky/pig.jpg' \
-o '/Users/porky/funky-pig.jpg' \
https://api.hotpot.ai/stable-diffusion-premium
The created image as a PNG file.
Stable Diffusion Budget
Stable Diffusion XL, optimized for the lowest possible cost.
POST
/stable-diffusion-budget
Accepted Values: String.
The text to turn into an image.
Accepted Values: Image URL.
Provide an image as a starting point for generation. This image URL must be accessible by server, not only by browser. Because the model is optimized for certain image sizes, this image also gets resized before generation.
Accepted Values: Float, [0.1-0.96].
How much to modify @seedImage. Higher values show less resemblance to @seedImage.
Accepted Values: Float, [1-50].
The strength for classifier-free guidance. Higher values follow prompts more faithfully but may show lower creativity.
Accepted Values: String.
Hints to guide image generation by telling the model to avoid or minimize these properties.
Accepted Values: Integer, [1-32000000].
The seed value for generation. Omit parameter to randomize creations.
Accepted Values: Boolean.
Whether to create a repeatable, tileable image. Usedful for game assets, backgrounds, wallpapers, and patterns. Default value is false.
curl -H 'Authorization: API_KEY_HERE' \
-F 'image=@/Users/porky/pig.jpg' \
-o '/Users/porky/funky-pig.jpg' \
https://api.hotpot.ai/stable-diffusion-budget
The created image as a PNG file.
Face Enhancer
Enhance and repair damaged faces with the latest technology. AI image generators and old photos often contain faces distorted in several ways: hazy colors, unnatural eyes, blurriness, scratches, and asymmetrical features. Our AI corrects these flaws in seconds, producing more natural images.
Accepted Values: Image file.
The image to change.
curl -H 'Authorization: API_KEY_HERE' \
-F 'image=@/Users/porky/pig.jpg' \
-o '/Users/porky/funky-pig.jpg' \
https://api.hotpot.ai/enhance-face
The resulting image (in binary format) after face enhancement.
Color Generator
Generate color palettes or matching colors based on the given colors.
Accepted Values: Array of 0-4 strings, each representing a color in hexadecimal format.
These colors guide our machine learning model, which generate ideas to match the provided colors. If the array is empty, our AI creates suggetions based on a random color.
curl -H 'Authorization: API_KEY_HERE' \
-H "Content-Type: application/json" \
--data '{"colorList": ["#6DADE0"]}' \
https://api.hotpot.ai/generate-color
Array of hexadecimal colors.
Text Color Generator
Generate attractive and readable text colors, given a background color
POST
/text-color-generator
Accepted Values: String in representing a color in hexadecimal format.
If no color is provided, our AI returns suggetions based on a random color. This is not advised.
curl -H 'Authorization: API_KEY_HERE' \
-H "Content-Type: application/json" \
--data '{"backgroundColor": "#6DADE0"}' \
https://api.hotpot.ai/text-color-generator
Array of JSON objects representing text colors. Each JSON object contains two fields: (1) hexadecimal color; (2) W3C contrast ratio score, which ranges from 1 to 21. Example: [ { "textColor": "#888888", "readabilityScore": "3.28" }, { "textColor": "#222222", "readabilityScore": "1.88" } ]