Pagination
All list endpoints use cursor pagination. Cursors are stable while you page, even when new objects are created in the meantime.
Parameters
| Query parameter | Type | Description |
|---|---|---|
limit | integer | Objects per page, 1 to 100. Default 20. |
cursor | string | The nextCursor value from the previous page. Omit it for the first page. |
Response
Results are ordered newest first (by createdAt). When hasMore is true, pass nextCursor to get the next page. On the last page nextCursor is null.
{
"object": "list",
"data": [
{
"id": "pod_8f2k1x9q",
"object": "pod",
"name": "llama-finetune",
"…": "…"
},
{
"id": "pod_4m8w2n7q",
"object": "pod",
"name": "sd-notebook",
"…": "…"
}
],
"hasMore": true,
"nextCursor": "cur_eyJpZCI6InBvZF80bTh3Mm43cSJ9"
}Filters you pass on the first request (for example status=RUNNING) must be repeated with every cursor.
Iterating over all pages
$ curl "https://api.apipods.com/v1/pods?limit=100&status=RUNNING" \
-H "Authorization: Bearer $APIPODS_API_KEY"
# next page
$ curl "https://api.apipods.com/v1/pods?limit=100&status=RUNNING&cursor=cur_eyJpZCI6InBvZF80bTh3Mm43cSJ9" \
-H "Authorization: Bearer $APIPODS_API_KEY"About cursors
Cursors are opaque strings starting with cur_. Do not construct or modify them. A cursor is valid for 24 hours; an expired or malformed cursor returns 400 invalid_parameter with param: "cursor".