API Reference
The KoboiLLM API is an OpenAI-compatible proxy gateway providing unified access to 100+ LLM models under standard endpoints.
Base URL: https://lite.koboillm.com/v1 (or https://api.koboillm.com/v1)
Authentication: Include your API Key in the request header Authorization: Bearer *** or x-litellm-api-key: ***
Chat Completions
Endpoint for model conversations and completions.
POST /v1/chat/completions
Creates a chat completion following the standard OpenAI Chat API specification.
Request Body Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Target Model ID (e.g., openai/gpt-4o-mini, anthropic/claude-3-5-sonnet) |
messages | array | Yes | Array of message objects |
temperature | number | No | Sampling temperature (0.0 to 2.0), default 1.0 |
max_tokens | integer | No | Maximum token response limit |
stream | boolean | No | Enable server-sent event (SSE) streaming |
top_p | number | No | Nucleus sampling probability |
frequency_penalty | number | No | Frequency penalty (-2.0 to 2.0) |
presence_penalty | number | No | Presence penalty (-2.0 to 2.0) |
stop | string/array | No | Stop sequences |
tools | array | No | Tool and function definitions for tool calling |
tool_choice | string/object | No | Controls tool invocation behavior |
response_format | object | No | Enforce JSON output (e.g., { "type": "json_object" }) |
cURL Request Example:
curl -X POST https://lite.koboillm.com/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer *** \ -d '{ "model": "openai/gpt-4o-mini", "messages": [ {"role": "user", "content": "Hello, how are you?"} ] }'JSON Response Example:
{ "id": "chatcmpl-123", "object": "chat.completion", "created": 1677652288, "model": "openai/gpt-4o-mini", "choices": [{ "index": 0, "message": { "role": "assistant", "content": "Hello! I'm doing well, thank you for asking!" }, "finish_reason": "stop" }], "usage": { "prompt_tokens": 10, "completion_tokens": 15, "total_tokens": 25 }}Embeddings
POST /v1/embeddings
Generate text embeddings for semantic search, RAG, and classification.
Request Body Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Embedding model ID (e.g., text-embedding-3-small, gemini/gemini-embedding-2) |
input | string/array | Yes | Input text string or array of strings to embed |
cURL Request Example:
curl -X POST https://lite.koboillm.com/v1/embeddings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer *** \ -d '{ "model": "text-embedding-3-small", "input": "The quick brown fox jumps over the lazy dog" }'