POST https://api.abstract.inc/v1/responses.
They do not answer on /v1/chat/completions. That route serves the robot models.
GET /v1/models lists these ids.
Use an id exactly as written. An id is a contract.
Request
string
required
One of the ids above.
string | array
The OpenAI Responses
input.boolean
true returns server-sent events. Live on :superfast, buffered on :async.integer
A positive integer, at most 65,536. Default 8,192 on
glm-5.3:superfast and 4,096 on the others.string
Not supported on any model.
boolean
true is not supported on a :superfast model.boolean
true is not supported on a :superfast model.invalid_request before it reserves any cost.
The request body is at most 2 MiB.
:async models
An:async model answers at once with a response whose status is queued or in_progress.
Save its id.
Poll GET /v1/responses/{id} until status is completed, failed, cancelled or incomplete.
The job goes on when you disconnect.
Use these models for long work nobody waits on.
not_found.
Buffered streaming
"stream": true on an :async model returns a buffered stream:
response.created, thenresponse.queuedorresponse.in_progress.: keepalivecomments while the job runs.- The whole output as Responses events after the job finishes, then the terminal event and
data: [DONE].
X-Abstract-Streaming: buffered and a Location header with the response’s path.
Buffered streaming does not shorten the time to the first token.
A connection lasts at most 30 minutes, then ends with an error event whose code is stream_timeout.
Closing the connection cancels nothing.
Get the result with GET /v1/responses/{id}, or repeat the same POST with the same Idempotency-Key.
:superfast models
A:superfast model completes the response inline.
Set "stream": true for live server-sent events when a person is waiting.
Idempotency-Key
Idempotency-Key is an optional header of 1 to 200 characters from A-Z a-z 0-9 _ . / : -.
- The same POST with the same key returns the same response and never starts a second job.
- The same key with a different body returns HTTP 409
idempotency_conflict. - Use a new key for a new request.
- An accepted POST answers with an
Idempotency-Keyheader. The API generates one when you send none.
OpenAI SDK
Set the base URL tohttps://api.abstract.inc/v1 and read the key from ABSTRACT_API_KEY.
ABSTRACT_API_KEY="$(abstract token)" python async_poll.py.
Usage
A finished response carriesusage with input_tokens, input_tokens_details.cached_tokens and output_tokens.
The response is billed from those counts at the model’s per-million-token rates for input, cached input and output.
abstract.inc shows each model’s output rate.
The rates are fixed when you submit the request.
The model field in every answer is the public id you sent.