Chat completions
POST https://API_HOST/v1/chat/completions generates a model response from a list of messages. The request and response follow the OpenAI chat completions format.
Request
{
"model": "MODEL_ID",
"messages": [
{"role": "system", "content": "You are a security analyst. Answer precisely."},
{"role": "user", "content": "Explain what this function does: ..."}
],
"temperature": 0.7,
"max_tokens": 1024
}
| Parameter | Type | Description |
|---|---|---|
model | string, required | Model id from GET /models |
messages | array, required | Conversation so far. Roles: system,
user, assistant, tool |
max_tokens | integer | Upper bound on generated tokens |
temperature | number | Sampling temperature. Lower is more deterministic |
top_p | number | Nucleus sampling |
stop | string or array | Sequences that end generation |
stream | boolean | Send the response as server-sent events. See streaming |
tools | array | Functions the model may call |
tool_choice | string or object | Controls whether and which tool is called |
Response
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "MODEL_ID",
"choices": [
{
"index": 0,
"message": {"role": "assistant", "content": "..."},
"finish_reason": "stop"
}
],
"usage": {"prompt_tokens": 42, "completion_tokens": 128, "total_tokens": 170}
}
usage is the basis for billing. finish_reason is stop,
length (hit max_tokens or the context limit) or tool_calls.
Context window
Input and output share a window of 245,760 tokens. A request whose prompt plus max_tokens
exceeds it is rejected with a 400 error.
Tool calls
Declare functions in tools. When the model decides to call one, the response contains
tool_calls instead of text. Run the function yourself, then send its result back in a
tool message.
{
"model": "MODEL_ID",
"messages": [{"role": "user", "content": "Is port 443 open on the lab host?"}],
"tools": [{
"type": "function",
"function": {
"name": "check_port",
"description": "Check a TCP port on a host inside the authorised lab",
"parameters": {
"type": "object",
"properties": {"host": {"type": "string"}, "port": {"type": "integer"}},
"required": ["host", "port"]
}
}
}]
}
The model never executes anything. It returns the name and arguments of the call; your code decides whether to run it.
Fallback model
If the abliterated model is unavailable, the gateway serves the request with the standard version of the same model instead of failing. That version applies its usual refusals: a pipeline that depends on the absence of refusals must tolerate an occasional one.
System prompts
An abliterated model follows the system prompt like its base model. Use it to set role, format and scope. You do not need jailbreak phrasing: say plainly what you need.
Last updated: 2 December 2026