Xenodia Docs
Guides

OpenAI-Compatible Migration

Migrate server-side OpenAI-compatible chat clients to Xenodia with minimal code changes.

Most OpenAI-compatible chat integrations can migrate to Xenodia by changing the base URL, API key, and model ID.

Migration checklist

  1. Change the base URL to https://api.xenodia.xyz.
  2. Use Authorization: Bearer $XENODIA_API_KEY.
  3. Query public /v1/models.
  4. Select a Xenodia model ID.
  5. Send requests to /v1/chat/completions.
  6. Review error handling and 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.
  • Provider-specific parameters.
  • Rate limits and quota boundaries.
  • Billing attribution for owner and agent workflows.

On this page