Skip to content

Core Access Parameters ​

When integrating with CloudAIKit, the most important items are the Base URL, API Token, model name, and request headers. A mismatch in any one of these may result in authentication failure, an unavailable model, or an inability for the client to connect.

Parameter Overview ​

ParameterExampleDescription
Base URLhttps://api.cloudaikit.com/v1Root URL of the platform's OpenAI-compatible API
API Keysk-...API Token created in the console
Modelgpt-4o-miniName of the callable model displayed by the platform
AuthorizationBearer sk-...Authentication request header; there is a space between Bearer and the Key
Content-Typeapplication/jsonMust be set for JSON requests

Should the Base URL Include /v1 ​

The baseURL or base_url of most SDKs should include /v1. However, some clients use field names such as API Host, Endpoint, or Proxy, and may automatically append /v1/chat/completions. If a 404 occurs, check whether /v1 was accidentally duplicated as /v1/v1, or omitted entirely.

API Key Security ​

  • Do not provide the same Token to multiple teams or external customers at the same time.
  • It is recommended to create separate Tokens for client debugging and production.
  • If a Token is exposed, delete the old Token immediately, create a new one, and update the application configuration.
  • Do not directly expose long-lived Tokens on frontend web pages.

Common Configuration Errors ​

SymptomPossible Cause
401Token is missing, incorrectly formatted, deleted, or expired
403User group, model permissions, Token permissions, or IP allowlist does not permit access
404Incorrect Base URL path, an unexpected client-generated path, an incorrect model name, or the model is unavailable or has been discontinued
429User, Token, model, channel, or upstream rate limit has been triggered

Minimal Request Example ​

You can first use the following request to verify whether the address, authentication, and model are available:

bash
curl "$BASE_URL/chat/completions" \
  -H "Authorization: Bearer $CLOUDAIKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"你好"}]}'

BASE_URL should include /v1, for example, https://api.cloudaikit.com/v1. If the client automatically appends /v1, do not enter it again. When verification fails, first break the issue down and check the “address, request headers, and model name” separately.