Overview
Generate images from text prompts
Credits
3 credits per call
Providers
Google GenAIOpenAI
SDK Method
client.generate_image(...)
Parameters
promptRequiredstring
Image description.
aspect_ratioselect (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.