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

Get the saved mix
Reads the saved mix settings (background_gain and leveling) for a generation's separated speech and background tracks, along with its opaque revision.
GET https:/
- Key scope:
artifacts:read - Auth header:
Authorization: Bearer <apiKey> - Body: None
Request
Pass project_id and generation_id in the path; takes no request body.
Path parameters
Headers
| Field | Type | Required | Description |
|---|---|---|---|
#Diffio-End-User | string | Required: No | Optional 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)
mix = client.mix.get(
"62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
"ce832a32-a1ce-516a-b8bd-75457bd8517f",
)Response
Returns the saved generation_mix (defaults to background_gain: 0 and leveling: false before any save).
Success: 200OK.
Response fields
| Field | Type | Present | Description |
|---|---|---|---|
#object | string | Always | Resource type, always "generation_mix".generation_mix |
#project_id | string | Always | Identifier of the parent project. |
#generation_id | string | Always | Identifier of the generation. |
#background_gain | number | Always | Background track level from 0 (speech only) to 1 (full background); defaults to 0. |
#leveling | boolean | Always | Whether quiet-speech leveling is enabled; defaults to false. |
#revision | string | Always | Opaque revision token that changes on every save and stems re-preparation; pass back to PUT .../mix to prevent stale overwrites. |
#stems_revision | string | null | Always | Revision identifier of the separated tracks this mix applies to (matching files.stems_manifest), or null. |
Response 200OK.
{
"object": "generation_mix",
"project_id": "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
"generation_id": "ce832a32-a1ce-516a-b8bd-75457bd8517f",
"background_gain": 0,
"leveling": false,
"revision": "4014a8c299444bbb866971bbb7b657ca:0",
"stems_revision": "4014a8c299444bbb866971bbb7b657ca"
}Return codes
200OK.Returns the generation's saved mix balance andrevision.400Bad request.Diffio-End-Userexceeds 128 characters.invalid_header403Forbidden: the key lacks permission.Key is inactive or lacksartifacts:read.permission_denied404Not found.Project not found, or generation not found.project_not_foundgeneration_not_found409Conflict: see error.code for which one.Separated tracks are still
preparingor the generation is still running, or 4 more causes- Separated tracks are still
preparingor the generation is still running - The generation will never have them
- Such as
stems_statusfailed - A failed generation
- A project being deleted
not_readynot_available- Separated tracks are still
502Bad gateway.Upstream stems service error.internal_error401Unauthorized: the API key is missing or invalid.405Client error.Same on every endpoint401Unauthorized: 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": {
"code": "invalid_api_key",
"message": "Invalid API key.",
"request_id": "dead773b60e148fd9e22d680a22fa701"
}
}Notes
- Wait until
stems_statuson Get a generation isready(or until thegeneration.stems_readywebhook fires) before reading or saving the mix. - Pass the returned
revisionunchanged to Save the mix so concurrent editors cannot overwrite each other. - Reading and saving mix settings is free.