Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

2.3 KB
Raw Blame
###
# @name Omniroute - Generate Image
POST {{omniroute-address}}/v1/images/generations
Authorization: Bearer {{OMNIROUTE_API_KEY}}
Content-Type: application/json

{
  "prompt": "Happy red kitten",
  "model": "pol/zimage",
  "n": 1,
  "size": "1024x1024",
  "quality": "medium",
  "response_format": "b64_json",
  "user": "",
  "image": ""
}

###

# @name Omniroute - Generate Image - Custom OpenAI compatible endpoint
POST {{omniroute-address}}/v1/images/generations
Authorization: Bearer {{OMNIROUTE_API_KEY}}
Content-Type: application/json

{
  "prompt": "Happy red kitten",
  "model": "pollen/zimage",
  "n": 1,
  "size": "1024x1024",
  "quality": "medium",
  "response_format": "b64_json",
  "user": "",
  "image": ""
}

###
# @name Pollinations - Generate Image
POST https://gen.pollinations.ai/v1/images/generations
Authorization: Bearer {{POLLINATIONS_API_KEY}}
Content-Type: application/json

{
  "prompt": "Happy red kitten",
  "model": "zimage",
  "n": 1,
  "size": "1024x1024",
  "quality": "medium",
  "response_format": "b64_json",
  "user": "",
  "image": ""
}

###
# @name Omniroute - Codex image via /v1/images/generations (GPT-Image shim)
# Translates a GPT-Image-style request into a /responses call with the
# image_generation hosted tool. Use with OpenWebUI's image generation feature.
POST {{omniroute-address}}/v1/images/generations
Authorization: Bearer {{OMNIROUTE_API_KEY}}
Content-Type: application/json

{
  "model": "codex/gpt-5.6-sol",
  "prompt": "A happy red kitten, highly detailed fur, studio lighting",
  "n": 1,
  "size": "1024x1024",
  "response_format": "b64_json"
}

###
# @name Omniroute - Codex hosted image_generation (Responses API)
# Requires a Codex provider connection authenticated via ChatGPT OAuth.
# Expect SSE stream to include `response.output_item.done` with
# `item.type === "image_generation_call"` and a base64 PNG in `item.result`.
POST {{omniroute-address}}/v1/responses
Authorization: Bearer {{OMNIROUTE_API_KEY}}
Content-Type: application/json

{
  "model": "gpt-5.3-codex",
  "instructions": "Generate an image when the user asks for one.",
  "input": [
    {
      "role": "user",
      "content": [
        { "type": "input_text", "text": "Draw a happy red kitten as a PNG." }
      ]
    }
  ],
  "tools": [{ "type": "image_generation", "output_format": "png" }],
  "stream": true
}

###