Image generation
These instructions are available to every customer, but image generation is switched on for a key on request: write to 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, and wider or taller shapes of the same class where the product offers them). There are no 2K or 4K tiers; asking for one is rejected.
Prices
You pay per delivered image; a call that returns several images is charged for each.
| Product | Quality | Price per image |
|---|---|---|
omev-image-jobs | low (default, also auto) | $0.021 |
omev-image-jobs | medium | $0.024 |
omev-image-jobs | high | $0.039 |
omev-image-lite | one fixed tier | $0.0192 |
omev-image-main | low (default, also auto) | $0.021 |
omev-image-pro | low (default, also auto) | $0.024 |
omev-image-pro | medium | $0.1968 |
A failed or refused generation is not charged. All products and prices: Models and prices.
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
(or receive it at your callback address), and download the finished image from a URL we
host for 48 hours. One model, omev-image-jobs, 1K-class output in many shapes, three
quality tiers and optional reference images. 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, 4:3, 3:4, 16:9, 9:16, 21:9, 9:21, 5:4, 4:5, 9:8, 8:9, 27:16, 16:27, 2:1, 1:2, 3:1, 1:3 |
input.resolution | no | 1K — the only tier offered |
input.quality | no | low (default; auto is the same), medium or high; see Prices. medium and high work for text-to-image orders, not with input_urls |
input.background | no | auto (default), transparent or opaque |
input.enhance | no | true (default) lets OmevAI refine the prompt; false sends your prompt exactly as written |
input.input_urls | no | 1–9 public http(s) reference image URLs (see below) |
callBackUrl | no | a public http(s) address; we POST the final task record there; plain polling works too |
Shapes other than square come out at the same 1K class, for example 16:9 is 1360x768 and
3:2 is 1536x1024.
A 403 normally means the key is not enabled for image jobs. Contact
support@omev.be to agree access; do not repeatedly retry.
Errors of the jobs API arrive with HTTP status 200 and the code in the body, the way
existing task-based image integrations expect: {"code": 422, "msg": "<what was wrong>", "data": null}.
Check code in every answer, not only the HTTP status. See Errors.
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,
"effectiveQuality": "low"
}
}
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. effectiveQuality is the quality tier the order was made
and charged at.
With callBackUrl, the same record is sent to your address when the task reaches
success or fail.
3. Download the image
Download each result URL with the same Authorization: Bearer header you use for the other calls; without the key it answers 401. The file stays available for 48 hours: pull the bytes into your own storage right away; after 48 hours the file is removed and the URL answers 404. The task record (recordInfo) stays available for 7 days.
curl -sS -o image.png "https://llmapi.omev.be/api/v1/jobs/result?id=task_omevimage_1754937600123_a1b2c3d4" \
-H "Authorization: Bearer $OMEV_API_KEY"
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. - Each reference must be a PNG, JPEG or WebP image of up to 20 MB.
- More than 9 URLs are rejected with the message
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.
- Orders with references are made at
lowquality and cost the same as otherloworders.
omev-image-main
The request shape is the OpenAI-compatible Images API, so any SDK built for it works
unchanged: point base_url at OmevAI and call images.generate. omev-image-main is
the steady default for interactive use. Price: $0.021 per image.
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. Price: $0.024 per image at low or auto quality,
$0.1968 per image at medium.
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. Price: $0.0192 per image.
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
Direct models (omev-image-lite, omev-image-main, omev-image-pro) use the same
shape as the rest of the API — see Errors and retries. A malformed body gives
400 with what was wrong; a refused prompt gives 400 as well, not a blank image. A call
that runs out of time gives 504: for omev-image-main, repeat it with the same
Idempotency-Key.
Image jobs answer with HTTP status 200 and the code in the body:
code | Meaning |
|---|---|
200 | success |
401 | the key or headers were not accepted |
404 | unknown task |
422 | the order was rejected; msg says why (unknown model, empty prompt, unsupported shape, quality or resolution, too many references) |
455 | the image service is temporarily unavailable; retry later |
500 | temporary error; retry a limited number of times |
A task that was accepted and then failed reports it in the task record: state: "fail"
with failCode and failMsg. A failed task is not charged.