Back to APIs

Unified Agent API

Image Generation

Image Generation

Generate images from text prompts using Google GenAI with automatic fallback to DALL-E.

POST/v1/images/generateMulti-provider

Overview

Generate images from text prompts

Credits

3 credits per call

Providers

Google GenAIOpenAI

SDK Method

client.generate_image(...)

Parameters

promptRequired

string

Image description.

aspect_ratio

select (default: 1:1)

Aspect ratio.

Square
Landscape
Portrait

Example Response

{
  "success": true,
  "data": {
    "b64_json": "iVBORw0KGgoAAAANSUhEUg...(base64 image data)",
    "content_type": "image/png",
    "prompt": "A minimal blue circle on white background",
    "aspect_ratio": "1:1",
    "image_size": "512px"
  },
  "metadata": {
    "provider_used": "google_genai",
    "providers_tried": [
      "google_genai"
    ],
    "mode_used": null,
    "response_time_ms": 9498,
    "request_id": "req_2f408e4c"
  },
  "credits_used": 1
}

Get Started

Use this API through the O-mega platform. Create an API key in your dashboard, then call the endpoint with your key in the Authorization header.

Try Image Generation

Test Image Generation in the interactive playground. No setup required.

Open Playground
Image Generation API | Unified Agent APIs | suprbrowser