Botat
OpenAI-compatible setup

Configure an OpenAI SDK base URL for DeepSeek, Qwen, and Kimi routes.

Overseas developers can often test Chinese-strong models through the same OpenAI-style SDK shape. The important part is to keep base URL, API key, model ID, and capability flags explicit instead of assuming every compatible route behaves identically.

Minimal environment shape

Start with provider configuration, not application rewrites. Most integration bugs are easier to isolate when your app can swap the base URL and model ID without changing business logic.

OPENAI_BASE_URL=https://api.example.com/v1
OPENAI_API_KEY=your_api_key
OPENAI_MODEL=your_verified_model_id

Verify the exact Botat model IDs inside your account before publishing production examples. Public pages should avoid hard-coded model names unless they have been checked in the current account.

Node.js SDK example

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
  baseURL: process.env.OPENAI_BASE_URL
});

const response = await client.chat.completions.create({
  model: process.env.OPENAI_MODEL,
  messages: [{ role: "user", content: "Reply with one short sentence." }],
  stream: false
});

console.log(response.choices[0]?.message?.content);

If this fails, test with raw curl before debugging framework wrappers. Check whether the base URL already includes /v1, whether the key has access to the model, and whether the route supports the parameters your SDK sends by default.

Python SDK example

from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["OPENAI_API_KEY"],
    base_url=os.environ["OPENAI_BASE_URL"],
)

response = client.chat.completions.create(
    model=os.environ["OPENAI_MODEL"],
    messages=[{"role": "user", "content": "Reply with one short sentence."}],
    stream=False,
)

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

Compatibility checks before production

Request shape

Confirm /v1/chat/completions, auth headers, model IDs, timeouts, and retry behavior before wiring the provider into your app.

Feature parity

Test response_format, tools, streaming deltas, strict JSON schema, sampling params, and provider-specific fields separately.

Observability

Log sanitized status codes, model IDs, latency, and unsupported parameter names. Do not log prompts, API keys, or confidential payloads.

Fallback

Keep a fallback route or prompt-level JSON validation path for retryable workloads where unsupported provider features are acceptable.

Where Botat fits

Botat is an OpenAI-compatible gateway for overseas developers evaluating DeepSeek, Qwen, Kimi, and other Chinese-strong routes for non-sensitive Chinese content, batch processing, coding assistance, localization checks, and retryable tasks.

Do not send sensitive personal data, confidential customer data, regulated data, or workloads with strict residency requirements through China-model routes.