API Reference
The KoboiLLM API is an OpenAI-compatible proxy gateway providing unified access to 100+ LLM models under standard endpoints.
Base URL: https://api.koboillm.com/v1
Authentication: Send Authorization: Bearer sk-xxxxxx with your application API key.
Responses
POST /v1/responses
The Chat page supports Chat Completions and Responses. Use API Quickstart for a copyable request, and check that your key can use the selected model.
curl https://api.koboillm.com/v1/responses \ -H "Authorization: Bearer sk-xxxxxx" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.6-luna", "input": "Reply with one word: ready" }'This endpoint uses input and returns Responses output items; do not read it as choices[0].message.content. Parameters vary by model.
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://api.koboillm.com/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-xxxxxx" \ -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://api.koboillm.com/v1/embeddings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-xxxxxx" \ -d '{ "model": "text-embedding-3-small", "input": "The quick brown fox jumps over the lazy dog" }'