4. Creating images
One prompt, one AI image, in the background.
Permissions: images:generate
- 1Your system
GET /v1/images/modelsOptional: the models that can draw. Without a choice, the first one is used.
- 2Your system
POST /v1/images/generationsSend "prompt" (the image you want, up to 500 characters), and if you want "aspect" (1:1, 4:5, 9:16), "provider" and "model", "clientReference". Response 202 with an id, status pending. An insufficient balance or no model is refused right then.
- 3Tekomata
AI draws, usually 10 to 60 seconds. Done: webhook image_generation.succeeded with generationId. Failed: image_generation.failed with errorCode.
- 4Your system
GET /v1/images/generations/{id}See the result: the prompt, the aspect, the model that drew it, and its cost in "charged". Download the file from GET /v1/images/generations/{id}/image.
- For now, free prompts only: photo styles, scene templates, models, and product photos still come from the shop's screen.
- The AI is asked not to write any text in the image unless your prompt asks for it; AI-made lettering can be misspelled. The image is stored with the shop's AI images.
- The cost is the AI image price on the shop's plan plus the model's cost, charged when the image is made. An image the AI fails to make is free; one the model refuses is charged its tokens only.
- An insufficient balance (402), a model that cannot draw (422 model_not_offered), and no model at all (503) are refused right then. Fields other than prompt, aspect, provider, model, and clientReference are refused (422 unknown_field).
- Limits per shop, the same for the API, the screen, and bulk photos: at most 10 images being made at once (429 too_many_running), 100 images a day from 00.00 WIB (429 daily_limit; failed ones count), and at most 2 at once while Tekomata is busy (429 images_busy). A refusal does not take from the balance and is not counted.
- In the sandbox the image is a plain blue box in the requested aspect, free, and not stored.