Skip to content

Image generation

Create and edit images with HiMegia: prompt, editing, text in the scene and consistent character.

Updated on Aug 09, 2026

hinow/himegia creates and edits images from a text description. It is the platform's image model: it honors long requests, writes legible text inside the scene and keeps the same character from one image to the next.

It responds at POST https://api.hinow.ai/v1/images, with the same key and the same base URL as the rest of the API. Pricing is per image — US$ 0.082, the same to create and to edit, in any aspect ratio.

The first image

Describe the scene in prompt and choose the aspect ratio in parameters:

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" }
  }'
The result: the blurred window, the bowl, the shadow on the right — the entire scene from the request.

The response carries the URL of the finished image and the cost of the call:

{
  "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"
}

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.
  • operationgenerate when the model created from scratch; editing when 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.

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:

prompt-vago.txt
um cachorro
prompt-completo.txt
Retrato 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 realista

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:

prompt.txt
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.
Three bottles, one sprig, the light from the left: every clause of the request is in the image.

There is no fixed style to the generation: product photography, editorial illustration, flat vector, 3D render and cinematic storyboard all come out of the same model — the style comes from what you describe.

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:

prompt.txt
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.
The letters come out printed on the paper: in the poster's perspective, with the creases and the light of the scene.

Two practices hold the result together: put the text in quotes and ask for it to come out "exactly as written, with no spelling errors". Beyond the Latin alphabet, the model writes in Chinese, Japanese, Korean, Arabic and Hebrew — the same piece ships to several markets without redoing the artwork.

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:

{
  "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 bottle from the first call, edited: new background; bottle, label, bowl and shadow intact.

The rule of editing: what you did not mention stays as it was. The bottle comes back identical — same label, same bowl, same shadow — on the new background. The response marks the operation with "operation": "editing", and the price is the same as generation.

images accepts a public URL or the image in base64 (data:), and more than one reference when the scene combines elements from different sources.

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:
The reference: neutral background, even light and the traits that identify the person.
prompt-da-cena.txt
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...]
One of the scenes generated from the reference: street market, scarf in the hair — the same face.

Wardrobe, hairstyle, setting and light change with each scene; the face stays. This is the workflow for product catalogs, campaigns built on a single face, storyboards and brand material.

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:

ParameterValuesDefault
aspect_ratio1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 9:211:1
output_formatjpeg, png, webpjpeg
num_inference_steps20, 25, 28, 30, 35, 4028
guidance_scale1.5, 2.0, 2.5, 3.0, 3.52.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.

Composition in 21:9: the scene is born panoramic, with no cropping afterwards.

The API does not validate the request for you

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