OpenAI GPT-4.1 通过网宿 EdgeCloud 网关
curl https://ailab.folhj.online/v1/chat/completions \
-H "Authorization: Bearer $KAIMID_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "wangsu-gpt-4.1", "messages": [{"role": "user", "content": "你好,请用一句话介绍这个模型。"}]}'
const response = await fetch("https://ailab.folhj.online/v1/chat/completions", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.KAIMID_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ model: "wangsu-gpt-4.1", messages: [{ role: "user", content: "你好,请用一句话介绍这个模型。" }] }),
});
import os, requests
resp = requests.post("https://ailab.folhj.online/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['KAIMID_API_KEY']}"},
json={"model": "wangsu-gpt-4.1", "messages": [{"role": "user", "content": "你好,请用一句话介绍这个模型。"}]})