Chat completions
Create a chat completion
An LLM model answers an OpenAI Chat Completions body.
POST
/
v1
/
chat
/
completions
curl --request POST \
--url https://api.abstract.inc/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "glm-5.3-flash",
"stream": true,
"messages": [
{
"role": "user",
"content": "Write a haiku about a robot arm."
}
]
}
'
{
"id": "gen-3f9a1c2b7d4e",
"object": "chat.completion",
"created": 1790000000,
"model": "glm-5.3-flash",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "A robot arm folds a towel."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 650,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens": 30,
"total_tokens": 680
}
}{
"error": {
"message": "Robot models are served at POST /v1/get_action, not /v1/chat/completions.",
"type": "invalid_request_error",
"code": "use_get_action"
}
}{
"error": {
"message": "Invalid API key.",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}It returns the answer in the HTTP response, or as server-sent events with
stream: true.
For robot action models, use get_action.Authorizations
Headers
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 Body
application/json
โI
curl --request POST \
--url https://api.abstract.inc/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "glm-5.3-flash",
"stream": true,
"messages": [
{
"role": "user",
"content": "Write a haiku about a robot arm."
}
]
}
'
{
"id": "gen-3f9a1c2b7d4e",
"object": "chat.completion",
"created": 1790000000,
"model": "glm-5.3-flash",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "A robot arm folds a towel."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 650,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens": 30,
"total_tokens": 680
}
}{
"error": {
"message": "Robot models are served at POST /v1/get_action, not /v1/chat/completions.",
"type": "invalid_request_error",
"code": "use_get_action"
}
}{
"error": {
"message": "Invalid API key.",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"retryable": true,
"retry_after_s": 123,
"request_id": "<string>",
"param": "<string>"
}
}