Docs Bot — Up-to-Date Docs Scanner
When working on integrations or any coding task that depends on external APIs or services, fetch current documentation instead of relying on training data. Docs and model lists change frequently.
When to Apply
- - Building or debugging OpenRouter (or similar) integrations
- Implementing or updating third-party API usage
- User asks for "latest docs", "current API", "model list", or "official reference"
- Choosing models, parameters, or SDK usage for a service
Scan Workflow
- 1. Identify the canonical doc base for the task (e.g.
https://openrouter.ai/docs for OpenRouter). - Fetch the relevant URLs using the web fetch tool:
- Main docs/quickstart
- API reference
- Models/list page when model IDs, pricing, or capabilities matter
- 3. Use the fetched content to implement or correct code (endpoints, headers, request/response shapes, model IDs).
- Cite the URLs you used so the user can verify or read more.
OpenRouter — Canonical URLs
When the task involves OpenRouter, fetch these for current behavior:
| Purpose | URL |
|---|
| Quickstart & SDK | https://openrouter.ai/docs |
| API reference (request/response, params) |
https://openrouter.ai/docs/api/reference |
| Models (IDs, pricing, context, filters) | https://openrouter.ai/models |
| OpenAPI spec | https://openrouter.ai/openapi.json |
Integration checklist (OpenRouter):
- - Base URL: INLINECODE1
- Chat completions: INLINECODE2
- Auth header: INLINECODE3
- Optional headers:
HTTP-Referer, X-Title for attribution - Model IDs include provider prefix (e.g.
openai/gpt-4o, anthropic/claude-sonnet-4) - Confirm model ID and parameters from the current models page; names and availability change.
Other Services
For other APIs or SDKs:
- 1. Find the official docs root (e.g.
https://<service>.com/docs or /developer). - Fetch quickstart + API reference (and models/catalog if applicable).
- Prefer official docs over blog posts or third-party tutorials for correctness and recency.
Output
- - Base implementation on fetched docs, not memory.
- If a URL returns an error or empty content, say so and fall back to a web search or alternative URL.
- Keep answers concise; link to the exact pages used for details.
Docs Bot — 最新文档扫描器
在处理集成开发或任何依赖外部API/服务的编码任务时,获取当前文档而非依赖训练数据。文档和模型列表会频繁更新。
适用场景
- - 构建或调试 OpenRouter(或类似服务)的集成
- 实现或更新 第三方API 的使用
- 用户询问最新文档、当前API、模型列表或官方参考
- 为某个服务选择模型、参数或SDK用法
扫描流程
- 1. 确定任务的标准文档库(例如OpenRouter对应 https://openrouter.ai/docs)。
- 使用网页抓取工具获取相关URL:
- 主要文档/快速入门
- API参考
- 涉及模型ID、定价或功能时的模型/列表页面
- 3. 利用获取的内容实现或修正代码(端点、请求头、请求/响应格式、模型ID)。
- 引用所使用的URL,方便用户验证或深入阅读。
OpenRouter — 标准URL
当任务涉及OpenRouter时,获取以下内容以获取当前行为:
| 用途 | URL |
|---|
| 快速入门与SDK | https://openrouter.ai/docs |
| API参考(请求/响应、参数) |
https://openrouter.ai/docs/api/reference |
| 模型(ID、定价、上下文、过滤器) | https://openrouter.ai/models |
| OpenAPI规范 | https://openrouter.ai/openapi.json |
集成检查清单(OpenRouter):
- - 基础URL:https://openrouter.ai/api/v1
- 聊天补全:POST .../chat/completions
- 认证请求头:Authorization: Bearer APIKEY>
- 可选请求头:HTTP-Referer、X-Title(用于归属)
- 模型ID包含提供商前缀(例如 openai/gpt-4o、anthropic/claude-sonnet-4)
- 从当前模型页面确认模型ID和参数;名称和可用性会变化。
其他服务
对于其他API或SDK:
- 1. 找到官方文档根目录(例如 https://<服务名>.com/docs 或 /developer)。
- 获取快速入门 + API参考(以及适用的模型/目录)。
- 优先使用官方文档而非博客文章或第三方教程,以确保准确性和时效性。
输出
- - 基于获取的文档而非记忆实现代码。
- 如果URL返回错误或空内容,请明确说明并回退到网络搜索或替代URL。
- 保持答案简洁;链接到所使用的具体页面以获取详细信息。