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

Get an export

Reads a separated-track export's status and, once status is ready, mints a fresh 6-hour signed url.

GET https://api.diffio.ai/v2/projects/{project_id}/generations/{generation_id}/exports/{export_id}

  • Key scope: artifacts:read
  • Auth header:Authorization: Bearer <apiKey>
  • Body: None

Request

Pass project_id, generation_id, and export_id in the path, and optional file_name in the query string.

Path parameters

FieldTypeRequiredDescription
#project_idstringRequired: YesUnique identifier of the project.
#generation_idstringRequired: YesUnique identifier of the generation within the project.
#export_idstringRequired: YesIdentifier of the export returned when the export was created.

Query parameters

FieldTypeRequiredDescription
#file_namestringRequired: NoOptional download filename without an extension; url then carries it as ?download= (ignored for an inline export).

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)

export = client.exports.get(
    "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
    "ce832a32-a1ce-516a-b8bd-75457bd8517f",
    "d51fd816be75bc302ecc3def3da4f22d",
    file_name="interview mix",
)

Response

Returns the generation_export with a fresh url when status is ready.

Success: 200OK.

Response fields

FieldTypePresentDescription
#objectstringAlwaysResource type, always "generation_export".generation_export
#idstringAlwaysDeterministic export identifier (32 hex characters for the recipe, plus -inline when inline is true).
#project_idstringAlwaysIdentifier of the parent project.
#generation_idstringAlwaysIdentifier of the generation.
#statusstringAlwaysExport render state: queued, processing, ready, or failed.queuedprocessingreadyfailed
#artifactstring | nullAlwaysExported track recipe (speech, background, mix, both, or original), or null.
#formatstring | nullAlwaysOutput container format (wav, mp3, m4a, mp4, or zip), or null.
#background_gainnumber | nullAlwaysBackground gain from 0 to 1 used for a mix export; 0 for other artifacts.
Show all 14 fields (6 more)
FieldTypePresentDescription
#levelingbooleanAlwaysTrue when speech leveling was applied to this export.
#inlinebooleanAlwaysTrue when url is served for in-page playback rather than as a file download.
#urlstring | nullAlwaysSigned media URL valid for 6 hours once status is ready, or null while rendering or failed.
#errorobject | nullAlwaysFailure details when status is failed, or null otherwise.
#error.codestringAlwaysStable snake_case export failure code (export_failed).
#error.messagestringAlwaysHuman-readable explanation of why export rendering failed.

Response 200OK.

Successful response
{
  "object": "generation_export",
  "id": "d51fd816be75bc302ecc3def3da4f22d",
  "project_id": "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
  "generation_id": "ce832a32-a1ce-516a-b8bd-75457bd8517f",
  "status": "ready",
  "artifact": "mix",
  "format": "mp3",
  "background_gain": 0.3,
  "leveling": false,
  "inline": false,
  "url": "https://media.diffio.io/m/v1.REDACTED/generations/ce832a32-a1ce-516a-b8bd-75457bd8517f/downloads/stems/d51fd816be75bc302ecc3def3da4f22d/98111c08d1f247d0b43a4eeeb50b5e7a/diffio_mix.mp3?download=interview%20mix.mp3",
  "error": null
}

Return codes

  • 200OK.
    Returns the export status and, or 2 more causes
    • Returns the export status and
    • When ready
    • A fresh 6-hour url
  • 400Bad request.Diffio-End-User exceeds 128 characters. invalid_header
  • 403Forbidden: the key lacks permission.Key is inactive or lacks artifacts:read. permission_denied
  • 404Not found.
    Project not found, or 2 more causes
    • Project not found
    • Generation not found
    • Export not found
    project_not_foundgeneration_not_foundexport_not_found
  • 409Conflict: see error.code for which one.Project is being deleted. not_available
  • 502Bad gateway.Upstream export service error. internal_error
  • 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

  • Reading an export never triggers a new render; if status is failed, call Create an export with the same parameters to render it again.
  • When url expires after 6 hours, call GET again to mint a fresh link without re-rendering.

Report an issue with this page