Skip to content

Images

Omrouter supports image generation and image editing. Choose an image model on the Pricing page. If the API key has a model restriction, choose an image model allowed for that key.

POST /v1/images/generations
Authorization: Bearer OMROUTER_API_KEY
Content-Type: application/json
Field Type Required Description
model string Yes Image model name shown on the Pricing page.
prompt string Yes Description of the image to generate.
n integer No Number of images. Availability and limits depend on the model.
size string No Requested dimensions supported by the model.
quality string No Model-specific quality setting.
response_format string No Response representation supported by the model.
Terminal window
curl --silent --show-error \
'https://omrouter.com/v1/images/generations' \
--header "Authorization: Bearer $OMROUTER_API_KEY" \
--header 'Content-Type: application/json' \
--data "{
\"model\": \"$OMROUTER_MODEL_ID\",
\"prompt\": \"A simple product icon on a plain background\",
\"n\": 1
}"

Responses commonly contain a data array with an image URL or encoded image content. The selected model and response_format determine the exact format.

Image editing uses POST /v1/images/edits. Upload the original image and, when the model supports it, a mask. Field names, file formats, and size limits depend on the selected model.