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/delete-project.md, and every docs URL returns Markdown when requested with Accept: text/markdown.

Delete a project

Deletes a project and everything stored for it: the original upload, every generation, separated tracks, rendered exports, transcript drafts, assistant turns, and any published share.

DELETE https://api.diffio.ai/v2/projects/{project_id}

  • Key scope: projects:write
  • Auth header:Authorization: Bearer <apiKey>
  • Body: None

Request

Pass project_id in the path; takes no request body.

Path parameters

FieldTypeRequiredDescription
#project_idstringRequired: YesUnique identifier of the project.

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)

deleted = client.projects.delete(
    "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
)

Response

Returns deletion counts once the project and its stored media objects are removed.

Success: 200OK.

Response fields

FieldTypePresentDescription
#idstringAlwaysIdentifier of the deleted project.
#objectstringAlwaysResource type, always "project".project
#deletedbooleanAlwaysAlways true when deletion completes.true
#deleted_generationsintegerAlwaysNumber of generations removed with the project.
#deleted_media_objectsintegerAlwaysNumber of stored media files deleted.

Response 200OK.

Successful response
{
  "id": "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
  "object": "project",
  "deleted": true,
  "deleted_generations": 1,
  "deleted_media_objects": 48
}

Return codes

  • 200OK.Project and all stored records and media files were deleted.
  • 400Bad request.Diffio-End-User exceeds 128 characters. invalid_header
  • 403Forbidden: the key lacks permission.Key is inactive or lacks projects:write. permission_denied
  • 404Not found.No project with that project_id exists for this account and end user. project_not_found
  • 409Conflict: see error.code for which one.A generation on the project is still queued or processing, with details.generation_ids listing it. generation_in_progress
  • 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

  • Refused with 409 (generation_in_progress) while a generation is running, except a queued generation waiting for an upload that never arrived (deleted uncharged with the project).
  • Any published share is revoked first (existing share URLs stop working within about 60 seconds), and signed media URLs stop resolving once objects are deleted.
  • Usage already charged stays on your account's billing records, but the deleted generations no longer count in Get usage. If a delete is interrupted midway, calling DELETE again finishes the cleanup.

Report an issue with this page