Skip to main content
POST
It returns the answer in the HTTP response, or as server-sent events with stream: true. For robot action models, use get_action.

Authorizations

Authorization
string
header
required

Your Abstract API key. Get it with abstract login, pass it as $(abstract token).

Headers

Abstract-Version
enum<string>

The API version your client was written for. 2026-10-27 is the only version. Without this header the request is answered under the newest version; a version the API does not answer is refused with 400 unsupported_api_version before anything runs.

Available options:
2026-10-27
Idempotency-Key
string

The same POST with the same key returns the same answer and never starts a second job. 1 to 200 characters from A-Z a-z 0-9 _ . / : -.

Pattern: ^[A-Za-z0-9_./:-]{1,200}$

Body

application/json
model
enum<string>
required
Available options:
kimi-k3.1-pro,
glm-5.3,
glm-5.3-flash,
deepseek-v4.1-flash
messages
object[]
required

role is system, developer, user or assistant. content is a string or an array of text parts; a user message can also carry image_url parts, each a base64 data: URL.

Minimum array length: 1
max_completion_tokens
integer
default:65536

Counts the model's reasoning as well as its answer.

Required range: 1 <= x <= 65536
max_tokens
integer

The same as max_completion_tokens.

Required range: 1 <= x <= 65536
stream
boolean
default:false

Live server-sent events.

stream_options
object

Accepted. Usage always arrives in its own chunk before data: [DONE].

response_format
object

text, json_object, or json_schema with a named json_schema object.

reasoning_effort
string
temperature
number
top_p
number
user
string
metadata
object
prompt_cache_key
string
n
integer
store
boolean

Response

The LLM chat completion.

id
string
required
object
string
required
Allowed value: "chat.completion"
created
integer
required

Unix seconds.

model
string
required
choices
object[]
required
usage
object
required