dantelabs-agentic-school 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +11 -53
- package/cli/bin/cli.js +31 -8
- package/cli/src/commands/info.js +15 -11
- package/cli/src/commands/install.js +53 -29
- package/cli/src/commands/list.js +28 -22
- package/cli/src/commands/uninstall.js +23 -16
- package/cli/src/i18n/index.js +96 -0
- package/cli/src/i18n/locales/en.js +107 -0
- package/cli/src/i18n/locales/ko.js +107 -0
- package/cli/src/lib/config.js +116 -1
- package/cli/src/lib/installer.js +106 -3
- package/package.json +1 -1
- package/plugins/brand-analytics/plugin.json +9 -0
- package/plugins/campaign-orchestration/plugin.json +9 -0
- package/plugins/common/plugin.json +9 -0
- package/plugins/common/skills/kie-image-generator/.env.example +4 -0
- package/plugins/common/skills/kie-image-generator/SKILL.md +281 -0
- package/plugins/common/skills/kie-image-generator/references/api_docs.md +358 -0
- package/plugins/common/skills/kie-image-generator/scripts/__pycache__/utils.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/generate_image.py +285 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__init__.py +19 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/__init__.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/flux_kontext.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/gpt4o.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/ideogram.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/imagen.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/nano_banana.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/nano_banana_edit.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/nano_banana_pro.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/seedream.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/__pycache__/seedream_edit.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/flux_kontext.py +36 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/gpt4o.py +36 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/ideogram.py +85 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/imagen.py +48 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/nano_banana.py +40 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/nano_banana_edit.py +55 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/nano_banana_pro.py +47 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/seedream.py +51 -0
- package/plugins/common/skills/kie-image-generator/scripts/models/seedream_edit.py +66 -0
- package/plugins/common/skills/kie-image-generator/scripts/utils.py +706 -0
- package/plugins/common/skills/kie-video-generator/SKILL.md +258 -0
- package/plugins/common/skills/kie-video-generator/references/api_docs.md +202 -0
- package/plugins/common/skills/kie-video-generator/scripts/__pycache__/utils.cpython-313.pyc +0 -0
- package/plugins/common/skills/kie-video-generator/scripts/generate_video.py +356 -0
- package/plugins/common/skills/kie-video-generator/scripts/models/__init__.py +4 -0
- package/plugins/common/skills/kie-video-generator/scripts/utils.py +617 -0
- package/plugins/content-creation/plugin.json +9 -0
- package/plugins/creative-production/plugin.json +9 -0
- package/plugins/customer-segmentation/plugin.json +9 -0
- package/plugins/market-research/plugin.json +9 -0
- package/plugins/persona-builder/plugin.json +9 -0
- package/plugins/social-strategy/plugin.json +9 -0
package/package.json
CHANGED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kie-image-generator
|
|
3
|
+
description: Generate images using Kie.ai's diverse AI models including GPT-4O Image, Flux Kontext, Nano Banana, Seedream, Imagen, and Ideogram. This skill should be used when the user requests AI-generated images, creative visuals, artwork creation, or image generation with specific styles. Supports 13+ models with full parameter control, automatic task polling, and usage tracking.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kie Image Generator
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Generate high-quality AI images using Kie.ai's comprehensive collection of image generation models. This skill provides access to 13+ state-of-the-art models including GPT-4O Image, Flux Kontext Pro/Max, Nano Banana, Nano Banana Pro (DeepSeed), Seedream 4.0, Imagen 4 variants, Ideogram V3, and Ideogram Character.
|
|
11
|
+
|
|
12
|
+
**Key Features:**
|
|
13
|
+
- 13+ AI image models with diverse capabilities
|
|
14
|
+
- Credit/cost tracking and usage reporting
|
|
15
|
+
- Interactive model selection with cost comparison
|
|
16
|
+
- Automatic task polling and download
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
**Check account credits:**
|
|
21
|
+
```bash
|
|
22
|
+
python scripts/generate_image.py --credits
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**List available models with pricing:**
|
|
26
|
+
```bash
|
|
27
|
+
python scripts/generate_image.py --list-models
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Interactive mode (select model with cost display):**
|
|
31
|
+
```bash
|
|
32
|
+
python scripts/generate_image.py "a beautiful sunset over mountains"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Direct model selection:**
|
|
36
|
+
```bash
|
|
37
|
+
python scripts/generate_image.py "cyberpunk city" --model flux-kontext-pro
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Skip confirmation:**
|
|
41
|
+
```bash
|
|
42
|
+
python scripts/generate_image.py "abstract art" --model seedream-v4 -y
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Supported Models
|
|
46
|
+
|
|
47
|
+
### 1. GPT-4O Image (gpt4o-image)
|
|
48
|
+
- **Best for:** Text rendering, complex scenes, photorealistic images
|
|
49
|
+
- **Parameters:** `prompt`, `size` (1:1, 3:2, 2:3), `nVariants` (1-4)
|
|
50
|
+
- **Speed:** Medium (~20-30s)
|
|
51
|
+
|
|
52
|
+
### 2. Flux Kontext Pro (flux-kontext-pro)
|
|
53
|
+
- **Best for:** Fast creative generation, artistic styles
|
|
54
|
+
- **Parameters:** `prompt`, `image_ratio` (16:9, 21:9, 4:3, 1:1, 3:4, 9:16), `output_format` (jpeg, png)
|
|
55
|
+
- **Speed:** Fast (8x faster than GPT-Image)
|
|
56
|
+
|
|
57
|
+
### 3. Flux Kontext Max (flux-kontext-max)
|
|
58
|
+
- **Best for:** High precision, typography, consistency
|
|
59
|
+
- **Parameters:** Same as Flux Kontext Pro
|
|
60
|
+
- **Speed:** Medium
|
|
61
|
+
|
|
62
|
+
### 4. Nano Banana (nano-banana)
|
|
63
|
+
- **Best for:** Hyper-realistic, physics-aware visuals
|
|
64
|
+
- **Parameters:** `prompt`, `output_format` (PNG, JPEG), `image_size` (1:1, 9:16, 16:9, 3:4, 4:3, etc.)
|
|
65
|
+
- **Speed:** Fast (~10-20s)
|
|
66
|
+
|
|
67
|
+
### 5. Nano Banana Pro (nano-banana-pro) ✨ NEW
|
|
68
|
+
- **Best for:** 3K/4K images, text rendering, character consistency
|
|
69
|
+
- **Parameters:** `prompt`, `aspect_ratio` (1:1, 3:2, 16:9, etc.), `resolution` (sd, hd, 4k), `format` (jpg, png, webp), `image_input` (reference images)
|
|
70
|
+
- **Speed:** Fast
|
|
71
|
+
- **Pricing:** $0.04 (768px) / $0.11 (1024px)
|
|
72
|
+
|
|
73
|
+
### 6. Seedream 4.0 (seedream-v4)
|
|
74
|
+
- **Best for:** Fast generation, 2K-4K resolution
|
|
75
|
+
- **Parameters:** `prompt`, `image_size`, `image_resolution` (1K, 2K, 4K), `max_images` (1-6), `seed`
|
|
76
|
+
- **Speed:** Very fast (~1.8s for 2K)
|
|
77
|
+
|
|
78
|
+
### 7. Imagen 4 Ultra (imagen-4-ultra)
|
|
79
|
+
- **Best for:** Photorealistic, high-quality visuals
|
|
80
|
+
- **Parameters:** `prompt`, `negative_prompt`, `aspect_ratio` (1:1, 16:9, 9:16, 3:4, 4:3), `num_images` (1-4), `seed`
|
|
81
|
+
- **Speed:** Very fast (10x faster)
|
|
82
|
+
|
|
83
|
+
### 8. Imagen 4 (imagen-4)
|
|
84
|
+
- **Best for:** Balanced quality and speed
|
|
85
|
+
- **Parameters:** Same as Imagen 4 Ultra
|
|
86
|
+
- **Speed:** Fast
|
|
87
|
+
|
|
88
|
+
### 9. Imagen 4 Fast (imagen-4-fast)
|
|
89
|
+
- **Best for:** Quick iterations, drafts
|
|
90
|
+
- **Parameters:** Same as Imagen 4 Ultra
|
|
91
|
+
- **Speed:** Very fast
|
|
92
|
+
|
|
93
|
+
### 10. Ideogram V3 (ideogram-v3)
|
|
94
|
+
- **Best for:** Text rendering, typography
|
|
95
|
+
- **Parameters:** `prompt`, `rendering_speed` (TURBO, BALANCED, QUALITY), `style` (AUTO, GENERAL, REALISTIC, DESIGN), `image_size`, `num_images` (1-4), `expand_prompt`, `seed`, `negative_prompt`
|
|
96
|
+
- **Speed:** Variable (depends on rendering_speed)
|
|
97
|
+
|
|
98
|
+
### 11. Ideogram Character (ideogram-character)
|
|
99
|
+
- **Best for:** Character consistency, portraits
|
|
100
|
+
- **Parameters:** `prompt`, `reference_image_urls`, `rendering_speed`, `style` (AUTO, REALISTIC, FICTION), `num_images` (1-4), `expand_prompt`, `seed`
|
|
101
|
+
- **Speed:** Variable
|
|
102
|
+
|
|
103
|
+
## Workflow
|
|
104
|
+
|
|
105
|
+
### Step 1: Environment Setup
|
|
106
|
+
|
|
107
|
+
Ensure `.env` file exists in the skill directory with Kie.ai API key:
|
|
108
|
+
```bash
|
|
109
|
+
KIEAI_API_KEY=your_api_key_here
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
If `.env` doesn't exist, the script will create it from `.env.example` and prompt for API key.
|
|
113
|
+
|
|
114
|
+
### Step 2: Generate Image
|
|
115
|
+
|
|
116
|
+
Run the generation script with desired parameters:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Basic generation
|
|
120
|
+
python scripts/generate_image.py "prompt"
|
|
121
|
+
|
|
122
|
+
# With model selection
|
|
123
|
+
python scripts/generate_image.py "prompt" --model MODEL_ID
|
|
124
|
+
|
|
125
|
+
# With advanced parameters
|
|
126
|
+
python scripts/generate_image.py "prompt" \
|
|
127
|
+
--model gpt4o-image \
|
|
128
|
+
--size "3:2" \
|
|
129
|
+
--variants 2 \
|
|
130
|
+
--output ~/Downloads/images/
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Step 3: Task Polling
|
|
134
|
+
|
|
135
|
+
The script automatically:
|
|
136
|
+
1. Submits generation task to Kie.ai
|
|
137
|
+
2. Polls for completion (every 2 seconds)
|
|
138
|
+
3. Downloads completed image
|
|
139
|
+
4. Saves to output directory with timestamped filename
|
|
140
|
+
|
|
141
|
+
## Advanced Usage
|
|
142
|
+
|
|
143
|
+
### Model-Specific Parameters
|
|
144
|
+
|
|
145
|
+
Each model has a dedicated module in `scripts/models/` with full parameter support:
|
|
146
|
+
|
|
147
|
+
**GPT-4O Image:**
|
|
148
|
+
```bash
|
|
149
|
+
python scripts/generate_image.py "sunset" \
|
|
150
|
+
--model gpt4o-image \
|
|
151
|
+
--size "16:9" \
|
|
152
|
+
--variants 4
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Flux Kontext:**
|
|
156
|
+
```bash
|
|
157
|
+
python scripts/generate_image.py "abstract art" \
|
|
158
|
+
--model flux-kontext-pro \
|
|
159
|
+
--ratio "21:9" \
|
|
160
|
+
--format jpeg
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Nano Banana Pro:**
|
|
164
|
+
```bash
|
|
165
|
+
python scripts/generate_image.py "cinematic poster cool banana hero" \
|
|
166
|
+
--model nano-banana-pro \
|
|
167
|
+
--aspect-ratio "16:9" \
|
|
168
|
+
--resolution 4k \
|
|
169
|
+
--format png
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Seedream 4.0:**
|
|
173
|
+
```bash
|
|
174
|
+
python scripts/generate_image.py "landscape" \
|
|
175
|
+
--model seedream-v4 \
|
|
176
|
+
--resolution 4K \
|
|
177
|
+
--images 4 \
|
|
178
|
+
--seed 12345
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Imagen 4:**
|
|
182
|
+
```bash
|
|
183
|
+
python scripts/generate_image.py "portrait" \
|
|
184
|
+
--model imagen-4-ultra \
|
|
185
|
+
--aspect-ratio "3:4" \
|
|
186
|
+
--negative "blurry, low quality" \
|
|
187
|
+
--seed 67890
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
**Ideogram V3:**
|
|
191
|
+
```bash
|
|
192
|
+
python scripts/generate_image.py "logo design" \
|
|
193
|
+
--model ideogram-v3 \
|
|
194
|
+
--rendering QUALITY \
|
|
195
|
+
--style DESIGN \
|
|
196
|
+
--expand-prompt
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Batch Generation
|
|
200
|
+
|
|
201
|
+
Generate multiple variations:
|
|
202
|
+
```bash
|
|
203
|
+
# 4 variants of same prompt
|
|
204
|
+
python scripts/generate_image.py "cyberpunk city" --variants 4
|
|
205
|
+
|
|
206
|
+
# Multiple prompts
|
|
207
|
+
for prompt in "sunset" "moonrise" "starfield"; do
|
|
208
|
+
python scripts/generate_image.py "$prompt" --model imagen-4-fast
|
|
209
|
+
done
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Resources
|
|
213
|
+
|
|
214
|
+
### scripts/
|
|
215
|
+
- `generate_image.py` - Main generation script with CLI interface
|
|
216
|
+
- `models/` - Model-specific parameter handlers
|
|
217
|
+
- `gpt4o.py` - GPT-4O Image parameters
|
|
218
|
+
- `flux_kontext.py` - Flux Kontext Pro/Max parameters
|
|
219
|
+
- `nano_banana.py` - Nano Banana parameters
|
|
220
|
+
- `seedream.py` - Seedream 4.0 parameters
|
|
221
|
+
- `imagen.py` - Imagen 4 variants parameters
|
|
222
|
+
- `ideogram.py` - Ideogram V3/Character parameters
|
|
223
|
+
- `utils.py` - Common utilities (polling, download, env loading)
|
|
224
|
+
|
|
225
|
+
### references/
|
|
226
|
+
- `api_docs.md` - Comprehensive Kie.ai API documentation
|
|
227
|
+
|
|
228
|
+
## Error Handling
|
|
229
|
+
|
|
230
|
+
The script handles common errors:
|
|
231
|
+
- **Missing API key:** Prompts to create .env file
|
|
232
|
+
- **Invalid model:** Lists available models
|
|
233
|
+
- **Generation timeout:** Retries or reports timeout (max 2 minutes)
|
|
234
|
+
- **API errors:** Displays error message and suggests solutions
|
|
235
|
+
|
|
236
|
+
## Output Format
|
|
237
|
+
|
|
238
|
+
Generated images are saved with descriptive filenames:
|
|
239
|
+
```
|
|
240
|
+
~/Downloads/images/gpt4o-image_sunset_20250113_203045.png
|
|
241
|
+
~/Downloads/images/flux-kontext-pro_cyberpunk_20250113_203125.jpg
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Format: `{model}_{prompt-slug}_{timestamp}.{ext}`
|
|
245
|
+
|
|
246
|
+
## Credit System
|
|
247
|
+
|
|
248
|
+
Kie.ai uses a credit-based pricing system:
|
|
249
|
+
- **1 credit = $0.005 USD**
|
|
250
|
+
- Credits are deducted upon task completion
|
|
251
|
+
- Use `--credits` to check current balance
|
|
252
|
+
|
|
253
|
+
### Estimated Credit Costs
|
|
254
|
+
|
|
255
|
+
| Model | Est. Credits | Est. USD |
|
|
256
|
+
|-------|-------------|----------|
|
|
257
|
+
| Nano Banana | ~20 | $0.10 |
|
|
258
|
+
| Imagen 4 Fast | ~25 | $0.12 |
|
|
259
|
+
| Nano Banana Edit | ~25 | $0.12 |
|
|
260
|
+
| Flux Kontext Pro | ~30 | $0.15 |
|
|
261
|
+
| Seedream V4 | ~35 | $0.18 |
|
|
262
|
+
| Nano Banana Pro | ~40 | $0.20 |
|
|
263
|
+
| Ideogram V3 | ~40 | $0.20 |
|
|
264
|
+
| Seedream V4 Edit | ~40 | $0.20 |
|
|
265
|
+
| Ideogram Character | ~45 | $0.23 |
|
|
266
|
+
| GPT-4O Image | ~50 | $0.25 |
|
|
267
|
+
| Imagen 4 | ~50 | $0.25 |
|
|
268
|
+
| Flux Kontext Max | ~60 | $0.30 |
|
|
269
|
+
| Imagen 4 Ultra | ~100 | $0.50 |
|
|
270
|
+
|
|
271
|
+
*Prices are estimates and may vary based on parameters.*
|
|
272
|
+
|
|
273
|
+
## Usage Tracking
|
|
274
|
+
|
|
275
|
+
After each generation, the script reports:
|
|
276
|
+
```
|
|
277
|
+
💰 Credits used: 45.0 ($0.23)
|
|
278
|
+
Remaining: 837.5 credits ($4.19)
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
This helps track spending and plan budget for generation tasks
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
# Kie.ai API Documentation Reference
|
|
2
|
+
|
|
3
|
+
Comprehensive reference for all Kie.ai image generation models.
|
|
4
|
+
|
|
5
|
+
## Base URL
|
|
6
|
+
```
|
|
7
|
+
https://api.kie.ai
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Authentication
|
|
11
|
+
All requests require `X-API-KEY` header:
|
|
12
|
+
```
|
|
13
|
+
X-API-KEY: your_api_key_here
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
1. **Submit Task**: POST to generation endpoint → receive `taskId`
|
|
18
|
+
2. **Poll Status**: GET record-info endpoint with `taskId` → wait for completion
|
|
19
|
+
3. **Download**: Extract image URL from completed response
|
|
20
|
+
|
|
21
|
+
## Response Format
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"code": 200,
|
|
25
|
+
"msg": "success",
|
|
26
|
+
"data": {
|
|
27
|
+
"taskId": "...", // On task submission
|
|
28
|
+
"status": "completed", // On polling
|
|
29
|
+
"imageUrl": "...", // When completed
|
|
30
|
+
"progress": 0-100 // During processing
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## GPT-4O Image
|
|
38
|
+
|
|
39
|
+
**Generation**: `POST /api/v1/gpt4o-image/generate`
|
|
40
|
+
**Record Info**: `GET /api/v1/gpt4o-image/record-info?taskId={taskId}`
|
|
41
|
+
|
|
42
|
+
**Parameters**:
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"prompt": "string (required)",
|
|
46
|
+
"size": "1:1 | 3:2 | 2:3 (default: 1:1)",
|
|
47
|
+
"variants": "1-4 (default: 1)"
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Best For**: High-quality, creative images with OpenAI's DALL-E technology
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Flux Kontext Pro / Max
|
|
56
|
+
|
|
57
|
+
**Generation**: `POST /api/v1/flux/kontext/generate`
|
|
58
|
+
**Record Info**: `GET /api/v1/flux/kontext/record-info?taskId={taskId}`
|
|
59
|
+
|
|
60
|
+
**Parameters**:
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"prompt": "string (required)",
|
|
64
|
+
"ratio": "16:9 | 9:16 | 21:9 | 3:4 | 4:3 | 5:4 | 4:5 (default: 16:9)",
|
|
65
|
+
"output_format": "jpeg | png (default: png)",
|
|
66
|
+
"model": "flux-kontext-pro | flux-kontext-max"
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Best For**:
|
|
71
|
+
- **Pro**: Fast, professional results for general use
|
|
72
|
+
- **Max**: Maximum quality for detailed scenes
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Nano Banana (Gemini 2.5 Flash) - v1 API
|
|
77
|
+
|
|
78
|
+
**Generation**: `POST /api/v1/jobs/createTask` (model: `google/nano-banana`)
|
|
79
|
+
**Record Info**: `GET /api/v1/jobs/recordInfo?taskId={taskId}`
|
|
80
|
+
|
|
81
|
+
**Parameters**:
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"prompt": "string (required)",
|
|
85
|
+
"output_format": "png | jpeg (default: png)",
|
|
86
|
+
"image_size": "1:1 | 9:16 | 16:9 | 3:4 | 4:3 | 3:2 | 2:3 | 5:4 | 4:5 | 21:9 | auto (default: 1:1)"
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Best For**: Google Gemini-powered fast generation with various aspect ratios
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Nano Banana Pro (DeepSeed) - v2 API
|
|
95
|
+
|
|
96
|
+
**Generation**: `POST /api/v2/jobs/createTask` (model: `nano-banana-pro`)
|
|
97
|
+
**Record Info**: `GET /api/v1/jobs/recordInfo?taskId={taskId}`
|
|
98
|
+
|
|
99
|
+
**Description**: DeepSeed's Nano Banana Pro delivers sharper 3K images, intelligent 4K scaling, improved text rendering, and enhanced character consistency.
|
|
100
|
+
|
|
101
|
+
**Pricing**: $0.04 (768px) / $0.11 (1024px)
|
|
102
|
+
|
|
103
|
+
**Request Body**:
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"model": "nano-banana-pro",
|
|
107
|
+
"callbackUrl": "string (optional)",
|
|
108
|
+
"input": {
|
|
109
|
+
"input_prompt": "string (required)",
|
|
110
|
+
"input_image_input": ["url1", "url2"] (optional, max 4 reference images),
|
|
111
|
+
"input_aspect_ratio": "1:1 | 3:2 | 2:3 | 4:3 | 3:4 | 16:9 | 9:16 | 21:9 | 9:21 (default: 1:1)",
|
|
112
|
+
"input_resolution": "sd | hd | 4k (default: hd)",
|
|
113
|
+
"input_output_format": "jpg | png | webp (default: webp)"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Parameters**:
|
|
119
|
+
| Parameter | Required | Description |
|
|
120
|
+
|-----------|----------|-------------|
|
|
121
|
+
| input_prompt | Yes | Image description |
|
|
122
|
+
| input_image_input | No | Reference image URLs (up to 4 images, PNG/JPEG/GIF/WebP, max 10MB) |
|
|
123
|
+
| input_aspect_ratio | No | Output aspect ratio |
|
|
124
|
+
| input_resolution | No | Output resolution (sd/hd/4k) |
|
|
125
|
+
| input_output_format | No | Output format (jpg/png/webp) |
|
|
126
|
+
|
|
127
|
+
**Request Example**:
|
|
128
|
+
```bash
|
|
129
|
+
curl -X POST "https://api.kie.ai/api/v2/jobs/createTask" \
|
|
130
|
+
-H "Content-Type: application/json" \
|
|
131
|
+
-H "Authorization: Bearer YOUR_API_KEY" \
|
|
132
|
+
-d '{
|
|
133
|
+
"model": "nano-banana-pro",
|
|
134
|
+
"input": {
|
|
135
|
+
"input_prompt": "cinematic poster cool banana hero in shades leaps from sci-fi pod",
|
|
136
|
+
"input_resolution": "hd",
|
|
137
|
+
"input_output_format": "png"
|
|
138
|
+
}
|
|
139
|
+
}'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Response Example**:
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"code": 200,
|
|
146
|
+
"message": "success",
|
|
147
|
+
"data": {
|
|
148
|
+
"task_id": "task_xxxxxxx"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Query Task Response**:
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"code": 200,
|
|
157
|
+
"message": "success",
|
|
158
|
+
"data": {
|
|
159
|
+
"taskId": "task_12345678",
|
|
160
|
+
"model": "nano-banana-pro",
|
|
161
|
+
"state": "success",
|
|
162
|
+
"resultJson": "{\"resultUrls\":[\"https://example.com/generated-image.jpg\"]}",
|
|
163
|
+
"failCode": "",
|
|
164
|
+
"failMsg": "",
|
|
165
|
+
"costTime": 0,
|
|
166
|
+
"completeTime": 1698765432000,
|
|
167
|
+
"createTime": 1698765400000
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**State Values**:
|
|
173
|
+
| State | Description |
|
|
174
|
+
|-------|-------------|
|
|
175
|
+
| waiting | Waiting for generation |
|
|
176
|
+
| queuing | In queue |
|
|
177
|
+
| generating | Generating |
|
|
178
|
+
| success | Generation successful |
|
|
179
|
+
| fail | Generation failed |
|
|
180
|
+
|
|
181
|
+
**Best For**: High-quality 3K/4K images with improved text rendering and character consistency
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Seedream 4.0
|
|
186
|
+
|
|
187
|
+
**Generation**: `POST /api/v1/bytedance/seedream-v4-text-to-image`
|
|
188
|
+
**Record Info**: `GET /api/v1/bytedance/seedream-v4-text-to-image/record-info?taskId={taskId}`
|
|
189
|
+
|
|
190
|
+
**Parameters**:
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"prompt": "string (required, max 5000 chars)",
|
|
194
|
+
"image_size": "string (aspect ratio)",
|
|
195
|
+
"image_resolution": "1K | 2K | 4K (default: 2K)",
|
|
196
|
+
"max_images": "1-6 (default: 1)",
|
|
197
|
+
"seed": "integer (optional, for reproducibility)"
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Best For**: High-resolution images with fine control, ByteDance technology
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Imagen 4 (Ultra / Standard / Fast)
|
|
206
|
+
|
|
207
|
+
**Generation**:
|
|
208
|
+
- `POST /api/v1/google/imagen-4-ultra`
|
|
209
|
+
- `POST /api/v1/google/imagen-4`
|
|
210
|
+
- `POST /api/v1/google/imagen-4-fast`
|
|
211
|
+
|
|
212
|
+
**Record Info**:
|
|
213
|
+
- `GET /api/v1/google/imagen-4-ultra/record-info?taskId={taskId}`
|
|
214
|
+
- `GET /api/v1/google/imagen-4/record-info?taskId={taskId}`
|
|
215
|
+
- `GET /api/v1/google/imagen-4-fast/record-info?taskId={taskId}`
|
|
216
|
+
|
|
217
|
+
**Parameters**:
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"prompt": "string (required)",
|
|
221
|
+
"negative_prompt": "string (optional)",
|
|
222
|
+
"aspect_ratio": "1:1 | 16:9 | 9:16 | 3:4 | 4:3 (default: 1:1)",
|
|
223
|
+
"num_images": "1-4 (default: 1)",
|
|
224
|
+
"seed": "integer (optional)"
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Best For**:
|
|
229
|
+
- **Ultra**: Maximum photorealism and detail
|
|
230
|
+
- **Standard**: Balanced quality and speed
|
|
231
|
+
- **Fast**: Quick iterations with good quality
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Ideogram V3
|
|
236
|
+
|
|
237
|
+
**Generation**: `POST /api/v1/ideogram/v3-text-to-image`
|
|
238
|
+
**Record Info**: `GET /api/v1/ideogram/v3-text-to-image/record-info?taskId={taskId}`
|
|
239
|
+
|
|
240
|
+
**Parameters**:
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"prompt": "string (required)",
|
|
244
|
+
"rendering_speed": "TURBO | BALANCED | QUALITY (default: BALANCED)",
|
|
245
|
+
"style": "AUTO | GENERAL | REALISTIC | DESIGN (default: AUTO)",
|
|
246
|
+
"image_size": "string (aspect ratio)",
|
|
247
|
+
"num_images": "1-4 (default: 1)",
|
|
248
|
+
"expand_prompt": "boolean (MagicPrompt enhancement)",
|
|
249
|
+
"seed": "integer (optional)",
|
|
250
|
+
"negative_prompt": "string (optional)"
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**Best For**: Text rendering in images, design work, versatile styles
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Ideogram Character
|
|
259
|
+
|
|
260
|
+
**Generation**: `POST /api/v1/ideogram/character`
|
|
261
|
+
**Record Info**: `GET /api/v1/ideogram/character/record-info?taskId={taskId}`
|
|
262
|
+
|
|
263
|
+
**Parameters**:
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"prompt": "string (required)",
|
|
267
|
+
"rendering_speed": "TURBO | BALANCED | QUALITY (default: BALANCED)",
|
|
268
|
+
"style": "AUTO | REALISTIC | FICTION (default: AUTO)",
|
|
269
|
+
"image_size": "string (aspect ratio)",
|
|
270
|
+
"num_images": "1-4 (default: 1)",
|
|
271
|
+
"expand_prompt": "boolean (MagicPrompt enhancement)",
|
|
272
|
+
"seed": "integer (optional)",
|
|
273
|
+
"negative_prompt": "string (optional)",
|
|
274
|
+
"reference_image_urls": ["url1", "url2"] (optional, for character consistency)
|
|
275
|
+
}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**Best For**: Consistent character generation across multiple images
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Error Handling
|
|
283
|
+
|
|
284
|
+
**Common HTTP Status Codes**:
|
|
285
|
+
- `200`: Success
|
|
286
|
+
- `400`: Invalid parameters
|
|
287
|
+
- `401`: Invalid API key
|
|
288
|
+
- `404`: Endpoint not found
|
|
289
|
+
- `429`: Rate limit exceeded
|
|
290
|
+
- `500`: Server error
|
|
291
|
+
|
|
292
|
+
**Task Status Values**:
|
|
293
|
+
- `pending`: Task submitted, not yet processing
|
|
294
|
+
- `processing`: Generation in progress
|
|
295
|
+
- `completed`: Image ready
|
|
296
|
+
- `failed`: Generation failed
|
|
297
|
+
|
|
298
|
+
**Polling Best Practices**:
|
|
299
|
+
- Poll every 2 seconds
|
|
300
|
+
- Maximum 60 attempts (120 seconds total)
|
|
301
|
+
- Check `status` field in response
|
|
302
|
+
- Extract `imageUrl` when status is `completed`
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Rate Limits
|
|
307
|
+
|
|
308
|
+
Rate limits vary by model and subscription tier. Monitor response headers and implement exponential backoff on 429 errors.
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Output Formats
|
|
313
|
+
|
|
314
|
+
All models support PNG and JPEG output formats. Specify via `output_format` parameter where supported.
|
|
315
|
+
|
|
316
|
+
**Default Formats**:
|
|
317
|
+
- Most models: PNG
|
|
318
|
+
- Flux Kontext: Configurable (PNG/JPEG)
|
|
319
|
+
- Nano Banana: Configurable (PNG/JPEG)
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Examples
|
|
324
|
+
|
|
325
|
+
### Basic Generation
|
|
326
|
+
```bash
|
|
327
|
+
curl -X POST https://api.kie.ai/api/v1/gpt4o-image/generate \
|
|
328
|
+
-H "X-API-KEY: your_key" \
|
|
329
|
+
-H "Content-Type: application/json" \
|
|
330
|
+
-d '{"prompt": "sunset over mountains"}'
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Poll Status
|
|
334
|
+
```bash
|
|
335
|
+
curl https://api.kie.ai/api/v1/gpt4o-image/record-info?taskId=abc123 \
|
|
336
|
+
-H "X-API-KEY: your_key"
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### With Parameters
|
|
340
|
+
```bash
|
|
341
|
+
curl -X POST https://api.kie.ai/api/v1/ideogram/v3-text-to-image \
|
|
342
|
+
-H "X-API-KEY: your_key" \
|
|
343
|
+
-H "Content-Type: application/json" \
|
|
344
|
+
-d '{
|
|
345
|
+
"prompt": "modern logo design",
|
|
346
|
+
"rendering_speed": "QUALITY",
|
|
347
|
+
"style": "DESIGN",
|
|
348
|
+
"num_images": 2
|
|
349
|
+
}'
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## Additional Resources
|
|
355
|
+
|
|
356
|
+
- Official Documentation: https://docs.kie.ai
|
|
357
|
+
- Model Comparisons: https://kie.ai/features
|
|
358
|
+
- API Status: https://status.kie.ai
|