Imagen 4 Fast
imagen-4.0-fast-generate-001Imagen 4 Fast for prompt-based image generation through the Omixa resale gateway.
Imagen 4 Fast for prompt-based image generation through the Omixa resale gateway.
Prompt-to-image, image editing, image merging, upscaling, and background removal. Endpoint: https://www.omixa.cloud/api/v1/images/generations
Imagen 4 Fast for prompt-based image generation through the Omixa resale gateway.
Use Omixa's unified endpoint and your workspace API key. Provider routing, billing, failover, and usage records are handled by Omixa.
https://www.omixa.cloud/api/v1/images/generations
Only send options supported by this model. Required fields and accepted values are listed below.
| Field | Тип | Required | Accepted values | Описание |
|---|---|---|---|---|
model |
string | Yes | imagen-4.0-fast-generate-001 | Use `imagen-4.0-fast-generate-001`. Omixa resolves the active provider route and failover key automatically. |
prompt |
string | Yes | Any valid value | Natural language instruction for the generated or edited image. |
n |
integer | No | 1-10 | Number of images to request. Omixa caps the value by provider limits. |
output_format |
string | No | png, jpeg, webp | Preferred output file format. |
aspect_ratio |
string | No | 1:1, 16:9, 9:16, 4:3, 3:4 | Image shape. Gemini/Nano Banana and Imagen models accept common ratios. |
size |
string | No | 0.5K, 1K, 2K, 4K | Google image size/resolution bucket where supported. |
input_images |
array | No | Any valid value | Reference images for Nano Banana/Gemini image edit or merge. Keep total inline files under Omixa request limits. |
person_generation |
string | No | allow_adult, allow_all, dont_allow | Person generation safety control for Imagen-style models. |
enhance_prompt |
boolean | No | Any valid value | Lets the provider expand or rewrite the prompt when supported. |
add_watermark |
boolean | No | Any valid value | Provider watermark setting for Imagen-style outputs. |
reasoning_effort |
string | No | minimal, high | Gemini image thinking level where available. |
Start with this model-safe payload and expect the normalized Omixa response shape shown beside it.
{
"model": "imagen-4.0-fast-generate-001",
"prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
"n": 1,
"output_format": "png",
"aspect_ratio": "1:1",
"size": "1K",
"input_images": [
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,<base64-reference>"
}
}
]
}
{
"created": 1780660800,
"data": [
{
"b64_json": "<base64-image>",
"url": null
}
],
"usage": {
"billed_amount": "0.039000"
}
}
Replace the example API key with a workspace key and keep model-specific fields unchanged unless the table above marks them optional.
curl -X POST https://www.omixa.cloud/api/v1/images/generations \
-H "Authorization: Bearer omx_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "imagen-4.0-fast-generate-001",
"prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
"n": 1,
"output_format": "png",
"aspect_ratio": "1:1",
"size": "1K",
"input_images": [
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,<base64-reference>"
}
}
]
}'
const response = await fetch('https://www.omixa.cloud/api/v1/images/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer omx_live_xxx',
'Content-Type': 'application/json'
},
body: "{\n \"model\": \"imagen-4.0-fast-generate-001\",\n \"prompt\": \"A premium black and white product dashboard, clean glass UI, high contrast.\",\n \"n\": 1,\n \"output_format\": \"png\",\n \"aspect_ratio\": \"1:1\",\n \"size\": \"1K\",\n \"input_images\": [\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"data:image/png;base64,<base64-reference>\"\n }\n }\n ]\n}"
});
const data = await response.json();
import requests
response = requests.post(
'https://www.omixa.cloud/api/v1/images/generations',
headers={'Authorization': 'Bearer omx_live_xxx', 'Content-Type': 'application/json'},
json={
"model": "imagen-4.0-fast-generate-001",
"prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
"n": 1,
"output_format": "png",
"aspect_ratio": "1:1",
"size": "1K",
"input_images": [
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,<base64-reference>"
}
}
]
}
)
print(response.json())
$ch = curl_init('https://www.omixa.cloud/api/v1/images/generations');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer omx_live_xxx', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{
"model": "imagen-4.0-fast-generate-001",
"prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
"n": 1,
"output_format": "png",
"aspect_ratio": "1:1",
"size": "1K",
"input_images": [
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,<base64-reference>"
}
}
]
}',
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "omx_live_xxx");
var json = @"{
""model"": ""imagen-4.0-fast-generate-001"",
""prompt"": ""A premium black and white product dashboard, clean glass UI, high contrast."",
""n"": 1,
""output_format"": ""png"",
""aspect_ratio"": ""1:1"",
""size"": ""1K"",
""input_images"": [
{
""type"": ""image_url"",
""image_url"": {
""url"": ""data:image/png;base64,<base64-reference>""
}
}
]
}";
var response = await client.PostAsync("https://www.omixa.cloud/api/v1/images/generations", new StringContent(json, System.Text.Encoding.UTF8, "application/json"));
var body = await response.Content.ReadAsStringAsync();
payload := []byte(`{
"model": "imagen-4.0-fast-generate-001",
"prompt": "A premium black and white product dashboard, clean glass UI, high contrast.",
"n": 1,
"output_format": "png",
"aspect_ratio": "1:1",
"size": "1K",
"input_images": [
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,<base64-reference>"
}
}
]
}`)
req, _ := http.NewRequest("POST", "https://www.omixa.cloud/api/v1/images/generations", bytes.NewReader(payload))
req.Header.Set("Authorization", "Bearer omx_live_xxx")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)