Documentation Index
Fetch the complete documentation index at: https://docs.apigo.ai/llms.txt
Use this file to discover all available pages before exploring further.
推荐 endpoint
最小请求
{
"model": "gpt-4.1",
"input": "总结 ApiGo 文档的核心价值,用 3 个要点回答。"
}
cURL 示例
curl https://maas.apigo.ai/v1/responses \
-H "Authorization: Bearer $YOUR API KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1",
"input": "总结 ApiGo 文档的核心价值,用 3 个要点回答。"
}'
Python 示例
from openai import OpenAI
client = OpenAI(
base_url="https://maas.apigo.ai/v1",
api_key="<YOUR API KEY>",
)
response = client.responses.create(
model="gpt-4.1",
input="总结 ApiGo 文档的核心价值,用 3 个要点回答。",
)
print(response.output_text)
Node.js 示例
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://maas.apigo.ai/v1",
apiKey: process.env.YOUR API KEY,
});
const response = await client.responses.create({
model: "gpt-4.1",
input: "总结 ApiGo 文档的核心价值,用 3 个要点回答。"
});
console.log(response.output_text);
最佳实践
- 新接入优先考虑
responses,因为它更适合统一文本、工具和多模态输入
- 多轮对话尽量复用
previous_response_id,不要每轮都回传完整历史
- 如果后面要接结构化输出或工具调用,先围绕
output[] 和 output_text 设计解析层