Documentation
AI Gateway Docs
这里是本地文档页面。该服务提供统一的 OpenAI 兼容 API 端点,支持多模型、多模态调用,并兼容普通响应与流式响应。
Available Endpoints
当前支持的核心接口如下。
GET/healthz
Service health status
GET/v1/models
Available model list
POST/v1/chat/completions
Chat, stream and non-stream
POST/v1/responses
Responses API compatible
POST/v1/images/generations
Image generation entry
POST/v1/images/edits
Multipart image edit entry
POST/v1/videos
Video generation entry
Capabilities
统一端点覆盖文本、图像、视频等多种调用形式。客户端只需要保持一致的调用方式,即可访问不同模型能力,并在需要时使用流式输出。
Example
一个简单的聊天请求示例:
curl http://127.0.0.1:8001/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_GATEWAY_KEY" \
-d '{
"model": "gpt-5",
"messages": [
{"role": "user", "content": "reply with ok only"}
],
"stream": false
}'