BlueAI Models for OpenClaw
Quick Start
Add a model to OpenClaw:
CODEBLOCK0
Test connectivity:
CODEBLOCK1
List available models:
CODEBLOCK2
Image Generation
Gemini image models generate images via Chat Completions (/v1/chat/completions), not the Images API. Send a prompt as a normal message; the model returns base64-encoded images in Markdown.
CODEBLOCK3
| Model | Speed | Quality | Edit Support | Best For |
|---|
| INLINECODE1 | ⚡ Fast | Good | ❌ | Quick prototypes, batch |
| INLINECODE2 |
Medium | ⭐ Best | ✅ | High-quality creative |
|
gemini-2.5-flash-image | ⚡ Fast | Good | ✅ | Image editing |
For detailed usage, prompt tips, Python examples, and edit workflows: read references/image-generation.md.
Endpoints
| Type | Base URL | Note |
|---|
| Claude (Anthropic) | INLINECODE5 | No /v1 |
| Everything else (OpenAI) |
https://bmc-llm-relay.bluemediagroup.cn/v1 |
With /v1 |
Same API key works for all models.
Model Selection Quick Guide
| Need | Model | Why |
|---|
| Cheapest + good | INLINECODE7 | $0.15/M in, 1M context |
| Best Chinese |
DeepSeek-V3.2 | Top Chinese quality, cheap |
| Vision + cheap |
gpt-4o-mini or
gemini-2.5-flash | Image input, low cost |
| Strong reasoning |
o4-mini or
DeepSeek-R1 | CoT reasoning |
| Best overall |
claude-opus-4-6-v1 | 128K output, Agent coding |
| Balanced |
claude-sonnet-4-6 | 1/5 Opus price, most tasks |
| Code specialist |
gpt-5.2-codex | 128K output, code focused |
| Ultra-long context |
xai.grok-4-fast-non-reasoning | 2M tokens |
|
Image gen (fast) |
gemini-3.1-flash-image-preview | Chat-based, cheap |
|
Image gen (quality) |
gemini-3-pro-image-preview | Best Gemini quality |
|
Image edit |
gemini-2.5-flash-image | Send image + edit instruction |
References
- - Full model catalog: Read
references/model-catalog.md for all 100+ models with specs - OpenClaw config guide: Read
references/openclaw-config.md for JSON structure and examples - Model selection decision tree: Read
references/model-selection.md for task-based recommendations - Image generation guide: Read
references/image-generation.md for Gemini image gen usage, prompts, and code examples
Key Rules
- 1. Claude models use
api: "anthropic-messages", baseUrl without INLINECODE25 - All other models use
api: "openai-completions", baseUrl with INLINECODE27 - DeepSeek/Qwen text models: set
input: ["text"] only (no image) - MiniMax: must use OpenAI endpoint, does not support Claude endpoint
- INLINECODE29 deprecated 2026-03-26 → use INLINECODE30
- Gemini image models use chat completions, not images API — output is base64 in Markdown
- After config changes: INLINECODE31
适用于OpenClaw的BlueAI模型
快速开始
向OpenClaw添加模型:
bash
python3 scripts/add_model.py gemini-2.5-flash --alias flash
python3 scripts/add_model.py claude-sonnet-4-6 --alias sonnet
openclaw gateway restart
测试连接:
bash
python3 scripts/test_model.py gemini-2.5-flash
python3 scripts/test_model.py --all-configured
列出可用模型:
bash
python3 scripts/add_model.py --list
图像生成
Gemini图像模型通过聊天补全(/v1/chat/completions)生成图像,而非图像API。以普通消息形式发送提示词;模型将以Markdown格式返回base64编码的图像。
bash
添加图像模型
python3 scripts/add_model.py gemini-3.1-flash-image-preview
python3 scripts/add_model.py gemini-3-pro-image-preview
openclaw gateway restart
测试图像生成
python3 scripts/test_model.py gemini-3.1-flash-image-preview --image-gen
python3 scripts/test_model.py gemini-3-pro-image-preview --image-gen --save ./test-output
| 模型 | 速度 | 质量 | 编辑支持 | 最佳用途 |
|---|
| gemini-3.1-flash-image-preview | ⚡ 快速 | 良好 | ❌ | 快速原型、批量处理 |
| gemini-3-pro-image-preview |
中等 | ⭐ 最佳 | ✅ | 高质量创意 |
| gemini-2.5-flash-image | ⚡ 快速 | 良好 | ✅ | 图像编辑 |
详细用法、提示词技巧、Python示例和编辑工作流程:请阅读 references/image-generation.md。
端点
| 类型 | 基础URL | 说明 |
|---|
| Claude (Anthropic) | https://bmc-llm-relay.bluemediagroup.cn | 无 /v1 |
| 其他所有 (OpenAI) |
https://bmc-llm-relay.bluemediagroup.cn/v1 |
包含 /v1 |
所有模型使用相同的API密钥。
模型选择快速指南
| 需求 | 模型 | 原因 |
|---|
| 最便宜且效果好 | gemini-2.5-flash | $0.15/M输入,100万上下文 |
| 最佳中文 |
DeepSeek-V3.2 | 顶级中文质量,价格低廉 |
| 视觉+廉价 | gpt-4o-mini 或 gemini-2.5-flash | 图像输入,低成本 |
| 强推理能力 | o4-mini 或 DeepSeek-R1 | 思维链推理 |
| 综合最佳 | claude-opus-4-6-v1 | 128K输出,Agent编码 |
| 均衡之选 | claude-sonnet-4-6 | Opus价格的1/5,适用于大多数任务 |
| 代码专家 | gpt-5.2-codex | 128K输出,专注代码 |
| 超长上下文 | xai.grok-4-fast-non-reasoning | 200万token |
|
图像生成(快速) | gemini-3.1-flash-image-preview | 基于聊天,价格低廉 |
|
图像生成(质量) | gemini-3-pro-image-preview | Gemini最佳质量 |
|
图像编辑 | gemini-2.5-flash-image | 发送图像+编辑指令 |
参考资料
- - 完整模型目录:阅读 references/model-catalog.md 了解100+模型的详细规格
- OpenClaw配置指南:阅读 references/openclaw-config.md 了解JSON结构和示例
- 模型选择决策树:阅读 references/model-selection.md 获取基于任务的推荐
- 图像生成指南:阅读 references/image-generation.md 了解Gemini图像生成的用法、提示词和代码示例
关键规则
- 1. Claude模型使用 api: anthropic-messages,baseUrl不带 /v1
- 所有其他模型使用 api: openai-completions,baseUrl带 /v1
- DeepSeek/Qwen文本模型:仅设置 input: [text](无图像)
- MiniMax:必须使用OpenAI端点,不支持Claude端点
- gemini-3-pro-preview 于2026年3月26日弃用 → 改用 gemini-3.1-pro-preview
- Gemini图像模型使用聊天补全,而非图像API——输出为Markdown中的base64编码
- 配置更改后:openclaw gateway restart