Reference

OpenAI compatibility

What works with the OpenAI SDKs, and where we differ.


Civix implements the OpenAI Chat Completions wire format, so the official SDKs work by changing base_url and api_key.

from openai import OpenAI

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

const client = new OpenAI({
  apiKey: process.env.CIVIX_API_KEY,
  baseURL: "https://api.civix.com.vn/v1",
});

Supported

Capability Status
client.chat.completions.create() Supported
stream=True / SSE Supported
client.models.list() Supported
Multimodal image input Supported
max_tokens, temperature, top_p, stop, seed Supported
Bearer authentication Supported

Not available

These are not implemented, and we would rather say so than let you discover it at runtime:

Capability Status
Embeddings (/v1/embeddings) Not available
Responses API (/v1/responses) Not available
Assistants, threads, files Not available
Function / tool calling Not available
Audio, image generation Not available
Fine-tuning Not available

Differences to be aware of

Keepalive comments. During long prompt processing, streamed responses may include SSE comment lines (: ping). The SSE specification requires clients to ignore them and the official SDKs do. Only custom parsers need care — see Streaming.

Error bodies. Our errors use the Civix envelope, which carries a stable code, a request_id, and an explicit retryable flag. It is not byte-identical to OpenAI's error shape. SDK exception handling still works; read e.response.json()["error"] for the details. See Errors.

Non-streaming deadline. Non-streaming requests are bounded server-side and return 504 UPSTREAM_TIMEOUT if exceeded. OpenAI does not behave this way. Stream long generations.

Model names. Civix model IDs are our own — there is no gpt-* model here. Always read the ID from GET /v1/models.

/v1 is an allowlist. Only the documented endpoints exist. Any other /v1/... path returns 404 NOT_FOUND — SDK helpers for unsupported features will fail fast with a clear error rather than behaving unpredictably.