🔥 Black Friday AI API deals are live· 🎬 Seedance 2.5 — 20% off, up to 42% below market, until Nov 30Ends in--d --:--:--See deals →

OpenAI GPT 6 Sol API API: AI 文本生成

通过 Muapi REST API 使用 GPT 6 Sol API生成文本。按次生成付费,无需订阅。

交互式模型控制

通过 Muapi 使用 GPT 6 Sol API,按 OpenAI 官方价格计费:输入 $2.00、缓存输入 $0.20、缓存写入 $2.50、输出 $10.00(每百万令牌)。支持异步和流式调用。

GPT 6 Sol API API 文档

端点

POST https://api.muapi.ai/api/v1/gpt-6-sol

使用 Muapi API 密钥在 x-api-key 请求头中提交任务,然后轮询 https://api.muapi.ai/api/v1/predictions/{request_id}/result 直到状态变为 completed。

参数

名称类型必填描述
promptstring是用户消息或指令。
system_promptstring否可选的系统级指令,用于引导模型行为。

cURL 示例

REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/gpt-6-sol \
  -H "x-api-key: $MUAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"<prompt>"}' | jq -r .request_id)

curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY"

Python 示例

import os, time, requests

API = "https://api.muapi.ai/api/v1"
headers = {"x-api-key": os.environ["MUAPI_API_KEY"]}

r = requests.post(f"{API}/gpt-6-sol", headers=headers, json={"prompt":"<prompt>"})
request_id = r.json()["request_id"]

while True:
    res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json()
    if res["status"] == "completed":
        print(res["outputs"]); break
    if res["status"] == "failed":
        raise RuntimeError(res.get("error"))
    time.sleep(3)

完整文档及 Agent/MCP 集成: llms.txt. 在此获取 API 密钥: muapi.ai/access-keys.