OpenAI 兼容接口
OpenAI 兼容入口适合 Codex CLI、OpenAI SDK、Open WebUI、Cherry Studio、Cline、Continue 等客户端。
Responses API
bash
curl "https://api.enodot.shop/v1/responses" \
-H "Authorization: Bearer $ENODOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1-codex",
"input": "写一个 TypeScript debounce 函数。"
}'流式请求:
bash
curl "https://api.enodot.shop/v1/responses" \
-H "Authorization: Bearer $ENODOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1-codex",
"stream": true,
"input": "逐步解释这个问题:为什么缓存命中率会下降?"
}'Chat Completions
bash
curl "https://api.enodot.shop/v1/chat/completions" \
-H "Authorization: Bearer $ENODOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.1-codex",
"messages": [
{ "role": "system", "content": "你是严谨的代码审查助手。" },
{ "role": "user", "content": "审查这个 SQL 查询是否有注入风险。" }
]
}'Images API
如果分组允许图片生成,可以调用:
text
POST /v1/images/generations
POST /v1/images/edits图片能力受分组开关、渠道支持情况和模型价格影响。如果返回 Images API is not supported for this platform,说明当前分组或 Mixed 来源不支持图片入口。
不带 /v1 的别名
部分客户端会请求:
text
POST /responses
POST /chat/completionsEnodot 会兼容这些别名,但新接入建议优先使用标准 /v1/*。
模型列表
bash
curl "https://api.enodot.shop/v1/models" \
-H "Authorization: Bearer $ENODOT_API_KEY"模型列表会根据 Key 的分组和渠道限制动态变化。