POST
/
api
/
ai
/
image
/
generation
{
  "model": "<string>",
  "images": [
    {
      "type": "image_url",
      "image_url": {
        "url": "<string>"
      }
    }
  ],
  "text": "<string>",
  "count": 123,
  "metadata": {
    "model": "<string>",
    "revisedPrompt": "<string>",
    "usage": {
      "promptTokens": 123,
      "completionTokens": 123,
      "totalTokens": 123
    }
  },
  "nextActions": "Images have been generated successfully. Use the returned URLs or base64 data to access them."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required

OpenRouter model identifier for image generation

Example:

"openai/dall-e-3"

prompt
string
required

Text prompt describing the desired image

Example:

"A serene landscape with mountains and a lake at sunset"

Response

Images generated successfully

model
string

Model used for generation

images
object[]
text
string

Text content from multimodal models

count
integer

Number of images generated

metadata
object
nextActions
string
Example:

"Images have been generated successfully. Use the returned URLs or base64 data to access them."