Xenodia Docs
指南

OpenAI-Compatible Migration

用最小代码改动把 server-side OpenAI-compatible chat client 迁移到 Xenodia。

大多数 OpenAI-compatible chat integration 只需要改 base URL、API key 和 model ID。

Migration checklist

  1. 把 base URL 改成 https://api.xenodia.xyz
  2. 使用 Authorization: Bearer $XENODIA_API_KEY
  3. 查询 public /v1/models
  4. 选择 Xenodia model ID。
  5. 发送请求到 /v1/chat/completions
  6. 检查 error handling 和 retry policy。

Example

curl -X POST "https://api.xenodia.xyz/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XENODIA_API_KEY" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      { "role": "user", "content": "Write one sentence about Xenodia." }
    ]
  }'

Things to verify

  • Streaming behavior。
  • Tool-call compatibility。
  • Model-specific parameters。
  • Rate limits and quota boundaries。
  • Owner / agent workflow 的 billing attribution。

本页内容