OpenAI-compatible multi-model chat & flow
Bearer JWT auth (UM-issued); /v1/chat/completions and /v1/models fully OpenAI-compatible — existing SDKs work with zero changes.
Standard REST, unified error codes and pagination.
| Method | Path | Description |
|---|---|---|
| POST | /v1/chat/completions | Chat completion (OpenAI-compatible) |
| GET | /v1/models | List available models |
Real request and response, copy and run.
curl https://mf.yunjii.cn/v1/chat/completions \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role":"user","content":"你好"}]
}'Authorization: Bearer <access_token>
Content-Type: application/json
{
"model": "gpt-4o",
"messages": [{"role":"user","content":"你好"}]
}{
"id": "chatcmf-abc123",
"model": "gpt-4o",
"choices": [{
"index": 0,
"message": {"role":"assistant","content":"你好!有什么可以帮你?"},
"finish_reason": "stop"
}],
"usage": {"prompt_tokens": 5, "completion_tokens": 12, "total_tokens": 17}
}