Image generation
From zero: install openai, set base_url, call images.generate. Pass optional reference images for Gemini Image edits. Billed per image (or tokens) in RODI.
https://api.rodiumai.io/v1/images/generationsRodiumAi exposes OpenAI-compatible image generation. Text-to-image works with OpenAI gpt-image and Google Imagen. Image-to-image editing uses Gemini Image models (e.g. google/gemini-*-flash-image) with image or images in the same endpoint.
Model ids & input images
When to use
- Product heroes, ads, and social creatives from a text brief.
- Edit or restyle a still with Gemini Image (image / images).
- Batch variants (n, size, quality) or feed a still into Veo.
Recipes
Product hero
Describe lighting, angle, and brand mood in the prompt. Start with 1024x1024 medium quality.
Note: Billed per image in RODI — check GET /v1/pricing before large n.
Image edit
Use a Gemini Image model and pass image (or images[]) as { b64_json }, a data URL, or gs://. HTTP(S) URLs are rejected.
Note: Imagen and openai/gpt-image-* do not accept input images on this endpoint.
Image → video
Generate or edit a still here, then POST /v1/videos/generations with image.b64_json (not an HTTPS URL).
Note: See the video guide image-to-video recipe.
Text → image examples
…Image → image (edit)
Send prompt plus image or images (max 14). Same encodings as video: { b64_json }, data URL, or gs://. HTTP(S) image URLs are rejected.
…Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Required | Image model id (e.g. openai/gpt-image-1, google/imagen-4.0-generate-001, google/gemini-3.1-flash-image). |
| prompt | string | Required | Text description of the image to generate or edit instruction. |
| image | object | string | Optional | Optional reference for image→image (Gemini Image only). Accepts { b64_json }, data URL, or gs:// URI. Aliases: input_image, image_url. HTTP(S) URLs are rejected. Imagen and OpenAI gpt-image reject input images. |
| images | array | Optional | Optional list of references (same encodings as image), max 14. Alias: input_images. Use for multi-image edit / merge on Gemini Image models. |
| n | integer | Optional | Number of images (1–10). Default 1. |
| size | string | Optional | Output size, e.g. "1024x1024", "1536x1024", "1024x1536" (maps to aspect ratio for Gemini/Imagen when supported). |
| quality | string | Optional | Quality hint when supported by the upstream model (e.g. medium). |