# SEE2AI 大模型 · Claude Haiku 5.5

> SEE2AI 大模型 · Claude Haiku 5.5（快速档）对话服务，支持文本输入、深度思考与工具调用。名称即模型版本：厂商推出新版时另立新 Action，本 Action 始终对应该版本。

## 📖 接入指引

**Endpoint**: `POST /api/v1/actions/see2ai_llm_claude_haiku_5_5_v1`

**认证方式**: Bearer Token (租户 API Key)

### Endpoints

| Method | Path | Purpose |
| --- | --- | --- |
| `POST` | `/api/v1/actions/see2ai_llm_claude_haiku_5_5_v1` | Submit the standard action request. |

> **⚠️ 重要提示**
> 
> 本 API 是 SEE2AI 平台标准化封装后的接口，**参数格式与任何上游 API 不同**。
> 请直接使用下方 Schema 中定义的参数，无需参考其他文档。
> 
> *例如：*
> *- 文本模型参数可能是 `query` 而不是 `messages` 数组*
> *- 视频模型参数可能是 `brief` (创意简报) 而不是复杂的配置项*

## 📥 输入参数 (Input Schema)

```json
{
  "description": "Claude Haiku 5.5 对话输入（Action 即模型版本，无 model 字段）。",
  "properties": {
    "query": {
      "description": "用户问题或指令。",
      "title": "Query",
      "type": "string"
    },
    "enable_thinking": {
      "default": false,
      "description": "是否启用深度思考。开启后会增加延迟和词元消耗，默认关闭。",
      "title": "Enable Thinking",
      "type": "boolean"
    },
    "max_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "最大输出词元数（可选）；不传时使用模型默认值。",
      "title": "Max Tokens"
    },
    "stream": {
      "default": false,
      "description": "是否启用流式返回。",
      "title": "Stream",
      "type": "boolean"
    },
    "tools": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "可选标准工具调用定义。",
      "title": "Tools"
    },
    "tool_choice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "可选工具选择策略，例如 `auto`。",
      "title": "Tool Choice"
    }
  },
  "required": [
    "query"
  ],
  "title": "ClaudeHaiku55ChatInput",
  "type": "object"
}
```

### 参数说明

| 参数名 | 类型 | 必填 | 默认值 | 说明 |
|--------|------|------|--------|------|
| `query` | string | ✅ 是 | `-` | 用户问题或指令。 |
| `enable_thinking` | boolean | ❌ 否 | `False` | 是否启用深度思考。开启后会增加延迟和词元消耗，默认关闭。 |
| `max_tokens` | integer / null | ❌ 否 | `-` | 最大输出词元数（可选）；不传时使用模型默认值。 |
| `stream` | boolean | ❌ 否 | `False` | 是否启用流式返回。 |
| `tools` | array / null | ❌ 否 | `-` | 可选标准工具调用定义。 |
| `tool_choice` | string / object / null | ❌ 否 | `-` | 可选工具选择策略，例如 `auto`。 |

## 📤 输出结果 (Output Schema)

```json
{
  "$defs": {
    "ChatFamilyUsage": {
      "properties": {
        "input_tokens": {
          "default": 0,
          "title": "Input Tokens",
          "type": "integer"
        },
        "output_tokens": {
          "default": 0,
          "title": "Output Tokens",
          "type": "integer"
        },
        "total_tokens": {
          "default": 0,
          "title": "Total Tokens",
          "type": "integer"
        }
      },
      "title": "ChatFamilyUsage",
      "type": "object"
    }
  },
  "description": "Claude Haiku 5.5 对话输出。",
  "properties": {
    "input_tokens": {
      "default": 0,
      "description": "输入词元。",
      "title": "Input Tokens",
      "type": "integer"
    },
    "output_tokens": {
      "default": 0,
      "description": "输出词元。",
      "title": "Output Tokens",
      "type": "integer"
    },
    "total_tokens": {
      "default": 0,
      "description": "总词元。",
      "title": "Total Tokens",
      "type": "integer"
    },
    "model": {
      "default": "",
      "description": "实际使用的 SEE2AI 化身模型名称（由各 action 显式填写）",
      "title": "Model",
      "type": "string"
    },
    "source": {
      "default": "see2ai",
      "description": "模型来源。",
      "title": "Source",
      "type": "string"
    },
    "cost_points": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "预先计算的扣费词元（如果插件内部已经计算好费用，则直接使用此值，忽略基于词元的计算）",
      "title": "Cost Points"
    },
    "response": {
      "description": "模型回答。",
      "title": "Response",
      "type": "string"
    },
    "thinking_content": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "深度思考内容（如启用）。",
      "title": "Thinking Content"
    },
    "tool_calls": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "模型要求调用的工具。",
      "title": "Tool Calls"
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/ChatFamilyUsage"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "词元使用统计。"
    },
    "provider_config_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "请求追踪 ID（便于问题排查）",
      "title": "Provider Config Id"
    },
    "warnings": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "非阻断提示。",
      "title": "Warnings"
    }
  },
  "required": [
    "response"
  ],
  "title": "ClaudeHaiku55ChatOutput",
  "type": "object"
}
```

### 输出字段说明

| 字段名 | 类型 | 说明 |
|--------|------|------|
| `input_tokens` | integer | 输入词元。 |
| `output_tokens` | integer | 输出词元。 |
| `total_tokens` | integer | 总词元。 |
| `model` | string | 实际使用的 SEE2AI 化身模型名称（由各 action 显式填写） |
| `source` | string | 模型来源。 |
| `cost_points` | integer / null | 预先计算的扣费词元（如果插件内部已经计算好费用，则直接使用此值，忽略基于词元的计算） |
| `response` | string | 模型回答。 |
| `thinking_content` | string / null | 深度思考内容（如启用）。 |
| `tool_calls` | array / null | 模型要求调用的工具。 |
| `usage` | object / null | 词元使用统计。 |
| `provider_config_id` | integer / null | 请求追踪 ID（便于问题排查） |
| `warnings` | array / null | 非阻断提示。 |

## 💡 调用示例

### cURL 示例

```bash
curl -X POST "https://see2ai.com/api/v1/actions/see2ai_llm_claude_haiku_5_5_v1" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer sk-your-tenant-api-key" \
     -d '{
  "query": "Explain quantum entanglement in simple terms.",
  "enable_thinking": false,
  "stream": false
}'
```

### Python 示例

```python
import requests

API_KEY = "sk-your-tenant-api-key"
ENDPOINT = "https://see2ai.com/api/v1/actions/see2ai_llm_claude_haiku_5_5_v1"

headers = {
    "Content-Type": "application/json",
    "Authorization": f"Bearer {API_KEY}"
}

payload = {
  "query": "Explain quantum entanglement in simple terms.",
  "enable_thinking": false,
  "stream": false
}

response = requests.post(ENDPOINT, json=payload, headers=headers)
result = response.json()

print(f"结果：{result}")
```

## 💰 计费说明

> 按输入/输出词元计费；深度思考产生的思考词元计入输出。

**注意**: 所有费用都以词元为单位，系统会自动从租户余额中扣除。

## ⚠️ 常见错误码

| HTTP 状态码 | 错误原因 | 解决方案 |
| --- | --- | --- |
| `401` | API Key 无效或租户余额不足 | 检查 API Key 是否正确，或联系管理员充值 |
| `413` | 输入超过模型最大输入长度 | 请稍后重试 |
| `422` | 输入参数不合法（会一次列出全部问题） | 检查请求参数是否符合 Schema 要求 |
| `429` | 调用频率超限 | 降低请求频率，或联系管理员调整限流配置 |
| `502` | 大模型服务上游响应异常 | 请稍后重试 |
| `504` | 大模型服务响应超时 | 请稍后重试 |

## 📞 技术支持

- **文档问题**: 查看 [SEE2AI 官方文档](https://see2ai.com/docs)
- **API 状态**: 访问 [服务状态页面](https://see2ai.com/status)
- **问题反馈**: 联系技术支持团队

---

**API 版本**: see2ai_llm_claude_haiku_5_5_v1
**最后更新**: 2026-03-23
