> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# AIsa 模型目录：模型 ID、路由与能力

> 通过 GET /v1/models 或在线目录 aisa.one/models 查看当前 AIsa 模型 ID、支持的端点和能力。

AIsa 通过单个 API key 路由 LLM、图像、视频和 embedding 模型。由于模型会频繁上架和下架，本页介绍如何动态查询目录，而非维护一份静态列表。

> [card] [GET /v1/models](#通过-api-列出模型)
>
> 面向应用和智能体的机器可读模型 ID、路由和能力标签列表。

> [card] [aisa.one/models](https://aisa.one/models)
>
> 浏览、筛选和对比模型，查看实时价格。

## 通过 API 列出模型

将 API key 作为 Bearer token 发送。列出模型免费；不携带 API key 的请求返回 `402`。

```bash theme={null}
curl https://api.aisa.one/v1/models \
  -H "Authorization: Bearer $AISA_API_KEY"
```

响应遵循标准 OpenAI 列表格式，每个模型额外包含一个 `aisa` 元数据对象：

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "claude-fable-5-1",
      "object": "model",
      "created": 1788315984,
      "owned_by": "Anthropic",
      "aisa": {
        "display_name": "claude-fable-5-1",
        "model_type": "text",
        "capabilities": ["chat", "long-context", "reasoning", "tools"],
        "preferred_route": "anthropic",
        "routes": [
          { "key": "openai", "path": "/v1/chat/completions", "method": "POST" },
          { "key": "anthropic", "path": "/v1/messages", "method": "POST", "preferred": true }
        ]
      }
    }
  ]
}
```

| 字段 | 含义 |
| - | - |
| `id` | 传入 `model` 参数时使用的确切字符串。 |
| `owned_by` | 上游提供商，如 `OpenAI`、`Anthropic` 或 `Alibaba`。 |
| `aisa.model_type` | `text`、`image`、`video` 或 `embedding`。 |
| `aisa.capabilities` | 能力标签，如 `chat`、`tools`、`reasoning`、`vision`、`image`、`videos` 或 `embeddings`。 |
| `aisa.routes` | 服务该模型的所有 AIsa 端点，以 `method` + `path` 表示。 |
| `aisa.preferred_route` | 部分模型存在此字段。推荐路由的 `key`（对应路由同时具有 `"preferred": true`）。 |

用 `jq` 过滤列表：

```bash theme={null}
# Models served by the Anthropic-compatible /v1/messages endpoint
curl -s https://api.aisa.one/v1/models -H "Authorization: Bearer $AISA_API_KEY" \
  | jq -r '.data[] | select(any(.aisa.routes[]; .path == "/v1/messages")) | .id'

# Image models
curl -s https://api.aisa.one/v1/models -H "Authorization: Bearer $AISA_API_KEY" \
  | jq -r '.data[] | select(.aisa.model_type == "image") | .id'
```

## 按模型类型划分的端点

| 模型类型 | 端点 | 说明 |
| - | - | - |
| Text | `POST /v1/chat/completions`、`POST /v1/messages`、`POST /v1/responses` | 大多数文本模型同时提供 OpenAI 和 Anthropic 兼容路由。切换协议前请先检查 `routes`。 |
| Image | `POST /v1/images/generations`、`POST /v1/images/edits` | 并非所有图像模型都支持编辑。 |
| Video | `POST /v1/video/generations`，然后 `GET /v1/video/generations/{task_id}` | 异步方式：先提交任务，再轮询获取结果。 |
| Embedding | `POST /v1/embeddings` | |

对不支持的路由调用模型会返回 `400`，`error.code` 为 `model_route_not_supported`；`error.supported_routes` 列出可用路由。各端点的请求与响应 schema 见 [API 参考](https://aisa.one/docs/zh/api-reference/chat/post_chat-completions.md)。

## 调用模型

将任何 OpenAI 兼容 SDK 指向 `https://api.aisa.one/v1`，并传入目录中的模型 `id`：

```python theme={null}
from openai import OpenAI

client = OpenAI(api_key="YOUR_AISA_API_KEY", base_url="https://api.aisa.one/v1")

response = client.chat.completions.create(
    model="qwen3.7-max",
    messages=[{"role": "user", "content": "Compare these model options for a coding agent."}],
)
print(response.choices[0].message.content)
```

Anthropic SDK 及其他客户端的用法见 [OpenAI / Anthropic SDK](https://aisa.one/docs/zh/get-started/sdk-compatibility.md)。

## 在 aisa.one 上浏览和对比

如需交互式浏览，请访问 [aisa.one/models](https://aisa.one/models)。你可以按模型、提供商或端点搜索，按提供商和能力筛选，以及并排对比模型。页面还展示每个模型的当前价格，本文档不列出价格信息。

## 模型计费方式

模型与数据 API 共用同一笔预付余额。计费单位因模型而异：

* **文本和 embedding 模型**：按 token 计费，输入和输出费率分别计算；在支持缓存的模型上，缓存读取和写入另有费率。
* **图像模型**：按 token、按请求或按图片计费（有时因图片尺寸而异），取决于具体模型。
* **视频模型**：按输出时长（秒）或按 token 计费，费率因分辨率而异。

在线目录展示每个模型的计费类型和当前价格。每次调用的最终费用记录在你的用量日志中。余额、消费限额和报价详见[计费与额度](https://aisa.one/docs/zh/guides/pricing.md)。

## 模型系列

AIsa 上的所有模型系列都使用同一个 API Key 和上面列出的端点。每个系列页面列出该系列的模型 ID，以及每个模型可用的端点。

| 系列 | 厂商 | 模型数 | 类型 |
| - | - | -: | - |
| [Claude](https://aisa.one/docs/zh/models/claude.md) | Anthropic | 14 | 文本 |
| [OpenAI](https://aisa.one/docs/zh/models/openai.md) | OpenAI | 32 | 文本、图像、Embedding |
| [Gemini](https://aisa.one/docs/zh/models/gemini.md) | Google | 2 | 文本 |
| [Grok](https://aisa.one/docs/zh/models/grok.md) | xAI | 7 | 文本 |
| [DeepSeek](https://aisa.one/docs/zh/models/deepseek.md) | DeepSeek | 4 | 文本 |
| [Qwen](https://aisa.one/docs/zh/models/qwen.md) | 阿里巴巴 | 14 | 文本 |
| [Wan](https://aisa.one/docs/zh/models/wan.md) | 阿里巴巴 | 7 | 图像、视频 |
| [Kimi](https://aisa.one/docs/zh/models/kimi.md) | 月之暗面 | 4 | 文本 |
| [GLM](https://aisa.one/docs/zh/models/glm.md) | 智谱 | 6 | 文本 |
| [MiniMax](https://aisa.one/docs/zh/models/minimax.md) | MiniMax | 5 | 文本、视频 |
| [Seedream](https://aisa.one/docs/zh/models/bytedance.md) | 字节跳动 | 1 | 图像 |
| [Seedance](https://aisa.one/docs/zh/models/seedance.md) | 字节跳动 | 3 | 视频 |
| [混元](https://aisa.one/docs/zh/models/hunyuan.md) | 腾讯 | 2 | 文本 |
| [MiMo](https://aisa.one/docs/zh/models/mimo.md) | 小米 | 3 | 文本 |
| [Jina](https://aisa.one/docs/zh/models/jina.md) | Jina AI | 3 | Embedding、重排序 |
| [HappyHorse](https://aisa.one/docs/zh/models/happyhorse.md) | HappyHorse | 3 | 视频 |
| TypeSafe | TypeSafe | 1 | 文本 |

## 智能体使用须知

* 仅使用 `GET /v1/models` 动态返回的模型 ID。不要猜测模型 ID，也不要复用记忆中的旧 ID。
* 从模型的 `routes` 列表中选择端点；存在 `"preferred": true` 标记时优先使用该路由。
* 不要仅因上游模型家族支持某种模态就假设具体模型也支持。始终检查 `model_type` 和 `capabilities`。
* 通过 `GET /v1/models` 列出模型是免费的，可在用户批准任何消费之前调用。当前价格列在 [aisa.one/models](https://aisa.one/models)，不在本文档中。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.