Text generation
Generate chat completions with Talos m1
Send a list of messages and get a text reply with POST /v1/chat/completions.
from openai import OpenAI
client = OpenAI(
base_url="https://api.ablatic.ai/v1",
api_key="sk-ablatic-...",
)
resp = client.chat.completions.create(
model="talos",
messages=[
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Name three rivers in Austria."},
],
temperature=0.7,
max_tokens=512,
)
print(resp.choices[0].message.content)Messages
The messages array carries the conversation. Each item has a role and content. Three roles are used:
systemsets behavior and instructions for the model.useris the human turn.assistantis a prior model turn, which you include to continue a conversation.
You can send 1 to 200 messages. The full context window is 200000 tokens.
Parameters
| Parameter | Type | Notes |
|---|---|---|
model | string | Defaults to talos. |
messages | array | Required. 1 to 200 items. |
temperature | number | 0 to 2. Higher is more random. |
max_tokens | integer | 1 to 200000. Caps the generated reply. |
top_p | number | Nucleus sampling. |
reasoning_effort | string | none/minimal (fast), low (brief thinking), medium (thinking), high/xhigh/max (thinking, larger reasoning budget). |
Reasoning effort
talos runs in thinking mode by default. The reasoning_effort field controls how much the model reasons before answering: none and minimal map to fast, low to brief thinking, medium to thinking, and high (and xhigh/max) raise the reasoning-token budget. When you omit reasoning_effort, the request runs in thinking mode, not the fastest path.
For the lowest latency, set reasoning_effort to none, which selects fast mode.
resp = client.chat.completions.create(
model="talos",
reasoning_effort="none",
messages=[{"role": "user", "content": "Give me a one-line summary."}],
)Thinking consumes output tokens, so set max_tokens high enough for the reasoning to finish. Too small a value fails with an error rather than returning a partial answer. Use a large max_tokens (1024 or more) for high effort (high/xhigh/max), which reasons longer and runs slower. See Reasoning.
Response
The response is a chat.completion object. The reply text is in choices[0].message.content. The usage object reports prompt_tokens, completion_tokens, and total_tokens. A reasoning_tokens count appears when the model reasons.