Get started

Quickstart

Make your first Civix API call in under five minutes.


The Civix Inference API is OpenAI-compatible. If you already have code that talks to OpenAI, you only need to change two things: the base URL and the API key.

Private beta. Access is currently by invitation. Request a key through the contact form and we will get back to you.

Base URL

https://api.civix.com.vn/v1

Your first request

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_CIVIX_API_KEY",
    base_url="https://api.civix.com.vn/v1",
)

response = client.chat.completions.create(
    model="qwen3.8-27b",
    messages=[{"role": "user", "content": "Explain what a surrogate model is."}],
)

print(response.choices[0].message.content)

The same call with curl:

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

Streaming

For anything longer than a short answer, stream it. Streaming is not just a UX preference here — non-streaming requests are bounded by a server-side deadline, while streamed requests are not.

stream = client.chat.completions.create(
    model="qwen3.8-27b",
    messages=[{"role": "user", "content": "Write a detailed technical summary."}],
    stream=True,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="", flush=True)

See Streaming for details, including the keepalive comments the API may send while a long prompt is being processed.

Next steps