API Surface

Routes, Rules, and Request Shape

这里是 ai-gateway 的本地文档入口。网关以 OpenAI 兼容格式对外提供统一 API,并按 model 自动路由到多种 providers。

Endpoints

以下接口可直接对接现有 OpenAI SDK 或 curl。POST 路径支持流式与非流式透传。

GET/healthz
service heartbeat 200: ok
GET/v1/models
aggregate upstream model lists dedup by id
POST/v1/chat/completions
chat completions json + stream
POST/v1/responses
responses api json + stream
POST/v1/images/generations
image generation provider capability check
POST/v1/images/edits
multipart image edit form-data supported
POST/v1/videos
video generation g2a route expected