API 参考
Model Discovery API
发现 Xenodia public models、modalities、pricing hints、async support 和 capability metadata。
发送模型专属请求前,先使用 GET /v1/models。Catalog 可以避免 client 猜测当前启用的模型、参数和 channel。
这个 endpoint 是 public 的。你可以在还没有 API key 时调用它,然后把选中的 model ID 用在需要认证的 runtime request 中。
Endpoint
GET https://api.xenodia.xyz/v1/modelscURL
curl "https://api.xenodia.xyz/v1/models"Example model item
{
"id": "nano-banana-pro",
"object": "model",
"name": "nano-banana-pro",
"owned_by": "kie",
"brand_key": "kie",
"brand_image_url": "/v1/models/brands/kie/image",
"upstream_id": "google/nano-banana-pro",
"released_at": null,
"modalities": ["image"],
"description": "Image generation and editing model.",
"price_input_per_m": 0,
"price_output_per_m": 0,
"capabilities": {
"async_supported": true,
"request_mode": ["sync", "task"],
"pricing": {
"mode": "resolution",
"tiers": [
{ "id": "1k_2k", "label": "1K / 2K", "unit": "image", "price_micro_usdc": 0 },
{ "id": "4k", "label": "4K", "unit": "image", "price_micro_usdc": 0 }
]
},
"reference_input": {
"supported": true,
"transport": ["url", "multipart_file"],
"max_items": 8
}
},
"enabled": true,
"available_channels": []
}需要读取的字段
| Field | Why it matters |
|---|---|
id | 请求中传入的 public model ID。 |
name | 展示名称,通常来自 public 或 upstream model ID。 |
owned_by, brand_key, brand_image_url | Provider / brand metadata。 |
upstream_id | 与 Xenodia public ID 不同时的 provider-facing model ID。 |
modalities | 模型支持 text、image、video、audio 或 mixed input。 |
price_input_per_m, price_output_per_m | 文本模型 token price 字段,或 media entry 的展示字段。 |
capabilities.async_supported | 是否支持 task mode。 |
capabilities.request_mode | 支持 sync、task 或两者。 |
capabilities.pricing | Media pricing mode 和 tier。 |
capabilities.parameters | 支持的 request controls 和 enum。 |
capabilities.reference_input | Reference input transport 和数量限制。 |
available_channels | 当前可服务该模型的 active channel。 |
Response 还包含 top-level payment object,提供 minimum / recommended top-up hints。
Client rule
不要从模型名字推断 media support。读取 modalities 和 capabilities。
价格敏感 UI 应把 zero-price tier 视为“这个 snapshot 未定价”,除非产品侧已确认模型在 billable channel 上启用。Runtime call 仍可能因为视频价格 tier 未配置而拒绝请求。