Image variations
A single generated image is rarely the last word — it's a starting point you want explored in several directions at once. This endpoint takes a text prompt and returns a set of distinct images for it, each a fresh take on the same description, giving you options to choose from instead of a single fixed output.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
The real problem: picking, not producing, one image
Most creative work isn't stuck on producing a single image, it's stuck on not knowing which single image is right. You describe a banner and like the idea, but you want to see it a few ways — warmer light, a different angle, a busier background — before committing. Running the same prompt once gives you one roll of the dice. This endpoint gives you several at once from the same description, so you're choosing between real options instead of regenerating one at a time.
What you send and what comes back
You submit a text prompt describing the image you want, along with how many variations you'd like, and the task returns that many distinct images once generation finishes. Each one follows the same description while differing in the specific details a fresh generation naturally changes, and results are delivered by webhook or a signed link as an asynchronous task.
Why several takes beat one generation
Generating a single image from a prompt commits you to whatever that one roll produced; asking for several variations of the same prompt spreads the outcome across a set you can compare side by side. Because text can only describe what you can put into words, the first image a prompt produces is rarely exactly what you pictured — seeing several candidates for the same description is the fastest way to find the one that matches what you had in mind.
Where it slots into a workflow
Because it's asynchronous, this endpoint fits naturally into any generation step: send a prompt, request a set of variations, and let the webhook deliver them once ready, without a person waiting on a spinner. Teams use it for A/B creative testing, for giving end users a choose-your-favorite step in a personalization flow, or for exploring a direction before committing to a final asset.
What variations will and won't do
Variations widen the options for a prompt; they do not guarantee a specific requested change, so if you need a precise edit — removing an object, changing exact text — a targeted editing tool is the better fit. Treat this endpoint as a way to widen your options quickly from a single description, not as a controlled way to make one exact modification.
What you can do with it
Creative A/B testing
A marketing team generates several variations of a hero banner from one approved prompt and tests which version performs best in a campaign.
Client mood exploration
A design studio shows a client a handful of variations for a single approved concept instead of starting the entire brief over for each round of feedback.
User-facing pick-your-favorite flows
A print-on-demand app lets a shopper describe a design and generate several variations of it to choose the one they like best before ordering.
Expanding a limited asset set
A small team turns one prompt into a family of related visuals for use across different pages and formats.
FAQ
How do I generate image variations through the api?
Send a POST to /image/variations with a text prompt and the number of variations you want; you get a task_id back and the results arrive by webhook or a signed link.
How similar are the variations to each other?
They all follow the same prompt while varying specific details, so expect a family of related images rather than near-duplicates or unrelated new scenes.
Can I request an exact number of variations?
Yes, you specify how many variations you want in the request and receive that many results in the completed task.
Is this the same as generating an image from a prompt?
It uses the same text-to-image generation, but instead of one image it returns several distinct takes on the same prompt in a single request, so you can compare and pick. Both start from your words; this one gives you options.
Is there a free tier for the image variations api?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
How much do image variations cost?
$0.002 per request plus $0.0065 per image, and you're only billed for variations that are actually delivered.
What if the variation task fails?
It retries automatically up to three times; if it still can't complete, you get a clear error and are never charged for the failed attempt.
Can I use this to make a precise edit, like removing an object?
Not reliably — variations reinterpret a description broadly rather than applying a targeted change, so a precise edit needs a dedicated editing tool instead.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/image/variations \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"un gato naranja"}'const res = await fetch("https://api.kit.forhosting.com/image/variations", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"prompt": "un gato naranja"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/image/variations",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"prompt": "un gato naranja"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/image/variations", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"prompt":"un gato naranja"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"prompt":"un gato naranja"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/image/variations", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"prompt": "un gato naranja"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "image.variations",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 15 |
max_megapixels | 12 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
422 | task_failed | The task failed after 3 retries. You are never charged for it. |