ginskill-init 1.0.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.
Files changed (92) hide show
  1. package/README.md +77 -0
  2. package/agents/developer.md +56 -0
  3. package/agents/frontend-design.md +69 -0
  4. package/agents/mobile-reviewer.md +36 -0
  5. package/agents/review-code.md +49 -0
  6. package/agents/security-scanner.md +50 -0
  7. package/agents/tester.md +72 -0
  8. package/bin/cli.js +226 -0
  9. package/package.json +20 -0
  10. package/skills/ai-asset-generator/SKILL.md +255 -0
  11. package/skills/ai-asset-generator/docs/gen-image.md +274 -0
  12. package/skills/ai-asset-generator/docs/genvideo.md +341 -0
  13. package/skills/ai-asset-generator/docs/remove-background.md +19 -0
  14. package/skills/ai-asset-generator/generate-credit-assets.mjs +180 -0
  15. package/skills/ai-asset-generator/generate-ginbrowser-assets.mjs +242 -0
  16. package/skills/ai-asset-generator/generate-sty-icon.mjs +149 -0
  17. package/skills/ai-asset-generator/lib/bg-remove.mjs +34 -0
  18. package/skills/ai-asset-generator/lib/env.mjs +38 -0
  19. package/skills/ai-asset-generator/lib/kie-client.mjs +88 -0
  20. package/skills/ai-asset-generator/scripts/scaffold-generator.mjs +203 -0
  21. package/skills/ai-build-ai/SKILL.md +124 -0
  22. package/skills/ai-build-ai/docs/agent-teams.md +293 -0
  23. package/skills/ai-build-ai/docs/checkpointing.md +161 -0
  24. package/skills/ai-build-ai/docs/create-agent.md +399 -0
  25. package/skills/ai-build-ai/docs/create-mcp.md +395 -0
  26. package/skills/ai-build-ai/docs/create-skill.md +299 -0
  27. package/skills/ai-build-ai/docs/headless-mode.md +614 -0
  28. package/skills/ai-build-ai/docs/hooks.md +578 -0
  29. package/skills/ai-build-ai/docs/memory-claude-md.md +375 -0
  30. package/skills/ai-build-ai/docs/output-styles.md +208 -0
  31. package/skills/ai-build-ai/docs/overview.md +162 -0
  32. package/skills/ai-build-ai/docs/permissions.md +391 -0
  33. package/skills/ai-build-ai/docs/plugins.md +396 -0
  34. package/skills/ai-build-ai/docs/sandbox.md +262 -0
  35. package/skills/ai-build-ai/scripts/load-tutorial.sh +54 -0
  36. package/skills/icon-generator/SKILL.md +270 -0
  37. package/skills/mobile-app-review/SKILL.md +321 -0
  38. package/skills/mobile-app-review/references/apple-review.md +132 -0
  39. package/skills/mobile-app-review/references/google-play-review.md +203 -0
  40. package/skills/mongodb/SKILL.md +667 -0
  41. package/skills/mongodb/references/mongoose-patterns.md +368 -0
  42. package/skills/nestjs-architecture/SKILL.md +1086 -0
  43. package/skills/nestjs-architecture/references/advanced-patterns.md +590 -0
  44. package/skills/performance/SKILL.md +509 -0
  45. package/skills/react-fsd-architecture/SKILL.md +693 -0
  46. package/skills/react-fsd-architecture/references/fsd-patterns.md +747 -0
  47. package/skills/react-query/SKILL.md +685 -0
  48. package/skills/react-query/references/query-patterns.md +365 -0
  49. package/skills/review-code/SKILL.md +321 -0
  50. package/skills/review-code/references/clean-code-principles.md +395 -0
  51. package/skills/review-code/references/frontend-patterns.md +136 -0
  52. package/skills/review-code/references/nestjs-patterns.md +184 -0
  53. package/skills/review-code/scripts/check-module.sh +201 -0
  54. package/skills/review-code/scripts/deep-scan.sh +604 -0
  55. package/skills/review-code/scripts/dep-check.sh +522 -0
  56. package/skills/review-code/scripts/detect-duplicates.sh +466 -0
  57. package/skills/review-code/scripts/format-check.sh +577 -0
  58. package/skills/review-code/scripts/run-review.sh +167 -0
  59. package/skills/review-code/scripts/scan-codebase.sh +152 -0
  60. package/skills/security-scanner/SKILL.md +327 -0
  61. package/skills/security-scanner/references/nestjs-security.md +260 -0
  62. package/skills/security-scanner/references/nextjs-security.md +201 -0
  63. package/skills/security-scanner/references/react-native-security.md +199 -0
  64. package/skills/security-scanner/scripts/security-scan.sh +478 -0
  65. package/skills/ui-ux-pro-max/SKILL.md +377 -0
  66. package/skills/ui-ux-pro-max/data/charts.csv +26 -0
  67. package/skills/ui-ux-pro-max/data/colors.csv +97 -0
  68. package/skills/ui-ux-pro-max/data/icons.csv +101 -0
  69. package/skills/ui-ux-pro-max/data/landing.csv +31 -0
  70. package/skills/ui-ux-pro-max/data/products.csv +97 -0
  71. package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  72. package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  73. package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  74. package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  75. package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  76. package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  77. package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  78. package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  79. package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  80. package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  81. package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  82. package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  83. package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  84. package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  85. package/skills/ui-ux-pro-max/data/styles.csv +68 -0
  86. package/skills/ui-ux-pro-max/data/typography.csv +58 -0
  87. package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  88. package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  89. package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  90. package/skills/ui-ux-pro-max/scripts/core.py +253 -0
  91. package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  92. package/skills/ui-ux-pro-max/scripts/search.py +114 -0
@@ -0,0 +1,255 @@
1
+ ---
2
+ name: ai-asset-generator
3
+ description: |
4
+ **AI Asset Generator**: Generate production-ready images, icons, videos, and visual assets using KIE AI and background removal APIs. Handles text-to-image, image-to-image, image-to-video, background removal, and multi-size icon generation.
5
+ - MANDATORY TRIGGERS: generate asset, generate image, create icon, generate illustration, create hero image, generate banner, app icon, brand assets, AI image, generate visual, asset pipeline, remove background, generate video, KIE AI, create artwork, generate graphics, app assets, mobile assets, feature illustration
6
+ - Use this skill whenever the user wants to create, generate, or produce any visual asset for their project. Also trigger when discussing image generation pipelines, brand asset creation, or background removal workflows, even if the user just says "make me an image" or "I need graphics for this feature".
7
+ ---
8
+
9
+ # AI Asset Generator
10
+
11
+ Generate production-ready visual assets using the KIE AI image/video generation API and background removal APIs. This skill knows the API patterns, prompt engineering techniques, and output pipelines for asset generation.
12
+
13
+ ## How It Works
14
+
15
+ The asset generation pipeline follows these phases:
16
+
17
+ 1. **Define** — Describe what assets are needed (dimensions, style, brand colors)
18
+ 2. **Generate** — Submit tasks to KIE AI API (`nano-banana-pro` model for images, `bytedance/v1-pro-image-to-video` for video)
19
+ 3. **Post-process** — Background removal, resizing, format conversion (WebP)
20
+ 4. **Deliver** — Save to the appropriate project directory
21
+
22
+ All scripts and libraries are in `skills/ai-asset-generator/`. The shared client library handles API communication, polling, and downloads.
23
+
24
+ ## Quick Start
25
+
26
+ To generate assets, you need:
27
+ 1. A `KIE_AI_API_KEY` in the `.env` file at `skills/ai-asset-generator/.env`
28
+ 2. Node.js 18+ (uses native `fetch`)
29
+
30
+ Run an existing generator:
31
+ ```bash
32
+ cd skills/ai-asset-generator
33
+ node generate-credit-assets.mjs
34
+ ```
35
+
36
+ Or create a new generation script following the patterns below.
37
+
38
+ ## Brand Guidelines
39
+
40
+ Define your project's brand guidelines before generating assets. Example structure:
41
+
42
+ ### Primary Brand
43
+ - Primary Color: `#EC4899` (specify your brand's primary hex)
44
+ - Gradient: Define your brand gradient stops
45
+ - Accent colors for highlight/sparkle effects
46
+ - Aesthetic keywords: e.g., "Premium, minimalist, clean"
47
+
48
+ ### Secondary Brand / Sub-products
49
+ - Define separate color palettes for sub-products if applicable
50
+ - Keep consistent aesthetic language across products
51
+
52
+ ### Common Accent Colors
53
+ - Blue `#3B82F6`, Green `#22C55E`, Purple `#8B5CF6`, Amber `#F59E0B`
54
+
55
+ ## API Reference
56
+
57
+ Read the full API docs in the `docs/` directory when you need exact parameter details:
58
+
59
+ - `docs/gen-image.md` — KIE AI image generation (text-to-image, image-to-image)
60
+ - `docs/genvideo.md` — KIE AI video generation (image-to-video via ByteDance model)
61
+ - `docs/remove-background.md` — Background removal API
62
+
63
+ ### Image Generation (KIE AI)
64
+
65
+ **Endpoint:** `POST https://api.kie.ai/api/v1/jobs/createTask`
66
+
67
+ Key parameters:
68
+ - `model`: `"nano-banana-pro"` (primary image model)
69
+ - `input.prompt`: Detailed description (max 20,000 chars). Be very specific about colors using hex codes, composition, lighting, and what to exclude.
70
+ - `input.aspect_ratio`: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`, `auto`
71
+ - `input.resolution`: `1K`, `2K`, `4K`
72
+ - `input.output_format`: `png` or `jpg`
73
+ - `input.image_input`: Array of up to 8 image URLs for image-to-image transforms
74
+
75
+ **Polling:** `GET https://api.kie.ai/api/v1/jobs/recordInfo?taskId=<id>`
76
+ - States: `waiting` → `queuing` → `generating` → `success` | `fail`
77
+ - Use exponential backoff: start at 5s, multiply by 1.5, cap at 30s
78
+ - Timeout: 300s for images, 600s for video
79
+
80
+ ### Video Generation (ByteDance via KIE AI)
81
+
82
+ Same endpoint, different model:
83
+ - `model`: `"bytedance/v1-pro-image-to-video"`
84
+ - `input.image_url`: Source image URL (required)
85
+ - `input.prompt`: Motion/camera description
86
+ - `input.resolution`: `480p`, `720p`, `1080p`
87
+ - `input.duration`: `"5"` or `"10"` (seconds)
88
+ - `input.camera_fixed`: `true`/`false`
89
+
90
+ ### Background Removal
91
+
92
+ Configure your background removal endpoint in the `lib/bg-remove.mjs` library. Common options:
93
+ - Self-hosted or third-party background removal API
94
+ - Multipart form: `file` (image blob), `cropToForeground` (`true`/`false`), `outputFormat` (`png`)
95
+ - Auth: API key header
96
+ - Returns: Processed image (base64 or binary)
97
+
98
+ ## Writing Generation Scripts
99
+
100
+ When creating a new asset generator script, follow the established pattern:
101
+
102
+ ### Script Structure
103
+
104
+ ```javascript
105
+ #!/usr/bin/env node
106
+
107
+ /**
108
+ * [Feature Name] Asset Generator
109
+ *
110
+ * Purpose: [what it generates]
111
+ * Brand: [relevant brand colors]
112
+ *
113
+ * Assets:
114
+ * 1. [filename] - [description]
115
+ * 2. [filename] - [description]
116
+ */
117
+
118
+ import { join, dirname } from "path";
119
+ import { fileURLToPath } from "url";
120
+ import { loadEnv } from "./lib/env.mjs";
121
+ import { createTask, pollUntilDone, downloadFile, log } from "./lib/kie-client.mjs";
122
+ import { removeBackground } from "./lib/bg-remove.mjs";
123
+
124
+ const __dirname = dirname(fileURLToPath(import.meta.url));
125
+ const OUTPUT_DIR = join(__dirname, "<target-output-directory>");
126
+
127
+ // Define assets as a declarative array
128
+ const IMAGE_ASSETS = [
129
+ {
130
+ name: "asset-name",
131
+ filename: "asset-name.png",
132
+ aspect_ratio: "16:9", // or 1:1, 9:16, etc.
133
+ resolution: "2K", // 1K, 2K, or 4K
134
+ removeBg: false, // true to run background removal after
135
+ prompt: [
136
+ // Break prompt into logical lines for readability
137
+ "Main subject description with specific hex colors.",
138
+ "Composition and layout details.",
139
+ "Lighting and atmosphere.",
140
+ "Style reference (photorealistic, 3D render, illustration, etc.).",
141
+ "Exclusions: No text, no typography, no logos, no people, no watermarks.",
142
+ ].join(" "),
143
+ },
144
+ ];
145
+
146
+ async function main() {
147
+ await loadEnv();
148
+ if (!process.env.KIE_AI_API_KEY) {
149
+ console.error("Error: KIE_AI_API_KEY not found. Check .env");
150
+ process.exit(1);
151
+ }
152
+
153
+ // Phase 1: Submit all tasks in parallel
154
+ const jobs = await Promise.all(
155
+ IMAGE_ASSETS.map(async (asset) => {
156
+ const taskId = await createTask({
157
+ model: "nano-banana-pro",
158
+ input: {
159
+ prompt: asset.prompt,
160
+ aspect_ratio: asset.aspect_ratio,
161
+ resolution: asset.resolution,
162
+ output_format: "png",
163
+ },
164
+ });
165
+ return { ...asset, taskId };
166
+ })
167
+ );
168
+
169
+ // Phase 2: Poll all tasks in parallel
170
+ const results = await Promise.all(
171
+ jobs.map(async (job) => {
172
+ const url = await pollUntilDone(job.taskId, job.name);
173
+ return { ...job, resultUrl: url };
174
+ })
175
+ );
176
+
177
+ // Phase 3: Download
178
+ for (const r of results) {
179
+ await downloadFile(r.resultUrl, join(OUTPUT_DIR, r.filename));
180
+ }
181
+
182
+ // Phase 4: Background removal (where needed)
183
+ for (const r of results.filter(r => r.removeBg)) {
184
+ try {
185
+ const src = join(OUTPUT_DIR, r.filename);
186
+ const dest = join(OUTPUT_DIR, r.filename.replace(".png", "-nobg.png"));
187
+ await removeBackground(src, dest);
188
+ } catch (err) {
189
+ log(` [warn] BG removal failed for ${r.name}: ${err.message}`);
190
+ }
191
+ }
192
+ }
193
+
194
+ main().catch((err) => {
195
+ console.error(`Fatal: ${err.message}`);
196
+ process.exit(1);
197
+ });
198
+ ```
199
+
200
+ ### Prompt Engineering Tips
201
+
202
+ The KIE AI model responds well to these patterns:
203
+
204
+ 1. **Be explicit about colors** — Always include hex codes: "rose-gold (#EC4899)" not just "pink"
205
+ 2. **Specify what to exclude** — Always end with: "No text, no typography, no logos, no people, no watermarks."
206
+ 3. **Use photography/cinema terminology** — "three-point lighting", "soft bokeh", "shallow depth of field", "studio lighting"
207
+ 4. **State the render style** — "Photorealistic 3D render", "flat illustration", "watercolor style"
208
+ 5. **Describe composition** — "centered on pure white background", "left-aligned with negative space on right"
209
+ 6. **Keep prompts focused** — One clear concept per asset. Multi-concept prompts produce confused results.
210
+
211
+ ### Multi-Size Icon Pipeline
212
+
213
+ For app icons that need multiple sizes (common for mobile), follow the pattern in `generate-sty-icon.mjs`:
214
+
215
+ 1. Generate one high-res master image (1K, 1:1)
216
+ 2. Remove background
217
+ 3. Resize using `ffmpeg` (if available) or Sharp:
218
+ - `@1x` = 24px
219
+ - `@2x` = 48px
220
+ - `@3x` = 72px
221
+ - `hero` = 160px
222
+ 4. Convert to WebP for lightweight mobile loading
223
+
224
+ ```bash
225
+ ffmpeg -i input.png -vf scale=48:48 -y output@2x.png
226
+ ffmpeg -i input.png -vf scale=48:48 -y output@2x.webp
227
+ ```
228
+
229
+ ## Shared Libraries
230
+
231
+ All in `lib/`:
232
+
233
+ | File | Exports | Purpose |
234
+ |------|---------|---------|
235
+ | `kie-client.mjs` | `createTask`, `queryTask`, `pollUntilDone`, `downloadFile`, `sleep`, `log` | KIE AI API client with exponential backoff polling |
236
+ | `bg-remove.mjs` | `removeBackground(inputPath, outputPath)` | Background removal API client |
237
+ | `env.mjs` | `loadEnv()` | Loads `.env` and `.env.local` files |
238
+
239
+ ## Output Destinations
240
+
241
+ Assets are saved to project directories. Adapt these to your repo structure:
242
+
243
+ - **Mobile app assets:** `<mobile-dir>/src/assets/images/<feature>/`
244
+ - **Web UI assets:** `<frontend-dir>/public/images/<feature>/`
245
+ - **Temporary/review:** `skills/ai-asset-generator/output/`
246
+
247
+ ## Existing Generator Scripts
248
+
249
+ Check the `skills/ai-asset-generator/` directory for existing generator scripts. They demonstrate the established patterns for:
250
+ - Hero images and feature illustrations
251
+ - Multi-size icon generation with WebP conversion
252
+ - Video generation from static images
253
+ - Background removal pipelines
254
+
255
+ Read these scripts as reference when creating new generators.
@@ -0,0 +1,274 @@
1
+ POST
2
+ /api/v1/jobs/createTask
3
+ Create Task
4
+ Create a new generation task
5
+
6
+ Request Parameters
7
+ The API accepts a JSON payload with the following structure:
8
+
9
+ Request Body Structure
10
+ {
11
+ "model": "string",
12
+ "callBackUrl": "string (optional)",
13
+ "input": {
14
+ // Input parameters based on form configuration
15
+ }
16
+ }
17
+ Root Level Parameters
18
+ model
19
+ Required
20
+ string
21
+ The model name to use for generation
22
+
23
+ Example:
24
+
25
+ "nano-banana-pro"
26
+ callBackUrl
27
+ Optional
28
+ string
29
+ Callback URL for task completion notifications. Optional parameter. If provided, the system will send POST requests to this URL when the task completes (success or failure). If not provided, no callback notifications will be sent.
30
+
31
+ Example:
32
+
33
+ "https://your-domain.com/api/callback"
34
+ Input Object Parameters
35
+ The input object contains the following parameters based on the form configuration:
36
+
37
+ input.prompt
38
+ Required
39
+ string
40
+ A text description of the image you want to generate
41
+
42
+ Max length: 20000 characters
43
+ Example:
44
+
45
+ "Comic poster: cool banana hero in shades leaps from sci-fi pad. Six panels: 1) 4K mountain landscape, 2) banana holds page of long multilingual text with auto translation, 3) Gemini 3 hologram for search/knowledge/reasoning, 4) camera UI sliders for angle focus color, 5) frame trio 1:1-9:16, 6) consistent banana poses. Footer shows Google icons. Tagline: Nano Banana Pro now on Kie AI."
46
+ input.image_input
47
+ Optional
48
+ array(URL)
49
+ Input images to transform or use as reference (supports up to 8 images)
50
+
51
+ Please provide the URL of the uploaded file; Accepted types: image/jpeg, image/png, image/webp; Max size: 30.0MB
52
+ input.aspect_ratio
53
+ Optional
54
+ string
55
+ Aspect ratio of the generated image
56
+
57
+ Available options:
58
+
59
+ 1:1
60
+ -
61
+ 1:1
62
+ 2:3
63
+ -
64
+ 2:3
65
+ 3:2
66
+ -
67
+ 3:2
68
+ 3:4
69
+ -
70
+ 3:4
71
+ 4:3
72
+ -
73
+ 4:3
74
+ 4:5
75
+ -
76
+ 4:5
77
+ 5:4
78
+ -
79
+ 5:4
80
+ 9:16
81
+ -
82
+ 9:16
83
+ 16:9
84
+ -
85
+ 16:9
86
+ 21:9
87
+ -
88
+ 21:9
89
+ auto
90
+ -
91
+ Auto
92
+ Example:
93
+
94
+ "1:1"
95
+ input.resolution
96
+ Optional
97
+ string
98
+ Resolution of the generated image
99
+
100
+ Available options:
101
+
102
+ 1K
103
+ -
104
+ 1K
105
+ 2K
106
+ -
107
+ 2K
108
+ 4K
109
+ -
110
+ 4K
111
+ Example:
112
+
113
+ "1K"
114
+ input.output_format
115
+ Optional
116
+ string
117
+ Format of the output image
118
+
119
+ Available options:
120
+
121
+ png
122
+ -
123
+ PNG
124
+ jpg
125
+ -
126
+ JPG
127
+ Example:
128
+
129
+ "png"
130
+ Request Example
131
+
132
+ cURL
133
+
134
+ JavaScript
135
+
136
+ Python
137
+ curl -X POST "https://api.kie.ai/api/v1/jobs/createTask" \
138
+ -H "Content-Type: application/json" \
139
+ -H "Authorization: Bearer YOUR_API_KEY" \
140
+ -d '{
141
+ "model": "nano-banana-pro",
142
+ "callBackUrl": "https://your-domain.com/api/callback",
143
+ "input": {
144
+ "prompt": "Comic poster: cool banana hero in shades leaps from sci-fi pad. Six panels: 1) 4K mountain landscape, 2) banana holds page of long multilingual text with auto translation, 3) Gemini 3 hologram for search/knowledge/reasoning, 4) camera UI sliders for angle focus color, 5) frame trio 1:1-9:16, 6) consistent banana poses. Footer shows Google icons. Tagline: Nano Banana Pro now on Kie AI.",
145
+ "aspect_ratio": "1:1",
146
+ "resolution": "1K",
147
+ "output_format": "png"
148
+ }
149
+ }'
150
+ Response Example
151
+ {
152
+ "code": 200,
153
+ "message": "success",
154
+ "data": {
155
+ "taskId": "task_12345678"
156
+ }
157
+ }
158
+ Response Fields
159
+ code
160
+ Status code, 200 for success, others for failure
161
+ message
162
+ Response message, error description when failed
163
+ data.taskId
164
+ Task ID for querying task status
165
+ Callback Notifications
166
+ When you provide the callBackUrl parameter when creating a task, the system will send POST requests to the specified URL upon task completion (success or failure).
167
+
168
+ Success Callback Example
169
+ {
170
+ "code": 200,
171
+ "data": {
172
+ "completeTime": 1755599644000,
173
+ "costTime": 8,
174
+ "createTime": 1755599634000,
175
+ "model": "nano-banana-pro",
176
+ "param": "{\"callBackUrl\":\"https://your-domain.com/api/callback\",\"model\":\"nano-banana-pro\",\"input\":{\"prompt\":\"Comic poster: cool banana hero in shades leaps from sci-fi pad. Six panels: 1) 4K mountain landscape, 2) banana holds page of long multilingual text with auto translation, 3) Gemini 3 hologram for search/knowledge/reasoning, 4) camera UI sliders for angle focus color, 5) frame trio 1:1-9:16, 6) consistent banana poses. Footer shows Google icons. Tagline: Nano Banana Pro now on Kie AI.\",\"image_input\":[],\"aspect_ratio\":\"1:1\",\"resolution\":\"1K\",\"output_format\":\"png\"}}",
177
+ "resultJson": "{\"resultUrls\":[\"https://example.com/generated-image.jpg\"]}",
178
+ "state": "success",
179
+ "taskId": "e989621f54392584b05867f87b160672",
180
+ "failCode": null,
181
+ "failMsg": null,
182
+ },
183
+ "msg": "Playground task completed successfully."
184
+ }
185
+ Failure Callback Example
186
+ {
187
+ "code": 501,
188
+ "data": {
189
+ "completeTime": 1755597081000,
190
+ "costTime": 0,
191
+ "createTime": 1755596341000,
192
+ "failCode": "500",
193
+ "failMsg": "Internal server error",
194
+ "model": "nano-banana-pro",
195
+ "param": "{\"callBackUrl\":\"https://your-domain.com/api/callback\",\"model\":\"nano-banana-pro\",\"input\":{\"prompt\":\"Comic poster: cool banana hero in shades leaps from sci-fi pad. Six panels: 1) 4K mountain landscape, 2) banana holds page of long multilingual text with auto translation, 3) Gemini 3 hologram for search/knowledge/reasoning, 4) camera UI sliders for angle focus color, 5) frame trio 1:1-9:16, 6) consistent banana poses. Footer shows Google icons. Tagline: Nano Banana Pro now on Kie AI.\",\"image_input\":[],\"aspect_ratio\":\"1:1\",\"resolution\":\"1K\",\"output_format\":\"png\"}}",
196
+ "state": "fail",
197
+ "taskId": "bd3a37c523149e4adf45a3ddb5faf1a8",
198
+ "resultJson": null,
199
+ },
200
+ "msg": "Playground task failed."
201
+ }
202
+ Important Notes
203
+ The callback content structure is identical to the Query Task API response
204
+ The param field contains the complete Create Task request parameters, not just the input section
205
+ If callBackUrl is not provided, no callback notifications will be sent
206
+
207
+
208
+ GET
209
+ /api/v1/jobs/recordInfo
210
+ Query Task
211
+ Query task status and results by task ID
212
+
213
+ Request Example
214
+
215
+ cURL
216
+
217
+ JavaScript
218
+
219
+ Python
220
+ curl -X GET "https://api.kie.ai/api/v1/jobs/recordInfo?taskId=task_12345678" \
221
+ -H "Authorization: Bearer YOUR_API_KEY"
222
+ Response Example
223
+ {
224
+ "code": 200,
225
+ "message": "success",
226
+ "data": {
227
+ "taskId": "task_12345678",
228
+ "model": "nano-banana-pro",
229
+ "state": "success",
230
+ "param": "{\"model\":\"nano-banana-pro\",\"callBackUrl\":\"https://your-domain.com/api/callback\",\"input\":{\"prompt\":\"Comic poster: cool banana hero in shades leaps from sci-fi pad. Six panels: 1) 4K mountain landscape, 2) banana holds page of long multilingual text with auto translation, 3) Gemini 3 hologram for search/knowledge/reasoning, 4) camera UI sliders for angle focus color, 5) frame trio 1:1-9:16, 6) consistent banana poses. Footer shows Google icons. Tagline: Nano Banana Pro now on Kie AI.\",\"image_input\":[],\"aspect_ratio\":\"1:1\",\"resolution\":\"1K\",\"output_format\":\"png\"}}",
231
+ "resultJson": "{\"resultUrls\":[\"https://example.com/generated-image.jpg\"]}",
232
+ "failCode": "",
233
+ "failMsg": "",
234
+ "costTime": 0,
235
+ "completeTime": 1698765432000,
236
+ "createTime": 1698765400000
237
+ }
238
+ }
239
+ Response Fields
240
+ code
241
+ Status code, 200 for success, others for failure
242
+ message
243
+ Response message, error description when failed
244
+ data.taskId
245
+ Task ID
246
+ data.model
247
+ Model used for generation
248
+ data.state
249
+ Generation state
250
+ data.param
251
+ Complete Create Task request parameters as JSON string (includes model, callBackUrl, input and all other parameters)
252
+ data.resultJson
253
+ Result JSON string containing generated media URLs
254
+ data.failCode
255
+ Error code (when generation failed)
256
+ data.failMsg
257
+ Error message (when generation failed)
258
+ data.completeTime
259
+ Completion timestamp
260
+ data.createTime
261
+ Creation timestamp
262
+ data.costTime
263
+ Cost time in milliseconds
264
+ State Values
265
+ waiting
266
+ Waiting for generation
267
+ queuing
268
+ In queue
269
+ generating
270
+ Generating
271
+ success
272
+ Generation successful
273
+ fail
274
+ Generation failed