Get started

Pagination

Lists such as your jobs come a page at a time. Ask for the next page with the last id you saw.

Cursor pagination

GET /v1/jobs and GET /v1/events return the newest items first, a page at a time. Jobs made on framera.ai are never listed.

limitinteger
How many items per page, 1 to 100. Default 20.
starting_afterstring
The id of the last item on the page you have. The next page starts after it. An id that is not in the list answers 400.
typestring
Jobs: video, avatar, ugc, image, tool, audio or swap. Events: an event type such as job.failed.
statusstring
Jobs only: queued, running, succeeded, failed or cancelled.

hasMore and the next cursor

Every list comes back as { object: "list", data: [...], hasMore }. When hasMore is true, ask again with starting_after set to the id of the last item in data. When it is false, you have everything.

Cursors stay correct while new jobs are created: new items appear at the top of the first page and never shift later pages.

Auto-pagination in the SDKs

The SDKs fetch the next page for you as you loop. In TypeScript, for await over jobs.list(); in Python, iterate over it. Stop the loop whenever you have enough.