Image generation
Create and edit images with HiMegia: prompt, editing, text in the scene and consistent character.
Updated on Aug 10, 2026
The first image
cURL
curl https://api.hinow.ai/v1/images \
-H "Authorization: Bearer $HINOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hinow/himegia",
"prompt": "Uma garrafa de azeite de vidro escuro com rótulo em branco, sobre uma mesa de madeira rústica em uma cozinha, com uma janela desfocada ao fundo e uma tigela de azeitonas ao lado. Luz natural lateral, sombra definida à direita da garrafa. Fotografia de produto em ambiente, 50mm.",
"parameters": { "aspect_ratio": "1:1", "output_format": "jpeg" }
}'import os, requests
resposta = requests.post(
"https://api.hinow.ai/v1/images",
headers={"Authorization": f"Bearer {os.environ['HINOW_API_KEY']}"},
json={
"model": "hinow/himegia",
"prompt": "Uma garrafa de azeite de vidro escuro com rótulo em branco, "
"sobre uma mesa de madeira rústica em uma cozinha, com uma "
"janela desfocada ao fundo e uma tigela de azeitonas ao lado. "
"Luz natural lateral, sombra definida à direita da garrafa. "
"Fotografia de produto em ambiente, 50mm.",
"parameters": {"aspect_ratio": "1:1", "output_format": "jpeg"},
},
)
print(resposta.json()["data"]["urls"][0])Three fields matter day to day:
urls— the generated image, served by the platform's storage. Download and keep on your side whatever goes to production.operation—generatewhen the model created from scratch;editingwhen it worked on an uploaded image.cost— the exact amount for the call, in the response itself. This is where reconciliation comes from.
One call returns one image. For variations, fire calls in parallel — each one is independent.
{
"success": true,
"data": {
"urls": ["https://s3.us1-stlouis.hinow.ai/hi-storage/text_to_image/.../8c9ab329.jpg"],
"thumbnail_url": "https://s3.us1-stlouis.hinow.ai/hi-storage/text_to_image/.../8c9ab329_thumb.webp",
"model": "hinow/himegia",
"operation": "generate",
"cost": { "amount": 0.082, "currency": "USD", "value_type": "per_image" },
"metadata": { "format": "image/jpeg", "size": 236652 }
},
"request_id": "83d88c3e-6219-4efd-a6fb-6fed0df29c23"
}Latency is on another scale
Generating an image takes seconds, not milliseconds — from a few seconds on simple requests to thirty or more on elaborate scenes. Configure generous timeouts and, in the interface, show a progress state instead of blocking the screen.
Describe the whole scene
The quality of the result follows the quality of the request — and the margin is wide. A three-word prompt comes back fast with a generic image; the same idea described in full comes back as a composition of another category, for the same price. Compare the two requests:
The first returns some dog on some lawn. The second returns exactly the photo described: the backlight cutting out the fur, the gaze to the left, the 85mm blur. The model reads the whole request and composes the scene from it — so the request is the place to say everything that matters.
What a good request covers:
- The subject and what is mandatory. Exact quantities work when stated with emphasis: "exactly three bottles, no more than three".
- The light. "Hard side light from the left, long shadows" changes the image more than any adjective.
- The framing. "Full body, photographed from a distance", "aerial view", "camera at a slight side angle".
- The material and the technique. "Gouache stroke with paper texture", "3D render with physically correct materials", "35mm photography with subtle grain".
- What must not appear. Explicit negatives are respected: "no text on the packaging", "no other objects".
A request that uses all of this at once — exact count, position, light and negatives:
um cachorroRetrato fotográfico de um border collie adulto sentado em um campo ao
entardecer, contraluz dourado recortando o pelo, olhar atento para a
esquerda do quadro, profundidade de campo rasa com bokeh de gramíneas,
lente 85mm f/1.8, textura de pelo nítida, fotografia ultra realistaThree amber perfume bottles in a row, with a sprig of rosemary in front of the left-hand bottle
Exatamente três frascos de perfume de vidro âmbar, não mais que três,
alinhados lado a lado sobre uma superfície cinza-clara lisa e uniforme.
O frasco do meio está ligeiramente à frente dos outros dois. Exatamente
um ramo de alecrim, apenas um, caído na frente do frasco da esquerda.
Luz lateral dura vindo da esquerda, sombras longas projetadas para a
direita. Fundo cinza-claro liso, sem mármore, sem outros objetos.
Still de produto, alto contraste.Text inside the image
Letters are born along with the scene: in the perspective of the surface, with the light of the environment, in the right material — including on a curved surface, at an angle and at small size:
Screen-printed festival poster pasted on a flyposting wall, with legible text
Fotografia de rua realista de um muro urbano coberto de cartazes
lambe-lambe sobrepostos e rasgados. No centro, em foco, um cartaz de
show impresso em serigrafia: fundo azul-marinho com ilustração
geométrica de montanhas de inverno, o título "FESTIVAL DE INVERNO" em
tipografia bold condensada branca impressa no papel, e abaixo, em
letras menores, "12 DE JULHO - SÃO PAULO". Escreva cada palavra
exatamente como está, sem erros de ortografia. O papel tem textura
real: vincos, bolhas de cola, cantos rasgados. Luz urbana de fim de
tarde, fotografia 35mm com grão sutil, profundidade de campo rasa.Editing on top of your image
Much of the real work is not creating from nothing — it is taking an image that already exists and changing one thing in it. Send the image in images and write the instruction in prompt:
The same olive oil bottle and bowl of olives, now on a light studio background
{
"model": "hinow/himegia",
"prompt": "Troque o fundo por um estúdio claro e uniforme. Mantenha a garrafa, o rótulo, a tigela de azeitonas e a sombra exatamente como estão, sem alterar nada neles.",
"images": ["https://exemplo.com/produtos/garrafa-azeite.jpg"],
"parameters": { "aspect_ratio": "1:1" }
}The same character in every scene
Generating one good-looking image is one thing; generating the tenth with the same face is another — and that is where campaigns, catalogs and narratives usually break. Describing the same person twice does not solve it: you get someone similar, not the same person.
The way through is to generate the character once and use that image as a reference in the following ones:
1. **Generate the reference** — a full-body portrait, neutral background, even light, with the traits that identify the person described precisely (a mole, the skin tone, the haircut).
2. **Each new scene is an edit on top of it** — the reference goes in images and the prompt opens by fixing what does not change:
Reference portrait of the character: full body, neutral background, even light
Mantenha exatamente a mesma pessoa da imagem de referência: mesmo rosto,
mesmos traços, mesma pele, a mesma pinta acima do lábio direito.
Ela [a cena nova: figurino, cenário, luz, enquadramento...]Aspect ratios, formats and parameters
Nine aspect ratios, from the social media square to the ultrawide cover — the composition is born in the final format, with no cropping afterwards:
Parameter
| Values | Default | aspect_ratio |
|---|---|---|
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:21 | 1:1 | output_format |
jpeg, png, webp | jpeg | num_inference_steps |
20, 25, 28, 30, 35, 40 | 28 | guidance_scale |
1.5, 2.0, 2.5, 3.0, 3.5 | 2.5 | The last two are fine-tuning: more inference steps refine detail in exchange for time; guidance_scale regulates how closely the generation sticks to the letter of the request. The defaults handle the vast majority of cases — touch them after the prompt is right, not before. |
Lone lighthouse at the end of a breakwater, in an ultrawide panoramic composition
Aspect ratio values outside the list do not return an error — the call generates at the nearest supported ratio. And a request without a prompt is not rejected either: it generates some image and charges for it. Validate both on your side before sending.
What it costs
Every call costs **US$ 0.082**, and that is it: generating or editing, short or long prompt, any aspect ratio, any format. There is no per-token billing and no size surcharge — the cost field of each response confirms the amount.
Predictability changes planning: a thousand images cost US$ 82.00, before you generate the first one.
Next steps

