Artificial Intelligence (AI)
Introduction
The AI Service is a scalable cloud platform for accessing advanced AI models. It helps developers, business owners, and startups easily leverage the power of Large Language Models (LLMs) without the need for complex infrastructure.
Features
1. LLM as a Service (LLMaaS)
- Cloud-based API access for fast and easy use.
- Fully compatible with standard OpenAI clients.
- High scalability suitable for small projects to large enterprises.
- Switch between models, providers, and endpoints with minimal changes.

2. Chat with AI Models
- Unified interface for testing and interacting with models.
- Evaluate and compare models in a simple, user-friendly environment.
- Access to over 80 top models from leading global providers.

Benefits
- Reduced development time and infrastructure costs.
- Access to the latest models without worrying about updates.
- Suitable for development teams, startups, and scalable businesses.
API Guide
Authentication
All requests must include the following header:
Authorization: Bearer YOUR_API_KEY
Example: Sending a Message to a Model
curl https://aiaas.kubit.cloud/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5",
"messages": [
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Hello! Can you tell me a short story?"}
]
}'
Sample Response:
{
"id": "chatcmpl-12345",
"object": "chat.completion",
"created": 1758730329,
"model": "openai/gpt-5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Once upon a time..."
},
"finish_reason": "stop"
}
]
}
OpenAI Responses Contract
In addition to chat/completions, the service supports the OpenAI Responses contract, used by tools that speak the Responses API natively (such as Codex):
curl https://aiaas.kubit.cloud/api/v1/responses \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash",
"input": "Write a Python function that reverses a string."
}'
Anthropic Messages Contract
The service also supports the Anthropic Messages contract so tools that speak the Messages API natively (such as Claude Code) can connect without code changes. The key may also be sent in the x-api-key header:
curl https://aiaas.kubit.cloud/api/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Write a Python function that reverses a string."}
]
}'
The model you select is resolved from Kubit's catalog and is not limited to the vendor of that contract — for example, you can call a Gemini model through /responses or a GPT model through /messages.
Decisions with OpenAI Decisions
Use https://ai.kubit.cloud/api/v1/decisions to classify text or select a specific answer.
This endpoint accepts the OpenAI Decisions contract: provide the input in input and an array of questions in questions.
Question types include predicate to evaluate a statement, choice to select an option, and score to assign a score.
Choose a model that supports decisions; find its ID in the model list at https://ai.kubit.cloud/api/v1/models.
In this example, the model selects a support request priority from two options: urgent and normal.
Each option has a value returned in the answer and a description explaining when to select it.
Replace YOUR_API_KEY with your Kubit API key:
curl -i -sS https://ai.kubit.cloud/api/v1/decisions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-6-luna-decisions",
"input": "I cannot sign in and my entire team is unable to work. We have no workaround.",
"questions": [{
"type": "choice",
"name": "priority",
"instructions": "Classify the support request by its impact on the customer.",
"choices": [
{"value": "urgent", "description": "Work is blocked and no workaround is available."},
{"value": "normal", "description": "Work can continue or a workaround is available."}
]
}]
}'
Answers are returned in the answers array in the same order as the questions.
For this example, the answers portion of the response could look like this: choice identifies the selected option,
confidence gives the confidence level, and probabilities gives the probability of each option.
These numbers are examples and may vary between requests:
{
"answers": [
{
"type": "choice",
"name": "priority",
"choice": "urgent",
"confidence": 0.96,
"probabilities": [
{"value": "urgent", "probability": 0.96},
{"value": "normal", "probability": 0.04}
]
}
]
}
Decisions with System One
Clients using the System One contract, such as TypeSafe clients and Microsoft decision models, can use
https://ai.kubit.cloud/api/v1/systemone. Provide the input in state, use an object with named keys for questions,
and define the options for a choice question in criteria.
The endpoint also supports noul to evaluate a statement and score to assign a score.
The example below calls the same model with the same two options as the OpenAI Decisions example, using the System One format. The contract does not restrict models to its original vendor; the selected model must support this type of request:
curl -i -sS https://ai.kubit.cloud/api/v1/systemone \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-6-luna-decisions",
"state": "I cannot sign in and my entire team is unable to work. We have no workaround.",
"questions": {
"priority": {
"type": "choice",
"instructions": "Classify the support request by its impact on the customer.",
"criteria": {
"urgent": "Work is blocked and no workaround is available.",
"normal": "Work can continue or a workaround is available."
}
}
}
}'
Answers use the same keys as the questions; in this example, the selected option is at answers.priority.choice.
The answers portion could look like this. In this contract, confidence and probabilities are optional
and may be omitted by the provider:
{
"answers": {
"priority": {
"type": "choice",
"choice": "urgent",
"confidence": 0.96,
"probabilities": {"urgent": 0.96, "normal": 0.04}
}
}
}
If your client appends v1/systemone, set its base URL to https://ai.kubit.cloud/api.
If it appends only systemone, use https://ai.kubit.cloud/api/v1.
Connecting Coding Agents
Codex
Create ~/.codex/config.toml with the following content:
model_provider = "kubit"
model = "google/gemini-2.5-flash"
[model_providers.kubit]
name = "kubit"
base_url = "https://aiaas.kubit.cloud/api/v1"
[model_providers.kubit.auth]
command = "sh"
args = ["-c", "echo $KUBIT_API_KEY"]
Then export your key and run Codex:
export KUBIT_API_KEY="YOUR_API_KEY"
codex
Write base_url up to /api/v1; Codex appends the /responses path itself.
Claude Code
Set the following environment variables so Claude Code connects to Kubit instead of Anthropic's servers:
export ANTHROPIC_BASE_URL="https://aiaas.kubit.cloud/api"
export ANTHROPIC_API_KEY="YOUR_API_KEY"
export ANTHROPIC_MODEL="openai/gpt-5"
claude
Switching Between Models
Simply change the model value in the request; no need to modify the code structure.
Use Cases
- Intelligent chatbots
- Text and data analysis
- Customer support
- Smart content generation and marketing
- Evaluation and comparison of AI model performance