Use the interface you knowacross model providers.
Kaista Cloud provides OpenAI-compatible endpoints. Replace the base URL and API key with your Kaista Cloud credentials to keep using your existing SDK or HTTP client.
Authentication
All model endpoints use bearer authentication. Create an API key beginning with kc_ in the console; the raw key is shown only once.
Base URL and compatibility
Point the OpenAI SDK at Kaista Cloud to keep using familiar Chat Completions calls. Read API keys from server-side environment variables only—never ship them in browser code.
Use the official OpenAI SDK
Kaista Cloud uses compatible request and response shapes, so Python and JavaScript clients only need a different base URL and API key.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://kaistacloud.com/v1",
api_key=os.environ["KAISTA_CLOUD_API_KEY"],
)
response = client.chat.completions.create(
model="your-model-id",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://kaistacloud.com/v1",
apiKey: process.env.KAISTA_CLOUD_API_KEY,
});
const response = await client.chat.completions.create({
model: "your-model-id",
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);/v1/modelsList models that have been synced, priced, and enabled for use.
/v1/chat/completionsCreate a chat completion. The first release supports non-streaming responses so every request can be reconciled against usage.
curl -X POST https://kaistacloud.com/v1/chat/completions \
-H "Authorization: Bearer kc_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "your-model-id",
"messages": [
{"role": "user", "content": "Hello"}
]
}'/v1/completionsCreate a legacy text completion for clients that still use the prompt format.
Error shape and status codes
Errors use a consistent JSON envelope. Branch on the HTTP status code instead of parsing human-readable error messages.
invalid_requestCheck the JSON body and model field.
invalid_api_keyConfirm the key is active and uses bearer authentication.
insufficient_creditsAdd credits or wait for the model to be priced.
body_too_largeReduce the request body below 2 MB.
stream_not_readyUse a non-streaming response for now.
upstream_unavailableRetry with backoff; contact support if it persists.
platform_not_configuredThe platform is not live yet. Try again later.
Usage and billing
Kaista Cloud reserves an estimated amount before each request. Once the upstream returns token usage, the platform settles the final price and immediately releases any unused reserve.
Limits, timeouts, and request tracing
The first release uses non-streaming settlement, accepts JSON bodies up to 2 MB, and waits up to 120 seconds for the upstream. Successful responses include a request ID for support tracing.
X-Kaista-Cloud-Request-Id: 7e…Include this response header when reporting an issue. Never send your full API key or prompt content.
Do not hard-code model IDs
Availability can change with the upstream catalog. Refresh GET /v1/models periodically and use only returned model IDs. Unpriced or disabled models are excluded from the usable catalog.
curl https://kaistacloud.com/v1/models \
-H "Authorization: Bearer kc_your_api_key"Security and data handling
Request content is proxied through Kaista Cloud to the TongYuan upstream. The Kaista Cloud usage ledger stores model, token, cost, and status metadata—not prompt or response bodies. Infrastructure and upstream providers may maintain logs under their own policies.
Open the Trust Center and full data flow →