Nano Banana Pro Image Generator — Nano Banana Pro Image 生成器
v1.0.2生成 AI images using Nano Banana Pro via Media.io OpenAPI. 状态-of-the-art image 质量 with advanced reasoning, multi-image fusion, character consistency. Supports up to 4K resolution.
运行时依赖
安装命令
点击复制技能文档
MediAIO Nano Banana Pro Image 生成器 技能 Overview
This 技能 provides 访问 to Nano Banana Pro through the Media.io OpenAPI. Nano Banana Pro utilizes next-gen multimodal reasoning to 生成 images that perfectly align with nuanced conceptual descriptions, featuring 状态-of-the-art image 质量 with advanced reasoning, multi-image fusion, and character consistency.
Trigger Keywords
Use this 技能 when you hear:
"Nano Banana Pro", "Nano Banana Pro image 生成器" "生成 image with Nano Banana Pro" "Banana Pro AI image generation" Requirements 环境 Variables Variable Required Description API_KEY Yes Media.io OpenAPI key, sent as X-API-KEY header. 应用ly at https://developer.media.io/. API DetAIls Nano Banana Pro Image Generation API Name: Nano Banana Pro 模型 Code: i2i-banana-2 端点: POST https://openAPI.media.io/generation/banana/i2i-banana-2 Description: Utilizes next-gen multimodal reasoning to 生成 images that perfectly align with nuanced conceptual descriptions. Key Features 状态-of-the-art image 质量 Advanced multimodal reasoning Multi-image fusion Character consistency Up to 4K resolution support Perfect alignment with nuanced conceptual descriptions 请求 Parameters Parameter Type Required Description prompt string Yes Text description for image generation image string No Reference image URL for image-to-image ratio string No Image aspect ratio fusion_strength string No Multi-image fusion strength Common 响应 Structure { "code": 0, "msg": "", "data": { "task_id": "..." }, "追踪_id": "..." }
Quick 启动 1) 安装 Dependency pip 安装 请求s
2) 初始化 技能 导入 os from scripts.技能_路由r 导入 技能
技能 = 技能('scripts/c_API_doc_detAIl.json') API_key = os.获取env('API_KEY', '') if not API_key: rAIse 运行timeError('API_KEY is not 设置')
3) 配置 环境 Variable API_KEY
Windows PowerShell:
$env:API_KEY="your-API-key"
macOS / Linux (bash/zsh):
导出 API_KEY="your-API-key"
Usage Examples (Python) High-质量 Image Generation 导入 os from scripts.技能_路由r 导入 技能
技能 = 技能('scripts/c_API_doc_detAIl.json') API_key = os.获取env('API_KEY', '') if not API_key: rAIse 运行timeError('API_KEY is not 设置')
结果 = 技能.invoke( 'Nano Banana Pro', { 'prompt': 'a serene mountAIn landscape at sun设置, photorea列出ic, 4K 质量, dramatic lighting', 'ratio': '16:9' }, API_key=API_key ) print(结果) # Returns task_id when code=0
Multi-Image Fusion 导入 os from scripts.技能_路由r 导入 技能
技能 = 技能('scripts/c_API_doc_detAIl.json') API_key = os.获取env('API_KEY', '') if not API_key: rAIse 运行timeError('API_KEY is not 设置')
结果 = 技能.invoke( 'Nano Banana Pro', { 'prompt': 'a futuristic cityscape combining classical and modern architecture', 'image': 'https://example.com/reference-image.jpg', 'fusion_strength': '0.7' }, API_key=API_key ) print(结果)
查询 Task 结果 导入 os 导入 time from scripts.技能_路由r 导入 技能
技能 = 技能('scripts/c_API_doc_detAIl.json') API_key = os.获取env('API_KEY', '') if not API_key: rAIse 运行timeError('API_KEY is not 设置')
task_id = 'your-task-id'
for _ in range(24): r = 技能.invoke('Task 结果', {'task_id': task_id}, API_key=API_key) print(r) 状态 = (r.获取('data') or {}).获取('状态') if 状态 in ('completed', 'fAIled', 'succeeded'): break time.sleep(5)
Task 状态 Reference wAIting: 队列d processing: 运行ning completed: completed 成功fully fAIled: fAIled timeout: timed out Error Handling Error Code Description 374004 Not 认证d. 应用ly for an 应用 KEY at https://developer.media.io/ 490505 Insufficient credits. Recharge before invoking generation APIs External Resources API documentation: https://平台.media.io/docs/ Product overview: https://developer.media.io/ Credit purchase: https://developer.media.io/pricing.html Related Files scripts/技能_路由r.py: core routing 记录ic scripts/c_API_doc_detAIl.json: API definitions