正在打开页面…
正在加载内容,请稍候。
正在打开页面…
正在加载内容,请稍候。
GPT-6 Luna API 先把工单队列、未知类别和订单字段写成明确规则,再通过 Responses 检查结构化结果。批量处理前准备歧义和缺失字段样本,并保留人工升级路径。
全球顶尖大模型 · 一站式接入
| 输入 / 百万 token | 输出 / 百万 token |
|---|---|
| $0.011766 | $0.05883 |
仅展示当前最低基础单价,实际扣费以请求时的价格和后台记录为准。价格使用 5 分钟缓存;页面读取于 2026-11-06 14:19:29 UTC。
给出固定分类和升级规则,让模型提取问题类型;资料不足或含敏感动作时转人工,避免自动作出承诺。
从消息中提取日期、地点和事项,用格式校验与缺失字段检查把结果接入应用。
控制摘要长度和标签集合,在固定样本上检查遗漏与误分,再用于文档目录或后台流程。
gpt-6-luna官方规格核对于 2026-10-06。具体通道开放的参数、长度与限流,请按当前令牌核对。
不要把厂商上限当作每个网关通道保证。
官方默认 medium;简单提取可从 none 建立基线。
需要带思考的函数调用时使用 Responses,并验证通道支持。
严格 schema 需要验证当前分组透传;自然语言要求 JSON 不能替代 schema 校验。
接口地址取自当前模型目录;使用前确认令牌支持相应协议。
在本地设置 API Key 环境变量,再选择所需示例。收到有效结果后,到控制台核对用量与费用。
示例使用 none 和普通文本输出,便于检查分类规则。不会读取用户账号、处理退款或修改工单。
curl --fail-with-body --max-time 180 https://api.apizt.com/v1/responses \
-H "Authorization: Bearer $tokenba_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-6-luna","input":"把下面工单分类为 billing、integration、account、other 中的一项,输出三行:category、needs_human、reason。规则:涉及退款或账号身份时 needs_human=true。工单:SDK 返回 401,我刚轮换了 Key,base_url=https://api.apizt.com/v1,模型调用前没有更新服务器环境变量。不要要求提供完整 Key。","reasoning":{"effort":"none"},"max_output_tokens":1024,"store":false}' \
-o response.json &&
python3 - <<'PY'
import json
with open("response.json", encoding="utf-8") as file:
result = json.load(file)
print("status:", result.get("status"), "usage:", result.get("usage"))
if result.get("status") != "completed":
raise SystemExit(result.get("incomplete_details") or result.get("error") or "请求未完成")
texts = [part["text"] for item in result.get("output", []) if item.get("type") == "message" for part in item.get("content", []) if part.get("type") == "output_text"]
if not texts:
raise SystemExit("响应没有可见文本,请检查 output 中的拒绝或工具调用")
print("\n".join(texts))
PY通过 text.format 请求严格结构;这项能力需单独核对网关支持。请求成功后解析 output_text,再校验业务字段,不把 JSON 格式正确当作事实正确。
import json
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["tokenba_API_KEY"], base_url="https://api.apizt.com/v1")
schema = {
"type": "object",
"properties": {
"product": {"type": "string"},
"quantity": {"type": "integer"},
"missing_fields": {"type": "array", "items": {"type": "string"}},
},
"required": ["product", "quantity", "missing_fields"],
"additionalProperties": False,
}
response = client.responses.create(
model="gpt-6-luna",
input="客户消息:需要 12 个白色马克杯,周五发货。提取商品、数量和缺失的收货信息,不推断地址或电话。",
reasoning={"effort": "none"},
text={"format": {"type": "json_schema", "name": "order_request", "strict": True, "schema": schema}},
max_output_tokens=1024,
store=False,
)
print("status:", response.status, "usage:", response.usage)
if response.status != "completed" or not response.output_text:
raise RuntimeError("提取未完成,检查 incomplete_details、error 或拒绝")
order = json.loads(response.output_text)
if order["quantity"] != 12:
raise ValueError("数量与输入不一致")
print(order)轻量分类也可能遗漏上下文。建立未知类别、缺失信息和人工升级规则,用真实样本统计错误类型,再决定可自动处理的范围。
官方 Chat 函数调用仅在 none 下支持;带思考时使用 Responses。目录列出的接口不等于严格 schema、全部工具或所有客户端已验收。
厂商的高频任务定位不代表当前通道有相同限流或延迟。先确认请求和 token 限额、429 退避、幂等与失败重试,并在控制台核对批次实扣。
本页使用的准确 model ID 是 gpt-6-luna。使用 https://api.apizt.com/v1/responses;OpenAI SDK 的 Base URL 为 https://api.apizt.com/v1。提交 input,检查状态、最终输出和 usage。
官方 Chat 函数调用仅在 none 下支持;带思考时使用 Responses。目录列出的接口不等于严格 schema、全部工具或所有客户端已验收。