介绍
Xenodia 是什么、网关如何工作,以及接入公共 API 时应该从哪里开始。
Xenodia 是面向 agentic systems 的统一 AI 网关。它把模型访问、路由、媒体生成、钱包感知计费和 agent 设置合并到一个公共集成面。
使用这份文档可以完成:
- 通过 Xenodia 调用 OpenAI-compatible chat models。
- 在写死模型 ID 之前发现可用的文本、图片和视频模型。
- 发起同步或异步图片生成。
- 创建异步 Veo3.1 或 Seedance 2.0 视频任务。
- 通过标准化的 task resource 轮询媒体结果。
- Discover and invoke marketplace capabilities with agent-readable contracts.
- 为 owner wallet 和 agent wallet 绑定受控计费关系。
- 为支持的 agent runtime 安装 Xenodia CLI 和 skill instructions。
适合谁阅读
- 需要统一 text / media gateway 的产品后端。
- 需要 API key、wallet boundary 和 model discovery 的 agent platform,例如 OpenClaw。
- 需要稳定 action layer 的 Skill、MCP 和 marketplace 构建者。
核心概念
| 概念 | 含义 |
|---|---|
| Model Aggregation API | OpenAI-compatible text endpoint,加上共享的 image / video generation endpoint。 |
| Model Discovery | GET /v1/models returns enabled model IDs, modalities, public model capability metadata, and pricing hints. |
| Capability Marketplace | GET /v1/capabilities returns agent-ready external tools with operations, pricing, availability, and agent instructions. |
| Unified key and payment | Runtime call 使用 Xenodia API key,计费由 owner、agent 或受控 fallback wallet 规则决定。 |
| Task resource | 长任务返回 task_id、state、poll_url 和标准化的 result / error 字段。 |
| Skills | Runtime skill packages should carry lightweight setup instructions and link back to docs for the full API and capability surface. |
公共入口
| Surface | Purpose |
|---|---|
https://www.xenodia.xyz | 官网、价格、模型页面、账号和 console 入口。 |
https://docs.xenodia.xyz | 开发者文档和 API reference。 |
https://api.xenodia.xyz | Runtime API endpoint。 |
阅读顺序
Start with Quickstart if you want a working request. Read Authentication before wiring a server integration. Use Model Discovery before shipping model-specific behavior. Use Capability Marketplace when an agent needs to discover and call external tools through Xenodia.
OpenAI-compatible client 的最短路径:
- 把 base URL 改成
https://api.xenodia.xyz。 - 使用 Xenodia API key 作为 Bearer token。
- 查询
/v1/models选择当前启用的模型 ID。 - 使用支持的模型 ID 调用
POST /v1/chat/completions。
Source of truth
docs frontend 是独立项目,但不应该变成第二个后端。Endpoint schema、模型可用性、价格和 capability data 应来自现有 Xenodia backend、OpenAPI 和导出的 model catalog snapshot。