> ## Documentation Index
> Fetch the complete documentation index at: https://abstract-pbc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> The HTTP endpoints of api.abstract.inc.

| Item | Value |
| - | - |
| Base URL | `https://api.abstract.inc` |
| Authentication | `Authorization: Bearer` with your API key for inference; WorkOS sign-in for CLI credentials |
| Request and answer bodies | JSON, server-sent events when `stream` is `true` |
| Version | `Abstract-Version: 2026-10-27`, optional; see [Versions and request ids](#versions-and-request-ids) |
| Request id | `Request-Id` on every answer |

These pages do not send requests. Run requests from your own machine, with the key in your program's environment:

```sh theme={"theme":"css-variables"}
curl -s https://api.abstract.inc/v1/models -H "Authorization: Bearer $(abstract token)"
```

Every error has the same body. See [Errors and limits](https://abstract-pbc.mintlify.site/errors.md).

## Versions and request ids

Send `Abstract-Version` to pin the API version your client was written for.
`2026-10-27` is the only version.
A request without the header is answered under the newest version.
A version the API does not answer is refused with `400 unsupported_api_version` before anything runs, so nothing is billed.
Every answer names the version it was made under in its own `Abstract-Version` header.

```sh theme={"theme":"css-variables"}
curl -s https://api.abstract.inc/v1/models \
  -H "Authorization: Bearer $(abstract token)" \
  -H "Abstract-Version: 2026-10-27" -D - -o /dev/null
```

Every answer from a `/v1/` route carries a `Request-Id` header: `req_` and 32 hex characters, new for each HTTP attempt, a retry included.
An error repeats it in its body as `error.request_id`, and a robot route's error also as `status.request_id`.
Quote it when you report a problem.
A robot answer also carries `X-Trace-Id`, which names the reply rather than the attempt: a replayed answer keeps its trace. See [Robot action API](https://abstract-pbc.mintlify.site/robots/get-action.md).

> [card] [Chat completions](https://abstract-pbc.mintlify.site/api-reference/chat-completions/create-a-chat-completion.md)
>
> The LLM models.

> [card] [Robot actions](https://abstract-pbc.mintlify.site/api-reference/end-effector/turn-one-observation-into-one-pose-chunk-per-arm.md)
>
> End-effector and native joint action models.

> [card] [Catalog](https://abstract-pbc.mintlify.site/api-reference/catalog/list-llm-models.md)
>
> The LLM model ids.

## Chat completions

| Endpoint | Serves |
| - | - |
| [`POST /v1/chat/completions`](https://abstract-pbc.mintlify.site/api-reference/chat-completions/create-a-chat-completion) | An LLM model: the OpenAI Chat Completions API. |
| [`GET /v1/chat/completions/{completion_id}`](https://abstract-pbc.mintlify.site/api-reference/chat-completions/retrieve-a-chat-completion) | An LLM completion your account created |
| [`GET /v1/models`](https://abstract-pbc.mintlify.site/api-reference/catalog/list-llm-models) | The LLM model ids |

The `model` in the body names an LLM model: `family-version`, with an optional variant (`glm-5.3`, `glm-5.3-flash`). A robot model id (`origin/model`) is refused with `use_get_action`.

## Robot actions

| Endpoint | Serves |
| - | - |
| [`POST /v1/get_action`](https://abstract-pbc.mintlify.site/api-reference/end-effector/turn-one-observation-into-one-pose-chunk-per-arm) | One observation in, one chunk in the selected model's action space out |
| [`POST /v1/end_session`](https://abstract-pbc.mintlify.site/api-reference/end-effector/end-an-episode) | Ends an episode before its idle expiry. Not billed. |

Use `GET /v1/environments/models` for the available robot IDs. YAM models and Xiaomi's
native ARX X5 checkpoint return end-effector chunks. FLUX's DROID checkpoint takes native Franka joint
state and returns `actions.joint_chunk` with `action_space: "joint_position"`. Their camera
roles, gripper conventions and cadences differ; follow the selected model's
[request contract](https://abstract-pbc.mintlify.site/robots/get-action.md).

## CLI credentials

`abstract login` signs in through WorkOS and creates a key directly through the API.
`abstract logout` refreshes the saved sign-in and revokes that key.

| Endpoint | Authentication | Result |
| - | - | - |
| `POST /v1/api-keys` | WorkOS sign-in bearer token | Creates a key; accepts an optional `name` of up to 80 characters |
| `DELETE /v1/api-keys/{key_id}` | WorkOS sign-in bearer token | Revokes a key belonging to the signed-in account |

API keys and browser cookies do not authenticate these credential endpoints.
Creation requires a payment method or available account credit and returns
`api_key`, `key_id` and `base_url`. The secret is returned only once.
Revocation returns `revoked: true`, or `false` if the account has no key with
that id. All credential responses disable caching. Use the CLI to manage sign-in
tokens rather than copying them by hand.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.