Responses
The OpenAI-style Responses endpoint (stateless), request parameters, and streaming events
POST /v1/responses is the OpenAI-style Responses endpoint. It serves clients that default to the Responses API, including the Vercel AI SDK and Codex-style agents, without code changes. It runs the same model and pipeline as Chat Completions.
This endpoint is stateless. Ablatic never stores conversation content server-side, so store: true, previous_response_id, and background: true are rejected with a 400. Send the full conversation in input on every request.
Request
Authenticate with Authorization: Bearer sk-ablatic-....
curl https://api.ablatic.ai/v1/responses \
-H "Authorization: Bearer $ABLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "talos-preview",
"input": "Write a haiku about Linz"
}'input is either a string or an array of items (messages, function_call, function_call_output).
| Field | Type | Purpose |
|---|---|---|
model | string | talos-preview (or talos) |
input | string | array | The prompt or the full item list |
instructions | string | System instructions |
tools | array | Function tools in the flat Responses shape {type, name, description, parameters} |
tool_choice | string | object | auto / none / required or {type, name} |
reasoning | object | { "effort": "low" | "medium" | "high" } selects the thinking depth |
text | object | { "format": { "type": "json_schema", ... } } for structured output |
max_output_tokens | integer | Output cap, 1 to 200000 |
temperature, top_p | number | Sampling controls |
stream | boolean | Stream Responses events over SSE |
Response
A non-streaming call returns a response object. output holds a message item with an output_text part, plus one function_call item per tool call. usage reports input_tokens, output_tokens, and output_tokens_details.reasoning_tokens. store is always false.
Streaming
Set "stream": true. The endpoint emits the Responses event graph: response.created, response.in_progress, response.output_item.added, response.content_part.added, response.output_text.delta (repeated), the matching .done events, and response.completed carrying the final object and usage. There is no [DONE] sentinel. Tool calls stream as response.function_call_arguments.delta.
Reasoning
reasoning.effort selects the thinking depth. When the reasoning trace is enabled for your API key (toggle it in the console), the response returns it as a reasoning output item whose summary holds the trace text; streaming delivers it as response.reasoning_summary_text.delta events ahead of the answer. usage.output_tokens_details.reasoning_tokens reports the token count either way.
SDKs
openai (Python)
from openai import OpenAI
client = OpenAI(base_url="https://api.ablatic.ai/v1", api_key="sk-ablatic-...")
resp = client.responses.create(model="talos-preview", input="Hello")
print(resp.output_text)Vercel AI SDK
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";
const ablatic = createOpenAI({ baseURL: "https://api.ablatic.ai/v1", apiKey: "sk-ablatic-..." });
const { text } = await generateText({ model: ablatic("talos-preview"), prompt: "Hello" });