Image generation
Generate images from text prompts using DALL·E 3 or FLUX.2-pro. Return base64-encoded JSON or a hosted URL.
Endpoint
POST
https://api.getnimbus.net/v1/images/generationsRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | dall-e-3 or FLUX.2-pro |
| prompt | string | Yes | Text description of the desired image. Max 4000 chars. |
| n | integer | No | Number of images to generate. Default 1, max 4. |
| size | string | No | 256x256, 512x512, 1024x1024 (default), 1792x1024, 1024x1792. |
| response_format | string | No | url (default) or b64_json. |
Example: cURL
curl https://api.getnimbus.net/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MERIDIAN_API_KEY" \
-d '{
"model": "dall-e-3",
"prompt": "A cyberpunk cat wearing a violet hoodie, neon city background",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json"
}'Example: Python
import requests
headers = {
"Authorization": f"Bearer {os.environ['MERIDIAN_API_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "FLUX.2-pro",
"prompt": "A cyberpunk cat wearing a violet hoodie, neon city background",
"n": 1,
"size": "1024x1024",
"response_format": "url",
}
r = requests.post(
"https://api.getnimbus.net/v1/images/generations",
headers=headers,
json=payload,
)
print(r.json())Response
When response_format is b64_json:
{
"created": 1717027200,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA...",
"revised_prompt": "A cyberpunk cat wearing a violet hoodie..."
}
]
}When response_format is url (default):
{
"created": 1717027200,
"data": [
{
"url": "https://cdn.getnimbus.net/gen/abc123.png",
"revised_prompt": "A cyberpunk cat wearing a violet hoodie..."
}
]
}Rate limits
Free tier: 5 images / hour. Pro tier: 100 images / hour. Enterprise: custom. Headers x-ratelimit-remaining and x-ratelimit-reset are included on every response.