OneKey Gateway
Use One Access Key to connect to various commercial APIs. Please visit the
OneKey Gateway Keys and read the docs
OneKey MCP Router Doc and
OneKey Gateway Doc.
gemini Skill
Use the OneKey Gateway to access tools for this server via a unified access key.
Quick Start
Set your OneKey access key:
export DEEPNLP_ONEKEY_ROUTER_ACCESS=YOUR_API_KEY
Common settings:
- -
unique_id: INLINECODE1 - INLINECODE2 : one of the tools listed below
Tools
generate_image_gemini
Generates an image using the Gemini Image API.
Supported Models (aliases are internal):
The model parameter allows selection between available image generation models.
- "gemini-2.5-flash-image" (recommended default for stable, fast response).
- "gemini-3-pro-image-preview".
- "gemini-3-flash"
Aliases for these models are 'nano-banana 2.5' and 'nano-banana 3 Pro' respectively.
Please use 'gemini-2.5-flash-image' unless the user specifically requests the Gemini 3 model.
Args:
model: The image generation model to use (see supported models above). Defaults to "gemini-2.5-flash-image". Supports: 'gemini-3-flash', 'gemini-3-pro-image-preview', 'gemini-2.5-flash-image'
prompt: A detailed text description for the image to be generated.
imagename: The filename for the output image, can be a relative path. Defaults to "geminioutput_images.png".
output_folder: The optional absolute folder path provided by the user where the image will be saved. Do not use default server locations.
aspect_ratio: The aspect ratio of the generated image (e.g., '16:9', '1:1', '4:3'). Defaults to '16:9'.
image_size: The size/resolution of the generated image (e.g., '1K', '2K', '4K'). Defaults to '1K'.
Return:
Dict: Result dictionary containing image path, message, and success status.
outputresult["imagepath"]: str
outputresult["imageurl"]: str
output_result["message"]: str
output_result["success"]: bool
Parameters:
- -
model (string, optional): - INLINECODE5 (string, optional):
- INLINECODE6 (string, optional):
- INLINECODE7 (object, optional):
- INLINECODE8 (string, optional):
- INLINECODE9 (string, optional):
generate_image_nano_banana
Generate Image With Nano Banana
Args:
model: The image generation model to use. Defaults to "gemini-2.5-flash-image". Supported Models such as follows Google Gemini Doc, such as 'gemini-3-flash', "gemini-3-pro-image-preview", "gemini-2.5-flash-image", note that nano-banana is the alias name of the Gemini Image Model. Nano banana 3 Pro refers to Gemini 3 pro preview, and Nono Banana 2.5 refers to Gemini 2.5. Unless specified by user to use Gemini 3 model preview, general 'Neno Banana' image models, please use 'gemini-2.5-flash-image' for more stable and fast response.
prompt: A detailed text description for the image to be generated.
imagename: The filename for the output image, can be a relative path, such as "./newgeminiimage.png", etc. Defaults to "geminioutput_images.png".
output_folder: The optional absolute folder path provided by the user where the image will be saved. Do not use default server locations.
aspect_ratio: The aspect ratio of the generated image (e.g., '16:9', '1:1', '4:3'), defaults to '16:9'.
image_size: The size/resolution of the generated image (e.g., '1K', '2K', '4K'), defaults to '1K'.
Return:
Dict: output_result is the result dict of MCP returned
outputresult["imagepath"] = full_path: str
outputresult["message"] = outputmessage: str
output_result["success"] = success: bool
Parameters:
- -
model (string, optional): - INLINECODE12 (string, optional):
- INLINECODE13 (string, optional):
- INLINECODE14 (object, optional):
- INLINECODE15 (string, optional):
- INLINECODE16 (string, optional):
Usage
CLI
generateimagegemini
CODEBLOCK1
generateimagenano_banana
CODEBLOCK2
generateimagenanobananawith_reference
CODEBLOCK3
ocrextracttextfromimage
CODEBLOCK4
listitemsfrom_image
CODEBLOCK5
Scripts
Each tool has a dedicated script in this folder:
- - INLINECODE17
- INLINECODE18
Example
CODEBLOCK6
Related DeepNLP OneKey Gateway Documents
AI Agent Marketplace
Skills Marketplace
AI Agent A2Z Deployment
PH AI Agent A2Z Infra
GitHub AI Agent Marketplace
Dependencies
CLI Dependency
Install onekey-gateway from npm
CODEBLOCK7
Script Dependency
Install the required Python package before running any scripts.
CODEBLOCK8
Alternatively, install dependencies from the requirements file:
CODEBLOCK9
If the package is already installed, skip installation.
Agent rule
Before executing command lines or running any script in the scripts/ directory, ensure the dependencies are installed.
Use the
onekey CLI as the preferred method to run the skills.
OneKey 网关
使用一个访问密钥连接各种商业 API。请访问
OneKey 网关密钥 页面,并阅读文档
OneKey MCP 路由器文档 和
OneKey 网关文档。
gemini 技能
通过统一访问密钥使用 OneKey 网关访问此服务器的工具。
快速开始
设置您的 OneKey 访问密钥:
bash
export DEEPNLP
ONEKEYROUTER
ACCESS=YOURAPI_KEY
常用设置:
- - uniqueid: gemini/gemini
- apiid: 下列工具之一
工具
generateimagegemini
使用 Gemini 图像 API 生成图像。
支持的模型(别名为内部使用):
模型参数允许在可用的图像生成模型之间进行选择。
- gemini-2.5-flash-image(推荐默认,稳定且响应快)。
- gemini-3-pro-image-preview。
- gemini-3-flash
这些模型的别名分别是 nano-banana 2.5 和 nano-banana 3 Pro。
除非用户特别要求使用 Gemini 3 模型,否则请使用 gemini-2.5-flash-image。
参数:
model: 要使用的图像生成模型(见上方支持的模型)。默认为 gemini-2.5-flash-image。支持:gemini-3-flash, gemini-3-pro-image-preview, gemini-2.5-flash-image
prompt: 要生成的图像的详细文本描述。
imagename: 输出图像的文件名,可以是相对路径。默认为 geminioutput_images.png。
output_folder: 用户提供的可选绝对文件夹路径,图像将保存于此。请勿使用默认服务器位置。
aspect_ratio: 生成图像的宽高比(例如 16:9, 1:1, 4:3)。默认为 16:9。
image_size: 生成图像的尺寸/分辨率(例如 1K, 2K, 4K)。默认为 1K。
返回:
Dict: 包含图像路径、消息和成功状态的结果字典。
outputresult[imagepath]: str
outputresult[imageurl]: str
output_result[message]: str
output_result[success]: bool
参数:
- - model (字符串,可选):
- prompt (字符串,可选):
- imagename (字符串,可选):
- outputfolder (对象,可选):
- aspectratio (字符串,可选):
- imagesize (字符串,可选):
generateimagenano_banana
使用 Nano Banana 生成图像
参数:
model: 要使用的图像生成模型。默认为 gemini-2.5-flash-image。支持的模型如 Google Gemini 文档所述,例如 gemini-3-flash, gemini-3-pro-image-preview, gemini-2.5-flash-image,注意 nano-banana 是 Gemini 图像模型的别名。Nano banana 3 Pro 指 Gemini 3 pro preview,Nono Banana 2.5 指 Gemini 2.5。除非用户指定使用 Gemini 3 模型预览,一般的 Neno Banana 图像模型,请使用 gemini-2.5-flash-image 以获得更稳定和快速的响应。
prompt: 要生成的图像的详细文本描述。
imagename: 输出图像的文件名,可以是相对路径,例如 ./newgeminiimage.png 等。默认为 geminioutput_images.png。
output_folder: 用户提供的可选绝对文件夹路径,图像将保存于此。请勿使用默认服务器位置。
aspect_ratio: 生成图像的宽高比(例如 16:9, 1:1, 4:3),默认为 16:9。
image_size: 生成图像的尺寸/分辨率(例如 1K, 2K, 4K),默认为 1K。
返回:
Dict: output_result 是 MCP 返回的结果字典
outputresult[imagepath] = full_path: str
outputresult[message] = outputmessage: str
output_result[success] = success: bool
参数:
- - model (字符串,可选):
- prompt (字符串,可选):
- imagename (字符串,可选):
- outputfolder (对象,可选):
- aspectratio (字符串,可选):
- imagesize (字符串,可选):
用法
命令行界面
generateimagegemini
shell
npx onekey agent gemini-nano-banana/gemini-nano-banana generate
imagegemini {model: gemini-2.5-flash-image, prompt: sunrise over mountains, aspect
ratio: 16:9, imagesize: 1K}
generateimagenano_banana
shell
npx onekey agent gemini-nano-banana/gemini-nano-banana generate
imagenano
banana {model: gemini-2.5-flash-image, prompt: robot reading book, aspectratio: 16:9, image_size: 1K}
generateimagenanobananawith_reference
shell
npx onekey agent gemini-nano-banana/gemini-nano-banana generate
imagenano
bananawith
reference {model: gemini-3-pro-image-preview, prompt: winter coat style, images: [https://avatars.githubusercontent.com/u/242328252], aspectratio: 1:1}
ocrextracttextfromimage
shell
npx onekey agent gemini-nano-banana/gemini-nano-banana ocr
extracttext
fromimage {images: [https://avatars.githubusercontent.com/u/242328252], model: gemini-3-flash-preview}
listitemsfrom_image
shell
npx onekey agent gemini-nano-banana/gemini-nano-banana list
itemsfrom
image {images: [https://avatars.githubusercontent.com/u/242328252], model: gemini-3-flash-preview, outputjson: true}
脚本
每个工具在此文件夹中都有一个专用脚本:
- - skills/gemini/scripts/generateimagegemini.py
- skills/gemini/scripts/generateimagenano_banana.py
示例
bash
python3 scripts/
.py --data {key: value}
相关 DeepNLP OneKey 网关文档
AI Agent 市场
技能市场
AI Agent A2Z 部署
PH AI Agent A2Z 基础设施
GitHub AI Agent 市场
依赖项
命令行界面依赖项
从 npm 安装 onekey-gateway
npm install @aiagenta2z/onekey-gateway
脚本依赖项
在运行任何脚本之前,请安装所需的 Python 包。
bash
pip install ai-agent-marketplace
或者,从 requirements 文件安装依赖项:
bash
pip install -r requirements.txt
如果包已安装,请跳过安装。
Agent 规则
在执行命令行或运行 scripts/ 目录中的任何脚本之前,请确保依赖项已安装。
使用 onekey 命令行界面作为运行技能的首选方法。