> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Start with /introduction/getting-started. Use the Inference API's Direct Query endpoint (POST /api/inference/query) with the newton-c-2.6 or newton-fusion-1.0 model (text, image, and video reasoning) or the omega-embedding encoder (time-series embeddings). ATAI_API_ENDPOINT is the base URL https://platform.u1.archetypeai.app with no version path; every endpoint path begins with /api. Pages whose descriptions are marked (Archived) document the legacy Lens runtime — do not use them for new projects.

# List Model Sessions

> List your sessions on platform-hosted models, newest first

Requires [version 2.0.1](https://docs.archetypeai.app/release-notes/2.0.x.md#v2-0-1) or later of the Archetype platform.

## Overview

This endpoint lists your sessions on models, newest first. Ended sessions are listed too, until you
[delete](https://docs.archetypeai.app/api-reference/inference/sessions/delete-session.md) them.

You see the sessions you opened from any of your API keys or your Developer Console login. A
service-account key sees the sessions of every service-account key in the organization, and an
organization admin sees all of the organization's.

## Request

**model** `string`

Only sessions on this model, by any of its names. A name no model has returns an empty page. A
removed model's name still lists its sessions.

**status** `string`

Only sessions in this status: `running`, `completed`, `failed`, or `cancelled`. Any other value
returns `400`.

**limit** `integer` (default: 100)

Page size, from `1` to `1000`.

**after** `string`

Forward cursor. Pass the `next_cursor` of the previous page to get older sessions. Can't be combined
with `before`.

**before** `string`

Backward cursor. Pass the `prev_cursor` of the current page to step back. Can't be combined with
`after`.

## Response

**data** `object[]`

The page of [session objects](https://docs.archetypeai.app/api-reference/inference/sessions/get-session.md#response), newest first.

**has\_more** `boolean`

Whether more sessions exist beyond this page.

**next\_cursor** `string | null`

Cursor for the next page. `null` when `has_more` is `false`.

**prev\_cursor** `string | null`

Cursor to step back to the previous page. `null` on a request without a cursor.

```bash cURL theme={"system"}
curl "$ATAI_API_ENDPOINT/inference/sessions?model=omega-embedding&status=running" \
  -H "Authorization: Bearer $ATAI_API_KEY"
```

```python Python theme={"system"}
import os
import requests

base_url = os.environ["ATAI_API_ENDPOINT"]
api_key = os.environ["ATAI_API_KEY"]

response = requests.get(
    f"{base_url}/inference/sessions",
    headers={"Authorization": f"Bearer {api_key}"},
    params={"model": "omega-embedding", "status": "running"},
)

for session in response.json()["data"]:
    print(session["id"], session["status"])
```

```javascript JavaScript theme={"system"}
const params = new URLSearchParams({ model: 'omega-embedding', status: 'running' });
const response = await fetch(`${process.env.ATAI_API_ENDPOINT}/inference/sessions?${params}`, {
  headers: {
    'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
  }
});

const body = await response.json();
for (const session of body.data) {
  console.log(session.id, session.status);
}
```

```json 200 - One page of sessions theme={"system"}
{
  "data": [
    {
      "id": "ses_01jcx4m8t2vq6xn3r7k5hbzw9e",
      "model": "omega-embedding",
      "status": "running",
      "values": {"window_size": 1024, "step_size": 512},
      "error": null,
      "created_at": "2026-11-11T09:12:44Z",
      "started_at": "2026-11-11T09:12:51Z",
      "completed_at": null
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "prev_cursor": null
}
```

## Important Notes

> [!NOTE]
>
> * `400` means a malformed cursor or `status`, or both `after` and `before`.
> * Cursors are opaque. Never build one from session fields.


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