Image generation API powered by Gemini. Base URL: https://lumigen.cc
All API endpoints (except /health and /docs) require an API key via the Authorization header:
Authorization: Bearer sk-your-api-key-here
Create an image generation job. Balance (in cents USD) is deducted immediately; refunded on failure.
| Field | Type | Description | |
|---|---|---|---|
prompt | string | required | Image description |
image_url | string | optional | Reference image URL (image-to-image) |
quality | string | optional | 1k (default), 2k, or 4k |
curl -X POST https://lumigen.cc/api/generate \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{"prompt": "a cat in watercolor style", "quality": "1k"}'
202{
"id": "abc-123",
"status": "queued",
"quality": "1k",
"cost": 1,
"balance": 99
}
{
"id": "abc-123",
"status": "completed",
"url": "https://..."
}
Status: queued → processing → completed | failed
{
"account_id": "uuid",
"name": "User",
"balance": 99,
"is_admin": false
}
Query params: ?limit=20&offset=0&type=generation|topup|refund
Body: {"name": "my-key", "expires_at": "2026-12-31 23:59:59"}
{"status": "ok"}
| Quality | Max Resolution | Behavior |
|---|---|---|
1k | 1024px | Fast — uses thumbnail + resize |
2k | 2048px | Default — attempts full-size fetch, resize to 2048px |
4k | Original | Best quality — full-size, no resize |
| Status | Meaning |
|---|---|
400 | Bad request (missing/invalid params) |
401 | Invalid or missing API key |
402 | Insufficient balance |
404 | Resource not found |
500 | Internal server error |