Skip to content

Using models

Your deployments answer requests through an OpenAI-compatible interface. Any OpenAI-compatible client works: SDK, CLI or HTTP. It doesn't matter whether you started the deployment in the web app or via the management API.

What you need

  • Endpoint: https://ai.xcloud.eu/v1. The web app shows it in the Access tab as Endpoint for requests.
  • Key: the key for requests of a service account that may access the deployment (see Service accounts and keys)
  • Model: the name of the deployment, in the model field of the request

The deployment must have the status Running. Many tools read the endpoint and key from the environment variables OPENAI_BASE_URL and OPENAI_API_KEY and so work without any change to the code:

export OPENAI_BASE_URL="https://ai.xcloud.eu/v1"
export OPENAI_API_KEY="<key for requests>"

List available models

GET /models lists the deployments your key may access:

curl https://ai.xcloud.eu/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY"
{
  "object": "list",
  "data": [
    {"id": "qwen3-8-27b", "object": "model", "owned_by": "openai"}
  ]
}

Chat requests

With curl:

curl https://ai.xcloud.eu/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen3-8-27b", "messages": [{"role": "user", "content": "Hello"}]}'

With the OpenAI SDK for Python (package openai):

from openai import OpenAI

client = OpenAI(
    base_url="https://ai.xcloud.eu/v1",
    api_key="<key for requests>",
)

response = client.chat.completions.create(
    model="qwen3-8-27b",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

The web app shows the same examples under Show instructions, with your service account and your deployment filled in.

Responses with reasoning

Many current models reason before they answer. If the engine was started with a suitable parser, e.g. vLLM with --reasoning-parser, the reasoning is in the reasoning_content field of the response and the actual answer alone in content. The number of reasoning tokens is given in usage.completion_tokens_details.reasoning_tokens. Without a parser, both are together in content.

{
  "object": "chat.completion",
  "model": "qwen3-8-27b",
  "choices": [{
    "finish_reason": "stop",
    "message": {
      "role": "assistant",
      "reasoning_content": "The user wants …",
      "content": "…"
    }
  }],
  "usage": {
    "prompt_tokens": 70,
    "completion_tokens": 311,
    "completion_tokens_details": {"reasoning_tokens": 221}
  }
}

How thoroughly a model reasons, or whether it reasons at all, is controlled by many models via the chat_template_kwargs field of the request. The values depend on the model; for Qwen3.8-27B, the Qwen3.8-27B example lists them.

Costs

Requests to your deployments don't cost any tokens. You're billed for the running time of the deployment, regardless of how many requests it answers (see Billing).

Troubleshooting

Requests are rejected with 401

The key is missing or invalid. Check that you're using the key for requests and not the key for deployments, and whether it has been revoked or has expired.

Requests are rejected with 403

The response then reads something like "The requested model … is not available for this API key, or the model name is invalid". Check that the model field contains exactly the name of the deployment, that the deployment has the status Running and that the service account may access it. GET /models shows which names your key reaches.