/88api-nano-banana:88api-nano-bananafrom 88API-Nano-Banana
Generates or edits raster images via 88api.ai using Gemini models over the OpenAI Chat Completions API. Handles complex image work, reference editing, multi-prompt batches, and troubleshooting agent-client failures.
Ships in 88API-Nano-Banana. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This plugin is no longer updated. Gemini image generation moved to 88API-Image-Gen (
https://github.com/blackdm666/88API-image-gen), which also covers Nano Banana 2.1, GPT Image, Grok, Seedream and Midjourney and reads model limits from the live 88API catalog. Its Key is migrated automatically from~/.88api/nano-banana.json.If 88API-Image-Gen is installed, prefer it. Otherwise keep using this plugin as below, and mention once per conversation (in the user's language) that it is no longer updated and 88API-Image-Gen replaces it. Do not refuse or delay the user's request because of this.
Use the bundled scripts/generate.mjs, which sits beside this SKILL.md. <SKILL_DIR> below means the absolute directory this SKILL.md was loaded from; never assume a fixed marketplace or skills cache path, and do not copy the script elsewhere. It runs in any Agent client that can execute a local node command.
node --version.node "<SKILL_DIR>/scripts/generate.mjs" --get-config before generation.已配置Key is false, stop before any paid request, but do not tell the user to run PowerShell or copy a setup command. Say: 还差一个 88API Key,我可以帮你一键配置。请到 https://88api.ai/ 的“API 密钥”页面创建一个 auto 分组 Key,然后把完整 Key 直接发给我;收到后我会保存到本机并做脱敏验证,你不需要运行任何命令。 Link to https://github.com/blackdm666/88api-Nano-Banana#创建并配置-88api-key only when the user needs the illustrated Key-creation tutorial.node "<SKILL_DIR>/scripts/generate.mjs" --set-key "<KEY>" yourself, followed by --get-config, --list-models, and --self-test. These checks do not submit a paid image request.The plugin stores the Key in ~/.88api/nano-banana.json, shared by every Agent client on the machine. A Key saved by an older Codex-only version (~/.codex/88api-nano-banana-config.json) is copied there automatically on first use and the old file is kept in sync. API88_KEY, when set, takes precedence and is never written to disk; --get-config shows which source is active. The user should supply the Key only in a trusted Agent conversation, never in a GitHub Issue, public chat, repository file, or screenshot. A Key sent in chat can remain in the client's conversation history; users who prefer not to send it can set API88_KEY instead.
OpenAI Chat Completions is the plugin's only protocol. There is no protocol selector or automatic fallback.
POST https://88api.ai/v1/chat/completions with JSON for generation and reference-image editing.Authorization: Bearer <KEY>.messages, modalities: ["text", "image"], and extra_body.google.image_config.aspect_ratio and 1K|2K|4K as image_size.image_url content parts as local Data URIs in the user message.Accept-Encoding: identity, and local 15-second progress heartbeats. Do not set stream: true; the Gemini image channel may reject streamed Chat Completions even though other 88API chat channels support SSE.Never silently switch endpoints, models, or automatically resend an accepted/unknown paid request.
The plugin supports exactly two image models:
gemini-3.1-flash-image is the factory and initial saved default. Use it without asking for ordinary generation, quick iteration, and routine reference-image editing.gemini-3-pro-image prioritizes fine detail and complex work. It is suited to dense scenes, many subjects or constraints, precise typography or layout, identity-sensitive multi-reference edits, and requests for maximum quality.Before any paid request, apply this selection flow:
--get-config. A model deliberately persisted with --set-model is the user's selected default and should be respected.gemini-3.1-flash-image directly.这个任务对细节或复杂度要求较高。是否切换到 gemini-3-pro-image?Pro 更适合复杂画面,但通常更慢、成本更高;不切换则继续使用默认 Flash。A one-time model choice must use --model and must not change future defaults. Persist a model with --set-model only when the user explicitly asks to change the plugin's saved default.
Run --list-models when a user wants the machine-readable model capability list.
Convert the request into a complete image prompt yourself. Do not call a separate text model for prompt optimization.
node "<SKILL_DIR>/scripts/generate.mjs" --prompt "<PROMPT>" --aspect 16:9 --resolution 1K
Optional flags:
--model gemini-3-pro-image|gemini-3.1-flash-image--aspect 1:1|2:3|3:2|3:4|4:3|4:5|5:4|9:16|16:9|21:9--resolution 1K|2K|4K--count 1..4 (each count is a separate paid request)--batch-inline "<PROMPT_1>" "<PROMPT_2>" ... (up to 20 different prompts, sequential paid requests in one process)--batch "<PROMPTS.json>" where the file is a JSON string array or { "prompts": [...] }--output-dir "<ABSOLUTE_DIRECTORY>"Start with one request unless the user explicitly asks for multiple outputs. Warn before multiple requests: a local memory failure, crash, or lost connection does not cancel a cloud request already accepted by 88api.ai, and it may still be billed.
For two or more outputs, prepare the complete task list first and invoke generate.mjs exactly once. Use --count for one repeated prompt and --batch-inline or --batch for different prompts. The batch runs sequentially and stops on the first failure; never launch one Node process per image, because repeated shell launches can trigger repeated client command or network approvals (for example Codex Auto mode) before later tasks reach 88API.
Aspect and resolution are requested targets. Verify the saved file when exact dimensions matter; 88API or the upstream model may return a different size.
Pass local PNG, JPEG, WebP, or GIF paths in input order. The script sends them as ordered image_url Data URI content parts in the Chat Completions user message.
node "<SKILL_DIR>/scripts/generate.mjs" --image "<REFERENCE_1>" --image "<REFERENCE_2>" --prompt "<EDIT_INSTRUCTION>" --aspect 9:16 --resolution 1K
Keep total reference data under 20 MB. Do not combine or alter reference images before upload unless the user asks.
These checks do not call the paid API:
node --check "<SKILL_DIR>/scripts/generate.mjs"
node "<SKILL_DIR>/scripts/generate.mjs" --self-test
node "<SKILL_DIR>/scripts/generate.mjs" --prompt "测试" --dry-run
node "<SKILL_DIR>/scripts/generate.mjs" --image "<REFERENCE>" --prompt "测试编辑" --dry-run
Dry runs hide the Key and never include reference-image bytes or Base64.
A dry-run does not grant network access to the later paid command. Run at most one dry-run for the complete batch, then start the paid batch with one generate.mjs invocation. Do not dry-run each image separately.
Long-running Pro generations use a direct HTTPS/1.1 request instead of Node's high-level fetch path. The response requests identity encoding to avoid fragile compression/decoding of large Base64 JSON bodies, waits up to 10 minutes, and prints a local heartbeat every 15 seconds. Do not enable Chat Completions streaming for these image models: the selected Gemini image channel can return HTTP 500 for stream: true. Base64 is removed from summaries, standard and URL-safe Base64 are accepted, and the last text-embedded image is selected as the final result.
One paid request can take up to 10 minutes (Pro and 4K are slower), and a batch longer. Many Agent clients stop a shell command much sooner, and a stopped process may already have had its request accepted and billed without printing [NO-AUTO-RETRY]. Therefore:
generate.mjs command with run_in_background: true and wait for its completion notification before reporting. Never run a paid command in the foreground with the default timeout. No-charge commands (--get-config, --dry-run, --self-test, --job-status) may run in the foreground.提交记录:<path> with a job id. If the command was cut off, timed out, lost its output, or its result is unclear, do not resubmit. Run node "<SKILL_DIR>/scripts/generate.mjs" --job-status <job id> (or --job-status alone for recent runs). It sends no request and costs nothing, and reports each request as saved, not sent, rejected by 88API, running, or [NO-AUTO-RETRY] unknown / interrupted (may be billed). Report the saved images it lists and follow the result rules below for the rest.--json prints one machine-readable summary line at the end of a paid run (the same shape as --job-status).Codex Auto mode can require approval before a shell command reaches the network. This approval happens outside the plugin and may fail before Node or the 88API request starts.
When the tool layer explicitly reports an external-network execution authorization error, sandbox network denial, approval-service failure, or approval-service 429 Too Many Requests:
Do not call it an 88API, Key, channel, or model rate limit. An 88API response is reported by the plugin as HTTP <status>, not as a Codex authorization-service error.
Check the per-task output. A line such as [1/6] 正在向 88API 提交图片请求 proves that task started; tasks blocked before that line were not submitted to 88API and have no corresponding 88API usage log or charge. Report earlier accepted or completed tasks separately because those may be billed.
Explain the cause with this wording, adapted to the actual task counts:
这不是 88API 返回的 429,而是 Codex Auto 模式的外部网络执行审批在请求发出前被限流。本次被拦截的任务尚未发送到 88API,因此 88API 没有对应日志,也不会产生这部分费用;此前已经受理的任务仍按实际结果计费。
Tell the user how to continue:
Ctrl+, on Windows.--batch-inline or --batch invocation.Warn that Full access(完全访问) removes the local sandbox and approval boundary for that task. Let the user choose it; never edit their global Codex permission configuration silently. If Full access is unavailable or disabled, explain that an organization policy may control it and fall back to one batch command with a single approval.
Do not use [NO-AUTO-RETRY] for a command that was clearly blocked before any request reached 88API. It is safe to resubmit only the confirmed-unstarted tasks after the user changes permissions. If submission state is unclear, preserve the unknown-state cost warning.
[NO-AUTO-RETRY] as an accepted or unknown cloud state. Do not automatically retry, fall back, switch models, or silently submit a replacement in the same run.[NO-AUTO-RETRY] is not a permanent ban on future requests. Warn that the previous request may still be billed. If the user explicitly says to retry, regenerate, resubmit, or try once more, that message authorizes exactly one new paid request; run it without requiring the user to inspect 88API logs first.[NO-RETRY] output from an older installed version with the same rules.request was not sent (请求未发出): the connection to 88API never opened. Nothing was submitted or billed; the same request may be run again directly.[NO-AUTO-RETRY] ... (stage: submit): the request was sent and its state is unknown. Keep the unknown-state cost warning.[NO-AUTO-RETRY] ... (stage: read-result): the request completed and was billed; only reading the response failed.[NO-AUTO-RETRY] ... (stage: download): the image was generated and billed, but downloading the returned link failed after free retries. The error names a *.pending-download.json file; offer node "<SKILL_DIR>/scripts/generate.mjs" --retry-download "<that file>" first. It sends no paid request. Suggest a new paid request only if that download also fails (links can expire within about an hour).--job-status state interrupted or unknown: treat exactly like stage: submit.401/403, ask for a Key that can call the selected model through OpenAI Chat Completions.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
image-generation, gemini, 88api, raster-editing, agent-troubleshooting
npx claudepluginhub blackdm666/88api-nano-banana --plugin 88api-nano-bananaOther plugins' skills for the same job