ClipCloud API Documentation
A REST API for AI image generation: one POST request to create an image in any of 35 ready-made styles, one GET request to download the result. Free daily quota on every key, paid mode for volume, and a 10% referral program for software developers.
Quick start: send POST /api/creation with a JSON body {"prompt": "...", "styleName": "HD-HQ"} and your apikey. You get back a creation_id. Then poll GET /api/creation/{creation_id} until it returns WebP download links. Get a free key from @clipcloudbot or the web panel.
https://clipcloud.clipai.pro
mirror:
https://clipcloud-rumirror.clipai.pro
Main Information
You don't need to add the API manually if you already have a script or template for ZennoPoster! In that case, use the ready-made module for ZennoPoster.
We also have a plugin for WordPress.
The machine-readable OpenAPI specification is here.
The ClipCloud API is simple. There are just three steps:
Describe your image
Decide what you want to see and write a short prompt for it. English works best. That is the whole setup.
Send the request
Send one request with your prompt and a style. ClipCloud picks the right neural network and all the settings for that style automatically. Tip: send the request as early as you can, even before you actually need the image.
Get your images
Check whether the images are ready. As soon as they are, you get direct download links.
Preparing the request
First, decide exactly what you want to generate. It is highly recommended to send your prompt in English.
Ideally, your prompt should contain only the information about what should appear in the image. However, you can also include general context (e.g. the title of the article you are illustrating), though this may reduce quality. For simple prompts like that, we recommend using any style with HQ in its name (for example, FullHD-HQ-h).
If you are a software owner, don't forget to join our developer affiliate program: you'll earn 10% of your users' spending. Learn more in the ClipCloud bot by clicking "For Developers".
Sending the generation request
Next, you send the image-generation request. We recommend all users stick to generation by style: ClipCloud will automatically configure all the necessary parameters, everything from the neural network to the number of steps and other non-obvious settings. Advanced generation is needed only in very rare cases.
For maximum speed, send the generation request in advance, as soon as you know exactly what needs to be generated. Then perform the next step (retrieving the generation result) at the point in your program's workflow when the image is actually needed.
Retrieving the results
Finally, check whether the images are ready. If they are complete at the time of your query, you'll immediately get download links for your images.
For developers: integrate ClipCloud into your software and earn 10% of your users' spending, with no extra steps or actions required from them. Add your soft_id to each generation request. You can find the soft_id in your profile in the web panel or in the "Referral system" section of the Telegram bot.
Authentication
Every request must carry your API key, which always starts with clip-. You can get one from the Telegram bot @clipcloudbot or manage it in the web panel. Two equivalent ways to pass the key:
- Query parameter:
?apikey=clip-...(used in the examples below); - HTTP header:
Authorization: Bearer clip-...
Cost and balance: the 🖼️ credit
Prices and the cost field are counted in ClipCloud image credits, written 🖼️ — not in dollars. It is the same idea as tokens in a text-AI API: one small unit of account that keeps very different images comparable. The rate is fixed:
1 🖼️ = $0.0025. So an HD-HQ image at 1.8 🖼️ costs $0.0045, and a lowquality one at 0.2 🖼️ costs $0.0005.
There are two separate counters, and they are easy to mix up — credits are not the same thing as free images:
| cost 🖼️ credits |
Charged for the whole request (all count images). Returned when the request ran in paid mode. |
| balance 🖼️ credits |
Your remaining paid balance. |
| free_cost images |
Whole free images spent, not credits. Returned when the request ran in free mode, instead of cost. |
| free_balance images |
How many of the 25 free images per day are left. Refreshed daily. |
Typical prices per image:
| styleName | Price | In dollars |
|---|---|---|
lowquality | 0.2 🖼️ | $0.0005 |
standard | 0.7 🖼️ | $0.00175 |
smallHQ | 0.9 🖼️ | $0.00225 |
anime | 1.0 🖼️ | $0.0025 |
HQ-4K-h | 1.4 🖼️ | $0.0035 |
HD-HQ | 1.8 🖼️ | $0.0045 |
FullHD-HQ-h | 4.5 🖼️ | $0.01125 |
FullHD-HQ-v | 4.7 🖼️ | $0.01175 |
Published prices are indicative. For the exact price of a specific request, send it with check_cost: true: the server answers with the price and does not start a generation or spend anything.
Image Generation
Standard generation (by style)
Ideal for most users. Choosing a style also configures the neural network, image dimensions, and other settings.
Pros:
- Quick to get started.
- All parameters are pre-set: you won't get "noise" instead of your requested image by mistake.
- You can automate style selection based on the prompt.
Cons:
- Limited style customization.
Advanced generation
Useful only in rare cases, for example, if you need to fine-tune a style for your specific requirements.
Pros:
- Ability to create your own style or modify an existing one (e.g., change the image size).
Cons:
- High complexity.
- Parameters aren't always intuitive.
- Greater risk of ending up with "noise" instead of a usable image.
If you plan to integrate ClipCloud into your software for multiple users, we recommend using only standard generation (by style).
Image generationStandard generation (by style)
/api/creation?apikey=Generate an image by choosing a style. This is the recommended way for everyone.Standard image generation by style, recommended for all service users.
As a result of this request you will receive the ID of the started generation. It will be one, even if you specify count > 1. This ID will be needed later to obtain the result of creating the image or images.
Only the prompt and styleName parameters in the request body, and apikey in the request URL, are mandatory.
POST request, data format: application/json (as, for example, in the GPT API).
Query Parameters
| Parameter | Description |
|---|---|
| apikeyREQUIRED string |
Your API key from the Telegram bot @clipcloudbot or the web panel. A ClipCloud API key always begins with clip-. |
Body Parameters
| Parameter | Description |
|---|---|
| promptREQUIRED string |
The request to generate an image. It is highly recommended to enter it in English. |
| negative_prompt string |
Specify what you do not want to see in the image. |
| styleNameREQUIRED string |
The name of the image style. All 35 supported values are listed in the style table below; the live list is also returned by GET /api/styles. |
| count number |
The number of images generated with a single request. Minimum: 1, Maximum: 10 |
| soft_id number |
The ID of your software. You can find it in the ClipCloud bot to receive referral payments: 10% of the cost of each request through your software. |
| check_cost boolean |
false: generate an image with this request. true: do not start generation, only find out the cost of the request when using the paid mode. |
Supported styles (styleName values)
| styleName | Description | Size | |
|---|---|---|---|
standard | Low quality, fast generation | 1024×1024 | free tier |
standard-512 | Low quality | 512×512 | free tier |
lowquality | Low quality, very fast generation | 512×512 | free tier |
smallHQ | High quality | 512×512 | free tier |
HD-HQ | High quality | 1024×1024 | free tier |
FullHD-HQ-h | Max quality (horizontal) | 1536×1024 | free tier |
FullHD-HQ-v | Max quality (vertical) | 1024×1536 | free tier |
standard-2 | High quality (alternative style) | 1280×832 | free tier |
standard-2-FullHD | High quality (alternative style) | 1536×1024 | free tier |
photorealistic-1 | Photorealism (medium quality) | 1024×1024 | free tier |
photo-horizontal | Photorealism (high quality) | 1152×896 | free tier |
photo-portrait | Photo portrait style | 1024×1024 | free tier |
anime | Anime style | 1024×1024 | free tier |
graffiti | Graffiti style | 1024×768 | free tier |
illustration | Illustration style | 1024×1024 | free tier |
oldphoto | Old photographs style | 1024×1024 | free tier |
baroque | Baroque style | 1024×1024 | free tier |
aquarelle | Watercolor style | 1024×1024 | free tier |
pixel-art | Pixel art style | 1024×1024 | free tier |
pop-art | Pop art style | 1024×1024 | free tier |
pop-art-512 | Pop art style | 512×512 | free tier |
neon-lines | Neon lines style | 1024×1024 | free tier |
neon-noir | Neon noir style | 1024×1024 | free tier |
tilt-shift | Tilt-shift style (miniature imitation) | 1024×1024 | free tier |
HQ-4K-h | High quality, upscaled to 4K | 4K | free tier |
HQ-768-512-h | High quality (horizontal) | 768×512 | free tier |
HQ-832-448-h | High quality (horizontal) | 832×448 | free tier |
HQ-832-640-h | High quality (horizontal) | 832×640 | free tier |
HQ-1024-640-h | High quality (horizontal) | 1024×640 | free tier |
HQ-1200-640-h | High quality (horizontal) | 1200×640 | free tier |
HQ-1280-720-h | High quality (horizontal) | 1280×720 | free tier |
HQ-1920-1024-h | High quality, upscaled (horizontal) | 1920×1024 | free tier |
HQ-512-768-v | High quality (vertical) | 512×768 | free tier |
HQ-640-1024-v | High quality (vertical) | 640×1024 | free tier |
HQ-1024-1920-v | High quality, upscaled (vertical) | 1024×1920 | free tier |
Note: for upscale styles (e.g. HQ-4K-h, HQ-1920-1024-h, HQ-1024-1920-v) the width and height returned by GET /api/styles may differ from the final image size, because a separate neural network upscales their quality. Working with such styles is no different from using any other style.
Responses
200 Image generation successfully started
| success boolean | true: the image is being generated; false: an error occurred during generation. |
| creation_id string | Generation ID (will be needed in the request to get the result). |
{
"success": true,
"creation_id": "12345678-abcd-ef12-3456-7890abcdef12"
}200 Cost check only (when check_cost: true)
When check_cost is true, generation is not started; the server only returns the price of this request in paid mode, in 🖼️ credits (1 🖼️ = $0.0025):
{
"success": true,
"cost": 0.7
}400 Invalid request parameters
Error creating the image generation request: for example, no prompt entered, or a non-existent styleName.
| success boolean | Always false. |
| message string | Server message, e.g. Invalid request data. |
| errors object | Per-field validation errors (present for validation failures). |
{
"success": false,
"message": "Invalid request data",
"errors": { "prompt": ["The prompt field is required."] }
}{
"success": false,
"message": "Style name 'nosuchstyle' is invalid"
}400 Not enough balance
Not enough free generations left. The same error will appear after the paid balance is exhausted: after the free balance is also spent.
| success boolean | Always false. |
| message string | Server message. |
401 API key missing or invalid
{ "success": false, "message": "Invalid API Key" }If no key is passed at all, the message is Missing Authorization Header.
415 Wrong request format
The POST request format must be application/json. The same format is used, for example, in the GPT API. Most likely you need to add the header: "Content-Type": "application/json".
If you are making a request through ZennoPoster, then in the POST request block: select "Data type" then "Other" and enter application/json in the field next to it.
Example
Advanced generation (with additional parameters)
/api/creation?apikey=Advanced image generation, recommended only in exceptional cases: for experienced users who want to configure every parameter.
As a result of this request you will receive the ID of the started generation. It will be one, even if you specify count > 1.
Only the prompt parameter in the request body and apikey in the request URL are mandatory. However, to obtain good results with advanced generation you will also need to specify at least model, width, height, and quality. If you prefer not to specify them yet still achieve good results, use style-based generation instead.
Body Parameters
| Parameter | Description |
|---|---|
| promptREQUIRED string |
The prompt for image generation. It is highly recommended to enter it in English. |
| negative_prompt string |
Specify what you do not want to see in the image. |
| temperature number |
Roughly equivalent to the "CFG Scale" parameter in other services. The higher its value, the more the AI takes the prompt into account. Maximum: 15 |
| width number |
Image width. Minimum: 512, Maximum: 4096 |
| height number |
Image height. Minimum: 512, Maximum: 4096 |
| quality string |
Image quality:
|
| model string |
AI model used:
|
| count number |
Number of images generated with a single request. Minimum: 1, Maximum: 10 |
| soft_id number |
Your software ID for referral payouts: 10% of the cost of every request through your software. |
| check_cost boolean |
false: generate; true: only check the cost of the request in paid mode. |
Responses
Identical to standard generation: 200 generation started / cost check, 400 invalid parameters or insufficient balance, 401 bad API key, 415 wrong content type.
Example
Obtaining Results
/api/creation/{creation_id}?apikey=GET request. In the request URL: your API key and the generation ID obtained earlier in the image-generation request response. The response contains the link(s) to the generated images (one link per image).
How to write the polling loop. Keep polling only while you get HTTP 200 without a results key — that is the status: "in_progress" response, and a running generation returns it from the very first poll. Poll about every 30 seconds and give up after 30 minutes.
Stop on 400, 401 and 500. None of them ever turns into a result: 400 means a malformed ID, 401 a bad key, and 500 means the creation_id is unknown or expired. Retrying a 500 will not help — the ID will never start existing — it only hangs your loop until the timeout and hides the real error.
Path Parameters
| creation_idREQUIRED string |
Generation ID obtained earlier in the image-generation request response. Enter it without braces {}, quotation marks, or any characters other than those returned in the previous response. |
Responses
200 Still generating
The image is still being generated. Repeat the request after some time.
| success boolean | Generation ID successfully found. |
| message string | Server message: In progress. |
| status string | Machine-readable state, e.g. in_progress. |
| creation_id string | Generation ID (the same one you entered in this request). |
{
"success": true,
"message": "In progress",
"status": "in_progress",
"creation_id": "12345678-abcd-ef12-3456-7890abcdef12"
}200 Image generated successfully
| success boolean | Generation ID successfully found. |
| message string | Server message. |
| creation_id string | Generation ID (the same one you entered in this request). |
| cost number | Total cost of all images generated in this request, in 🖼️ credits (1 🖼️ = $0.0025) — not dollars. Returned when paid mode was used. |
| free_cost number | Number of free generations spent (whole images, not credits), returned when free mode was used (instead of cost). |
| censored number | How many images were canceled by the server because they potentially violated the usage rules. Cancellation usually occurs for NSFW prompts and similar cases. |
| results array | URLs of generated images (temporary download links, WebP format). |
{
"success": true,
"message": "Images processed succesfully",
"creation_id": "12345678-abcd-ef12-3456-7890abcdef12",
"cost": 2.2,
"censored": 0,
"results": [
"https://clipcloud.clipai.pro/images/326432e4661c42d709432284c836d410b5.webp",
"https://clipcloud.clipai.pro/images/c9436e4e57c1d9b2eb81b48d85a98a88c1.webp"
]
}{
"success": true,
"message": "Images processed succesfully",
"creation_id": "12345678-abcd-ef12-3456-7890abcdef12",
"free_cost": 1,
"censored": 0,
"results": [
"https://clipcloud.clipai.pro/images/9f40fb913134b6cc209459798ebb5623cd_free.webp"
]
}400 Invalid parameter format
One of the parameters is incorrect: for example, the generation ID is in the wrong format.
{
"success": false,
"message": "Invalid request data",
"errors": { "creation_id": ["The value 'notanid' is not valid."] }
}401 Invalid API key
{ "success": false, "message": "Invalid API Key" }404 Wrong URL
The request URL is incorrect. If a "404" response appears when requesting to download an image, the download link has either expired or is incorrect.
405 Missing generation ID
The request URL is incorrect, or the generation ID is not specified in the request.
500 Unknown or expired generation ID
You specified an incorrect or expired generation ID, although it is probably in the correct format. Or a server-side error occurred.
{ "success": false, "message": "Object reference not set to an instance of an object." }Example
Other Requests
In this category you'll find miscellaneous requests that may be useful (but are not mandatory) in certain program workflows: checking the API-key balance and retrieving available styles.
Balance Inquiry
/api/users/mybalance?apikey=GET request. The API key is in the request URL. The response contains information about that API key's balance.
Responses
200 Balance information
| success boolean | Request completed successfully. |
| balance number | Balance available for paid mode, in 🖼️ credits (1 🖼️ = $0.0025). |
| free_balance number | Free images left today, out of 25 (whole images, not credits). Refreshed daily. |
{
"success": true,
"balance": 431.9,
"free_balance": 25
}401 Invalid API key
{ "success": false, "message": "Invalid API Key" }Example
Available Styles
/api/styles?apikey=GET request. The API key is in the request URL. The response contains up-to-date information about existing styles.
More detailed information about the styles, with clear names and descriptions, can be found in the style table above.
Responses
200 Style information in JSON format
Note: for some styles (for example, HQ-4K-h and HQ-1920-1024-h) the width and height may not correspond to reality, because a separate neural network is used to improve their quality. Nevertheless, working with such styles is absolutely no different from using other styles.
| success boolean | Request completed successfully. |
| styles array | Array of objects: name (string), isFree (boolean), width (number), height (number). |
{
"success": true,
"styles": [
{ "isFree": true, "name": "standard", "width": 1024, "height": 1024 },
{ "isFree": true, "name": "smallHQ", "width": 512, "height": 512 }
]
}Example
API Usage Examples
For generating images from a predefined prompt
The API is extremely simple to integrate and use. To create an image and obtain the result you only need to perform:
- One POST request with two parameters;
- One GET request with one parameter.
Even if you use the minimum number of parameters, as shown here, image quality will be excellent in most cases.
Assume you need to generate one image for the prompt "A close-up shot of a perfectly ripe red apple". Because you want a high-quality, realistic picture, you choose the HD-HQ style (the full list of styles can be found in the styleName table). Send a POST request to:
https://clipcloud.clipai.pro/api/creation?apikey=YOUR_API_KEY
If you receive a 415 error, set the data type to application/json (the same data type as in GPT-API requests) or add the header "Content-Type": "application/json".
In the request body specify:
{
"prompt": "A close-up shot of a perfectly ripe red apple",
"styleName": "HD-HQ"
}If you want to earn money on the requests made by users of your software, add the soft_id parameter as well. Its value is the number shown in the "For Developers" section of the Telegram bot ClipCloud. For example, "soft_id": 1742.
You will receive a response like this:
{
"success": true,
"creation_id": "12345678-abcd-ef12-3456-7890abcdef12"
}Save the creation_id value; you'll need it in the next request to obtain the result. This parameter is always unique per generation request, regardless of how many images were requested via count.
Immediately after that, the image starts generating. At any time you can check the generation progress by sending a GET request to:
https://clipcloud.clipai.pro/api/creation/GENERATION_ID?apikey=YOUR_API_KEY
If the image is still being generated, you'll get a response like:
{"success":true,"message":"In progress","status":"in_progress","creation_id":"12345678-abcd-ef12-3456-7890abcdef12"}And once it has been generated:
{
"success": true,
"message": "Images processed succesfully",
"creation_id": "12345678-abcd-ef12-3456-7890abcdef12",
"cost": 2.2,
"censored": 0,
"results": [
"https://clipcloud.clipai.pro/images/326432e4661c42d709432284c836d410b5.webp",
"https://clipcloud.clipai.pro/images/c9436e4e57c1d9b2eb81b48d85a98a88c1.webp"
]
}In the successful response you will receive temporary links for downloading the generated images. They are provided in WebP format, which offers good compression and is well suited both for web use and for almost any local use case.
For generating images for an article
If you are generating images or illustrations for an article (including when the text is written by another AI such as GPT), you can submit only the article title in the image-creation request. However, the result is usually better if you describe in detail what exactly should appear in the image. Doing this manually is obviously difficult. Therefore, if your software already connects to a neural network that writes text, we recommend first sending a request for image descriptions:
Example request for image descriptions
You are an assistant who gives the result of the task execution strictly in the specified form. Your goal is to select a prompt and parameters for generating images using another AI. To do this, you need to describe what and how should be depicted in the picture or photograph. At the same time, your entire output must be in English, regardless of the input language. Avoid using text on images or image requests where the neural network might add text, letters, or digits. Use high-quality styles if the image should contain, for example, a person or many different complex objects. Specify queries so that they should not generate prohibited content: eg NSFW. Use specific styles only if you feel it is necessary for this particular article. You have been given the title of the article or query: "Article name". You need to generate image count picture prompts, outputting the result as a single valid JSON array. Each element of the array must be a JSON object with the following structure: {"picture_number": 1, "query": "describe here what should be in the picture", "negative_prompt": "here describe what could theoretically appear with such a request, but at the same time should clearly not be in the picture according to your idea. This parameter is optional", "style": "select a style from: standard,smallHQ,HD-HQ,FullHD-HQ-h,FullHD-HQ-v,graffiti,illustration,oldphoto,aquarelle,pixel-art,pop-art,tilt-shift,HQ-768-512-h,HQ-832-448-h,HQ-832-640-h,HQ-1024-640-h,HQ-1200-640-h,HQ-1280-720-h,HQ-512-768-v,HQ-640-1024-v"}Thus, several tasks are solved at once:
- A quality description is written for each image.
- The image style is selected automatically.
- The request is in English, regardless of the language of the article title.
- If multiple images are required, each one will differ, just as when illustrations are manually selected for the article.
If you wish, you can edit the above prompt to suit your needs, for example, if it is more convenient for you not to work with a JSON response.
After that, immediately send the image-creation request, even if the article itself has not yet been generated or written; this lets you obtain the answer as quickly as possible when it is needed. Once the article is written or generated, download the generated images.
Here you can find specific examples of requests for creating images and retrieving the generated pictures.
Frequently Asked Questions
How do I get a ClipCloud API key?
clip-.Is the API free to use?
How many styles are available and which sizes do they produce?
What format are the generated images?
Is cost measured in dollars?
cost and balance are counted in ClipCloud image credits (🖼️), in the same way text AI APIs count tokens. One credit is $0.0025, so a 1.8 🖼️ HD-HQ image costs $0.0045. free_cost and free_balance are different again: they count whole free images from the daily quota of 25, not credits.How long does a generation take?
How does the developer referral program work?
Why do I get a 415 error?
application/json. Add the header Content-Type: application/json. In ZennoPoster: POST request block, "Data type", "Other", application/json.API Explorer
Send real requests to the ClipCloud API right from this page. Your API key is kept only in this browser tab (sessionStorage), is forgotten as soon as you close the tab, and is sent only to the ClipCloud API.