Xenodia Docs
API ReferenceGenerated Reference

Create chat completion

Creates an OpenAI-compatible chat completion through Xenodia.

POST
/v1/chat/completions

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.xenodia.xyz/v1/chat/completions" \  -H "Content-Type: application/json" \  -d '{    "model": "openai/gpt-4o-mini",    "messages": [      {        "role": "user",        "content": "Reply with OK only."      }    ]  }'
{
  "id": "string",
  "choices": [
    {
      "message": {
        "role": "system",
        "content": "string"
      }
    }
  ],
  "usage": {
    "prompt_tokens": 0,
    "completion_tokens": 0,
    "total_tokens": 0
  }
}
{
  "error": "bad_request",
  "message": "string",
  "type": "string",
  "code": "string"
}
{
  "error": "bad_request",
  "message": "string",
  "type": "string",
  "code": "string"
}