Kolbo.AIKolbo.AI Docs
Developer API

Image Generation

Generate images from text prompts using the Kolbo API.

Generate images from text prompts using 20+ AI models including Flux, Midjourney, DALL-E, Ideogram, and more.

Endpoint

POST /api/v1/generate/image

Request Body

FieldTypeRequiredDescription
promptstringYesText description of the image
modelstringNoModel identifier (default: auto-select)
aspect_ratiostringNo"1:1", "16:9", "9:16", etc. (default: "1:1")
enhance_promptbooleanNoEnhance prompt for better results (default: true)
num_imagesnumberNoNumber of images to generate (default: 1)
reference_imagesarrayNoArray of image URLs used as style/content reference. The model uses these to guide composition, style, or subject. Check max_reference_images on the model.
visual_dna_idsarrayNoVisual DNA IDs for character/product consistency (max 3)
moodboard_idstringNoMoodboard ID to apply a style template. The moodboard's master prompt is combined with yours to guide the visual direction.

Examples

Basic

curl -X POST https://api.kolbo.ai/api/v1/generate/image \
  -H "X-API-Key: kolbo_live_..." \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A futuristic cityscape at night"}'

With Model and Options

curl -X POST https://api.kolbo.ai/api/v1/generate/image \
  -H "X-API-Key: kolbo_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Product photo of a sneaker on white background",
    "model": "fal-ai/flux/schnell",
    "aspect_ratio": "16:9",
    "enhance_prompt": false
  }'

With Reference Images

curl -X POST https://api.kolbo.ai/api/v1/generate/image \
  -H "X-API-Key: kolbo_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A portrait in the same style as the reference",
    "reference_images": ["https://example.com/style-ref.jpg"],
    "aspect_ratio": "1:1"
  }'

JavaScript

const response = await fetch('https://api.kolbo.ai/api/v1/generate/image', {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.KOLBO_API_KEY,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'A cat wearing a space suit',
    model: 'fal-ai/flux/schnell',
    aspect_ratio: '1:1'
  })
});

const { generation_id, poll_url } = await response.json();

// Poll for result
let result;
do {
  await new Promise(r => setTimeout(r, 3000));
  const status = await fetch(`https://api.kolbo.ai/api${poll_url}`, {
    headers: { 'X-API-Key': process.env.KOLBO_API_KEY }
  });
  result = await status.json();
} while (result.state === 'processing');

console.log('Image URLs:', result.result.urls);

Python

import requests
import time

API_KEY = "kolbo_live_..."
BASE = "https://api.kolbo.ai/api"

# Start generation
r = requests.post(f"{BASE}/v1/generate/image",
    headers={"X-API-Key": API_KEY},
    json={"prompt": "A mountain landscape at sunset", "aspect_ratio": "16:9"})
gen = r.json()

# Poll for result
while True:
    time.sleep(3)
    s = requests.get(f"{BASE}{gen['poll_url']}",
        headers={"X-API-Key": API_KEY}).json()
    if s["state"] != "processing":
        break

print("URLs:", s["result"]["urls"])

Response

Generation Started

{
  "success": true,
  "generation_id": "abc123",
  "type": "image",
  "model": "fal-ai/flux/schnell",
  "credits_charged": 2,
  "poll_url": "/api/v1/generate/abc123/status",
  "poll_interval_hint": 3
}

Completed Status

{
  "success": true,
  "generation_id": "abc123",
  "type": "image",
  "state": "completed",
  "progress": 100,
  "result": {
    "urls": ["https://cdn.kolbo.ai/images/..."],
    "model": "fal-ai/flux/schnell",
    "prompt_used": "Enhanced version of your prompt",
    "created_at": "2026-03-05T10:30:00Z"
  }
}

With Moodboard

Apply a moodboard to guide the visual style of your generation:

curl -X POST https://api.kolbo.ai/api/v1/generate/image \
  -H "X-API-Key: kolbo_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A product photo of a sneaker",
    "moodboard_id": "6601a1b2c3d4e5f6a7b8c9d0",
    "aspect_ratio": "1:1"
  }'

Use GET /api/v1/moodboards to list available moodboards. See Moodboards for details.

Finding Models

Use the Models endpoint to discover available image models:

curl "https://api.kolbo.ai/api/v1/models?type=image" \
  -H "X-API-Key: kolbo_live_..."