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.
Maximum reference images per request: 9. Reference (image-to-image) inputs are
supported by image jobs with input_urls.
All image products generate 1K-class output (up to a 1024-pixel edge for square
requests, or 1536x1024 / 1024x1536 where the shape offers it). There are no 2K or 4K
tiers; asking for one answers 400.
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, omev-image-main and omev-image-pro. 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 |
input.resolution | no | 1K — the only tier offered; anything else answers 400 |
input.quality | no | low (default) or auto; medium/high answer 400 |
input.input_urls | no | 1–9 public http(s) reference image URLs (see below) |
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.
Reference images (image-to-image)
Orders can carry 1–9 reference images: add an input_urls array to input with
public http(s) URLs of the pictures to edit or combine. The order of the list is
preserved: if your prompt says "put the product from image 1 into the scene from
image 2", image 1 is input_urls[0].
{
"model": "omev-image-jobs",
"input": {
"prompt": "Put the product from image 1 into the environment from image 2",
"input_urls": [
"https://example.com/product.png",
"https://example.com/location.jpg"
],
"aspect_ratio": "1:1"
}
}
- Omitting
input_urls(or an empty list) keeps the plain text-to-image order. - More than 9 URLs are rejected with a deterministic
400: A maximum of 9 reference images is allowed per request. - References are copied to internal storage when the order is placed, so a source URL that expires later cannot break a running job.
The alias gpt-image-2-image-to-image selects the same pipeline, for integrations
that already use that name.
omev-image-main
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. omev-image-main is
the steady default for interactive use.
curl -sS https://llmapi.omev.be/v1/images/generations \
-H "Authorization: Bearer $OMEV_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "omev-image-main",
"prompt": "A photorealistic cat wearing sunglasses",
"size": "1024x1024"
}'
| Field | Required | Values |
|---|---|---|
prompt | yes | free text |
size | no | 1024x1024 (default), 1536x1024, 1024x1536, auto |
quality | no | low (default) or auto; medium/high answer 400 |
n | no | 1 only |
response_format | no | b64_json only |
The image sits in data[0].b64_json. If the call times out with 504, send the same
request again with the same Idempotency-Key header: the order continues server-side and
the retry picks up the finished result instead of paying for a second image.
omev-image-pro
Same OpenAI-compatible Images API shape as omev-image-main. omev-image-pro is the
quality lane: prompts that carry embedded text (infographics, diagrams, charts, tables,
labels, logos) render reliably here.
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": "Flat vector infographic: three steps of onboarding, numbered 1 2 3, short labels",
"size": "1024x1024"
}'
| Field | Required | Values |
|---|---|---|
prompt | yes | free text; spell out every word that must appear in the picture |
size | no | 1024x1024 (default), auto, or any WxH up to 1024 on each edge |
quality | no | low, medium, auto; high answers 400 |
n | no | up to 4 images |
response_format | no | b64_json only |
background | no | transparent, opaque, auto |
output_format | no | png, jpeg, webp |
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="Flat vector infographic: three steps of onboarding, numbered 1 2 3",
size="1024x1024",
)
png_bytes = base64.b64decode(resp.data[0].b64_json)
The image sits in data[0].b64_json.
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.
Set generationConfig.candidateCount (1–4) to receive that many separate candidates,
each carrying one image in inlineData.
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.