KAISTA CLOUDAPI Docs
KAISTA CLOUD API / V1

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.

Authorization: Bearer kc_your_api_key

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.

https://kaistacloud.com/v1
API VERSIONv1
AUTHBearer kc_…
CONTENT TYPEapplication/json
STREAMINGNot yet supported

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.

PYTHON
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)
JAVASCRIPT
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);
GET/v1/models

List models that have been synced, priced, and enabled for use.

POST/v1/chat/completions

Create 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"}
    ]
  }'
POST/v1/completions

Create 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.

StatusCodeWhat to do
400invalid_request

Check the JSON body and model field.

401invalid_api_key

Confirm the key is active and uses bearer authentication.

402insufficient_credits

Add credits or wait for the model to be priced.

413body_too_large

Reduce the request body below 2 MB.

501stream_not_ready

Use a non-streaming response for now.

502upstream_unavailable

Retry with backoff; contact support if it persists.

503platform_not_configured

The 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.

RESPONSE HEADERX-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 →