Skip to content

For AI agents: every API docs page in one plain-text file is at /docs/llms-full.txt, and the documentation index is at /llms.txt. This page is available as Markdown at https://diffio.ai/docs/api-reference/list-projects.md, and every docs URL returns Markdown when requested with Accept: text/markdown.

List projects

Lists the account's projects newest first, including each project's latest_generation. Pass Diffio-End-User to restrict results to one end user.

GET https://api.diffio.ai/v2/projects

  • Key scope: projects:read
  • Auth header:Authorization: Bearer <apiKey>
  • Body: None
  1. GET/projects?limit=20data[] newest first, next_cursor
  2. GET/projects?cursor={next_cursor}until next_cursor is null
  3. Next/projects/{project_id}/generationswith a project's id

Request

Pass optional limit and cursor query parameters to page through projects.

Query parameters

FieldTypeRequiredDescription
#limitintegerRequired: NoMaximum number of items to return per page, from 1 to 100 (default 20).
#cursorstringRequired: NoOpaque pagination token from the previous page's next_cursor.

Headers

FieldTypeRequiredDescription
#Diffio-End-UserstringRequired: NoOptional end-user identifier (up to 128 characters). Scopes the request to that end user's projects; omit to act across the whole account.

Request

import os
from diffio import DiffioClient

key = os.environ["DIFFIO_API_KEY"]
client = DiffioClient(api_key=key)

page = client.projects.list()

Response

Returns a list page of project objects ordered from newest to oldest, with next_cursor for the next page.

Success: 200OK.

Response fields

FieldTypePresentDescription
#objectstringAlwaysResource type, always "list".list
#dataarrayAlwaysPage of Project objects (same fields as Get a project), newest first.
#next_cursorstring | nullAlwaysOpaque cursor to pass as cursor for the next page, or null on the final page.

Response 200OK.

Response: key fields
{
  "object": "list",
  "data": [
    {
      "id": "73118d99-36cf-4039-8005-b962d522fff7",
      "status": "ready",
      "file_name": "sermon clip.mp3"
    },
    {
      "id": "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
      "status": "ready",
      "file_name": "interview.mp3"
    }
  ],
  "next_cursor": null
}

Return codes

  • 200OK.Returns a page of projects and next_cursor.
  • 400Bad request.Invalid limit or cursor query value, or Diffio-End-User exceeds 128 characters. invalid_parameterinvalid_header
  • 403Forbidden: the key lacks permission.Key is inactive or lacks projects:read. permission_denied
  • 401Unauthorized: the API key is missing or invalid.405Client error.Same on every endpoint
    • 401Unauthorized: the API key is missing or invalid. Missing API key (code missing_api_key), or invalid API key (code invalid_api_key).
    • 405Client error. HTTP method not supported on this path; check the Allow header (code method_not_allowed).

Example error response

Errors are JSON: an error object with code, message and request_id. An unrecognized key returns 401Unauthorized: the API key is missing or invalid.:

Error response
{
  "error": {
    "code": "invalid_api_key",
    "message": "Invalid API key.",
    "request_id": "dead773b60e148fd9e22d680a22fa701"
  }
}

Notes

  • Without Diffio-End-User, the response lists every project on the account regardless of which API key or end user created it.
  • Each item includes latest_generation so a project list UI can show restore progress without extra calls.
  • In Python use client.projects.iter(), and in Node.js use for await (const project of client.projects.list()), to walk every page automatically.

Report an issue with this page