Skip to main content
POST

Request

Headers

string
required
Bearer token with your API key
string
required
application/json

Body - Direct Messages Mode (OpenAI Compatible)

string
default:"qcall/slm-3b-int4"
The model to use for completion
array
required
Array of message objects with role and content
boolean
default:"true"
Enable streaming response (Server-Sent Events)
number
default:"20"
Top-k sampling parameter for response generation
object
Template configuration options
boolean
default:"false"
Enable thinking mode in the model
array
Array of tool/function definitions for function calling

Body - Enhanced Text Correction Mode

string
required
The text to correct/improve
array
Array of term-replacement pairs for custom corrections
string
The term to find and replace
string
The replacement text
object
Style configuration for text correction
string
Tone to apply (e.g., “professional”, “casual”, “friendly”)
boolean
Automatically capitalize sentences
boolean
Add proper punctuation
boolean
Whether to use contractions (false to expand them)
boolean
Expand abbreviations to full form
string
Application context (e.g., “email”, “chat”, “document”)
boolean
default:"true"
Save conversation to chat history
string
Existing chat ID to continue conversation

Response

array
Array of completion choices
object
The generated message with role and content
object
Streaming delta with incremental content (stream mode only)
string
ID of the chat session (for new chats)
object
Token usage information
number
Total tokens used in the request
number
Response time in milliseconds

Streaming Response

When stream: true, the response is sent as Server-Sent Events (SSE):
  1. chat_id event - Sent first for new chats
  2. content chunks - Delta updates with incremental content
  3. done event - Signals completion with response time
  4. [DONE] - Final termination signal
Define tools/functions that the model can call during conversation:
The model will respond with tool calls that you can execute and send back the results.

Text Correction Features

Define custom term replacements that will always be applied:
Up to 100 dictionary entries are supported, each with a maximum length of 200 characters.
Configure how the text should be corrected and styled:
Provide context to help the model adjust its corrections:
Supported contexts: “email”, “chat”, “document”, “message”, “social”
Token costs are calculated based on usage. The current rate is approximately $0.00002 per token. Costs are deducted from your workspace billing balance.
Chat history is automatically saved when save_chat: true. Use chat_id to continue existing conversations or create new chats by omitting this parameter.