Skip to content

Image Generation

Generate images with any model available on ImageRouter.

Terminal window
curl 'https://api.imagerouter.io/v1/openai/images/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data-raw '{"prompt": "YOUR_PROMPT", "model": "test/test"}'

Parameners:

  • prompt* Text prompt for generating images.
  • model* Image model to use for generation.
  • quality [auto, low, medium, high] - default “auto”; Supported models have “quality” feature label here
  • size [auto, WIDTHxHEIGHT (eg 1024x1024)] - default “auto”; Accepted values are different for each model. Some models and providers completely ignore size.
  • response_format [url, b64_json] - default “url”.
  • image[] Input image(s) for supported image editing models.
  • mask[] Some models require a mask file to specify areas to edit.

Please contact me if you miss anything.