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

> ## Agent Instructions
> To set up offstage cloud from a coding agent, read https://api.offstage.cloud/SKILL.md and follow it. The whole API guide is one file at https://api.offstage.cloud/llms.txt.

# Pagination

> Lists come newest first, a page at a time, with a cursor.

`GET /v1/tasks` and `GET /v1/sandboxes` return the newest items first, a page at a time.

| Query | |
| - | - |
| `limit` | Page size: 1 to 200, 50 by default |
| `cursor` | The `nextCursor` from the previous page |
| `state` | An optional filter |

The answer is `{"tasks" | "sandboxes": [...], "nextCursor": "<id>" | null}`, and `nextCursor` is `null` on the last page. The cursor is the id of the last item on the page, and marks a position among all your items: the next page starts after it whatever has changed since, so an item that leaves the `state` filter between pages (a task that finished, a sandbox that closed) never breaks the listing. Work created after the first page appears only in a new listing. A cursor that names no item of yours is 400 `bad-cursor`.

```bash theme={null}
curl -s "https://api.offstage.cloud/v1/tasks?limit=50&state=running" -H "authorization: Bearer $OFFSTAGE_API_KEY"
curl -s "https://api.offstage.cloud/v1/tasks?limit=50&state=running&cursor=task_…" -H "authorization: Bearer $OFFSTAGE_API_KEY"
```


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