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