Image generation
These instructions are available to every customer, but image generation is enabled only under a separate agreement with support@omev.be. A text API key or access to this page does not mean image products are active for the key.
There are two ways to make images, built for two different workloads.
Image jobs — the main path for pipelines. You place an order, poll for the result,
and download the finished image from a URL we host for 48 hours. One model,
omev-image-jobs, 1K-class output. This is the path for unattended bulk generation:
your worker queues orders and picks up results, no human waiting on a socket.
Direct models. The image comes back inside the response body of a single call:
omev-image-lite (1K) and omev-image-pro (2K/4K). Choose these when someone is
waiting for the picture on screen right now.
Image jobs API
Three calls, same host and same key as everything else.
1. Place an order
curl -sS https://llmapi.omev.be/api/v1/jobs/createTask \
-H "Authorization: Bearer $OMEV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "omev-image-jobs",
"input": {
"prompt": "Flat vector infographic: three steps of onboarding, numbered 1 2 3, short labels",
"aspect_ratio": "1:1"
}
}'
{"code": 200, "msg": "success", "data": {"taskId": "task_omevimage_1754937600123_a1b2c3d4"}}
| Field | Required | Values |
|---|---|---|
model | yes | omev-image-jobs |
input.prompt | yes | free text; spell out every word that must appear in the picture |
input.aspect_ratio | no | auto (default, square), 1:1, 3:2, 2:3 |
callBackUrl | no | we POST the final task record there; plain polling works too |
A 403 normally means the key is not enabled for image jobs. Contact
support@omev.be to agree access; do not repeatedly retry.
A 400 answers {"code": 400, "msg": "<what was wrong>"}.
2. Check the result
curl -sS "https://llmapi.omev.be/api/v1/jobs/recordInfo?taskId=task_omevimage_1754937600123_a1b2c3d4" \
-H "Authorization: Bearer $OMEV_API_KEY"
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_omevimage_1754937600123_a1b2c3d4",
"model": "omev-image-jobs",
"state": "success",
"resultJson": "{\"resultUrls\":[\"https://llmapi.omev.be/api/v1/jobs/result?id=task_omevimage_1754937600123_a1b2c3d4\"]}",
"failCode": "",
"failMsg": "",
"costTime": 96000,
"createTime": 1754937600123,
"completeTime": 1754937696123,
"progress": 100
}
}
state walks waiting → queuing → generating → success (or fail, with
failCode and failMsg telling you why). Poll every 2–5 seconds and back off; a
typical job takes one to five minutes. resultJson is a JSON string: parse it and
take the URLs from resultUrls.
3. Download the image
Result URLs are public — no key is needed to fetch them — and stay valid for 48
hours. Pull the bytes into your own storage right away; after 48 hours the file is
removed and the URL answers 404.
If your code already drives a task-based image API of this shape (create a task, poll
a record, read resultUrls), it works here after two edits: the base URL and the key.
omev-image-pro
The request shape is the OpenAI-compatible Images API, so any SDK built for it works
unchanged: point base_url at Omev and call images.generate.
curl -sS https://llmapi.omev.be/v1/images/generations \
-H "Authorization: Bearer $OMEV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "omev-image-pro",
"prompt": "A photorealistic cat wearing sunglasses",
"size": "2048x2048",
"quality": "medium"
}'
| Field | Required | Values |
|---|---|---|
prompt | yes | free text |
size | no | 2048x2048 (2K), 4096x4096 (4K) |
quality | no | low, medium, high |
n | no | how many images |
client = OpenAI(base_url="https://llmapi.omev.be/v1", api_key=os.environ["OMEV_API_KEY"])
resp = client.images.generate(
model="omev-image-pro",
prompt="A photorealistic cat wearing sunglasses",
size="2048x2048",
)
png_bytes = base64.b64decode(resp.data[0].b64_json)
The image sits in data[0].b64_json.
At 4K the returned picture is up to 4096×4096: under load it may come back slightly smaller. Check the actual dimensions if your layout depends on them.
omev-image-pro treats a 1024×1024 request as a 2K job, and you are charged for 2K. If
you want a 1K image, use image jobs or omev-image-lite. This is the most common
mistake with this API.
omev-image-lite
A different route and a different body shape — the one built around contents and
parts. If your code already speaks that shape, it works here without changes. Output is
always 1024×1024, so there is no size parameter.
curl -sS https://llmapi.omev.be/v1beta/models/omev-image-lite:generateContent \
-H "Authorization: Bearer $OMEV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "A photorealistic cat wearing sunglasses"}]}]
}'
Response:
{
"candidates": [{
"content": {
"role": "model",
"parts": [{"inlineData": {"mimeType": "image/png", "data": "<base64 PNG>"}}]
},
"finishReason": "STOP"
}]
}
The image sits in candidates[0].content.parts[0].inlineData.data, with its type in the
neighbouring mimeType.
Errors
Same shape as the rest of the API — see Errors. A malformed body gives 400
with what was wrong; a refused prompt gives 400 as well, not a blank image. Image jobs
report failures in the task record instead: state: "fail" with failCode/failMsg.