For the complete documentation index, see llms.txt. This page is also available as Markdown.

Try Chatbot

Create chat completion

post

Generate a model response for a conversation. Supports streaming via SSE, tool calling, and RAG file search.

Authorizations
AuthorizationstringRequired

API key passed as a Bearer token. Generate your key at platform.qolaba.ai. Example: Authorization: Bearer sk-xxxxxxxxxxxx

Body
modelstring · enumRequired

Model ID to use for completion

Example: google/gemini-2.5-flashPossible values:
streambooleanOptional

If true, response is streamed as Server-Sent Events

Default: false
temperaturenumber · max: 2Optional

Sampling temperature. Lower values produce more deterministic output

Default: 1
max_tokensinteger · min: 1Optional

Maximum number of tokens to generate in the response

tool_choiceone ofOptional

Controls tool selection. auto lets the model decide, none disables tools, or specify a function name

string · enumOptionalPossible values:
or
file_search_store_namesstring[]Optional

RAG vector store names to search for context (format fileSearchStores/{storeId})

thread_idstringOptional

Conversation thread ID for multi-turn context tracking

user_idstringOptional

User identifier for analytics and tracking

webhookUrlstring · uriOptional

Webhook URL for async result delivery

metadataobjectOptional

Extra key/value metadata to attach to the request

Responses
200

Chat completion response

idstringOptional

Unique completion identifier

objectstring · enumOptionalPossible values:
createdintegerOptional

Unix timestamp of when the completion was created

modelstringOptional

Model used for the completion

post/chat/completions
POST /api/v1/chat/completions HTTP/1.1
Host: api.platform.qolaba.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 107

{
  "model": "google/gemini-2.5-flash",
  "messages": [
    {
      "role": "user",
      "content": "What is the capital of France?"
    }
  ]
}
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "created": 1720000000,
  "model": "google/gemini-2.5-flash",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "The capital of France is Paris."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "total_credit": 1,
    "total_cost": 0.0002,
    "raw_cost": 0.00015
  }
}

List chat models

get

Retrieve available chat models with their capabilities and supported modalities.

Authorizations
AuthorizationstringRequired

API key passed as a Bearer token. Generate your key at platform.qolaba.ai. Example: Authorization: Bearer sk-xxxxxxxxxxxx

Query parameters
modalitystringOptional

Filter models by modality (e.g. text, image)

Responses
200

List of available models

application/json
get/chat/models
GET /api/v1/chat/models HTTP/1.1
Host: api.platform.qolaba.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "id": "google/gemini-2.5-flash",
      "object": "model",
      "created": 1720000000,
      "owned_by": "google"
    },
    {
      "id": "google/gemini-2.5-pro",
      "object": "model",
      "created": 1720000000,
      "owned_by": "google"
    }
  ]
}

Upload file

post

Upload a file for RAG file search. The file is indexed into a vector store that can be referenced in chat completions via file_search_store_names.

Authorizations
AuthorizationstringRequired

API key passed as a Bearer token. Generate your key at platform.qolaba.ai. Example: Authorization: Bearer sk-xxxxxxxxxxxx

Body
urlstring · uriRequired

URL of the file to upload. Supported formats are .pdf, .txt, .doc, .docx

Example: https://example.com/document.pdf
store_namestringOptional

Optional name for the vector store. If omitted, a store is created automatically

Example: product-docs
Responses
200

File uploaded and indexed

application/json
successbooleanOptional

Whether the upload succeeded

store_namestringOptional

Vector store name in fileSearchStores/{storeId} format

file_namestringOptional

Name of the uploaded file

messagestringOptional

Status message

token_countintegerOptional

Number of tokens indexed from the file

estimated_cost_usdnumberOptional

Estimated cost in USD

creditUtilisationnumberOptional

Credits consumed for this upload

post/files
POST /api/v1/files HTTP/1.1
Host: api.platform.qolaba.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "url": "https://example.com/document.pdf"
}
{
  "success": true,
  "store_name": "fileSearchStores/store_abc123",
  "file_name": "document.pdf",
  "message": "File uploaded successfully",
  "token_count": 4520,
  "estimated_cost_usd": 0.002,
  "creditUtilisation": 1
}

Last updated

Was this helpful?