ForHosting KIT · Images

Image to prompt

You have a reference image and no idea what words would recreate it. This endpoint looks at the picture and writes the prompt a text-to-image model would need to produce something close to it, turning a visual you can't edit into text you can.

● BetaPer request + per image$0.010
Use it from WebAPIEmailApp soonTelegram soon

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 gap between seeing an image and describing it

A designer finds a moodboard image with exactly the lighting and palette they want, but the file itself is a dead end: no layers, no prompt history, no way to ask for a variation. Reverse-engineering a description by eye is slow and subjective, and two people staring at the same photo will write two different prompts, neither of which is guaranteed to reproduce the composition. This endpoint automates that description step, giving you a working starting point instead of a blank cursor.

What you send and what comes back

You submit an image by URL or upload, and the task returns a structured prompt covering subject, style, lighting, color palette, composition and notable technical qualities, phrased the way a generation model expects to read it. It is not a literal transcription of pixels; it is an interpretation aimed at being useful as an input to image.generate or a similar tool, so you get language you can immediately paste, tweak and rerun.

Why this is a genuinely hard inverse problem

Generating an image from text is already a one-to-many relationship: countless prompts could produce a similar-looking result. Going the other direction, image to prompt, is inherently lossy — the model has to guess at intent, at what was deliberate versus incidental, and compress an entire scene into a paragraph of instructions. That is why the output should be read as a strong, editable draft rather than a guaranteed-exact recipe, and why the field itself only became practical once vision-language models got good enough to describe images with real nuance rather than generic captions.

Where it fits in a creative pipeline

Because the task is asynchronous, it drops cleanly into a workflow where a user uploads inspiration, your system extracts a prompt, and that prompt is handed straight to a generation step without a human ever typing a description by hand. Teams use it to build prompt libraries from a folder of references, to onboard style guides into a generation pipeline, or simply to understand why a particular image works before trying to make ten more like it.

Setting expectations honestly

This endpoint describes an image; it does not clone it pixel for pixel, and no two generation runs from the resulting prompt will be identical, even to each other. Treat the output as expert scaffolding: a precise, well-structured starting prompt that saves the guesswork of staring at a reference and typing from scratch, which is exactly the part of the process most people find hardest.

Moodboard to working prompt

A designer uploads a Pinterest-style reference photo and gets back a structured prompt they can paste directly into a generation tool and iterate on.

Building a prompt library from assets

A studio runs its existing approved image library through the endpoint to build a searchable set of prompts describing its own house style.

Competitive creative teardown

A marketing team analyzes a competitor's ad visual to understand the composition and lighting choices behind it before briefing their own designer.

Recovering a lost prompt

A team has a final image from an old campaign but lost the prompt that made it, and reconstructs a close working version to keep iterating.

How does the image to prompt api work?

Send a POST to /image/prompt-from-image with the source image as a URL or upload; you get a task_id back and the generated prompt arrives by webhook or a signed link.

Will the prompt reproduce the image exactly?

No. It is a close, structured description meant as a strong starting point for a generation model, not a pixel-exact recipe — regenerating from it will produce a similar but not identical image.

What does the output prompt include?

Subject, style, lighting, color palette, composition and notable technical qualities, written in the phrasing a text-to-image model expects.

Can I feed the result straight into image generation?

Yes, the output is written to be pasted directly into image.generate or a compatible tool, with no reformatting needed.

Is there a free tier for this 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 does it cost per image?

$0.010 per request plus $0.0575 per image, charged only when the task actually completes.

What happens if the analysis fails?

The task 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 run this on many images at once?

Each call handles one source image; for large volumes, submit multiple asynchronous requests in parallel and collect the results by webhook as each finishes.

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.

POSThttps://api.kit.forhosting.com/image/prompt-from-image

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, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/image/prompt-from-image \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image":"https://ejemplo.com/imagen.jpg"}'
{
  "image": "https://ejemplo.com/imagen.jpg"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "image.prompt_from_image",
  "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.

Per request$0.010
Per image$0.0575

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb15
max_megapixels12
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →