Skip to content
Search docs

Application configuration

Look up application API environment variables, defaults, and validation constraints. The fields below come directly from the real Settings JSON Schema. Generation does not read your environment values or connect to Runtime. This page does not configure ComfyUI or model environments.

Choose an independent application data directory

Section titled “Choose an independent application data directory”

Run from the repository root. See the client guide for Node, pnpm, uv, and the independent API environment. This optional example starts only an isolated fake application API for practicing business operations. Fake mode does not produce model music.

Terminal window
$env:MUSIC_API_RUNTIME_MODE = "fake"
$env:MUSIC_API_DATA_DIR = "data/reference-example-fake"
uv run --project services/api --no-sync music-api serve --port 8000

Check runtime.mode at /health before creating a Project. Local data remains after you stop your own API process. The documentation does not write runtime variables. If a directory belongs to another mode, choose a fresh directory; do not switch fake Projects to real mode. Real mode requires a separate directory and fresh owner receipt; follow the diagnostics guide. See generation and saving and restart recovery for complete operations and failure recovery.

The source of truth is application Settings. The generator reuses the field and environment variable mapping from Settings metadata. ${REPOSITORY} means the current checkout root. The generator derives this portable token from the actual Path default and does not publish a machine’s absolute path. JSON blocks preserve types, defaults, allowed values, and numerical boundaries. A missing default stays unspecified.

app.sqlite and assets/ under data_dir are the application storage paths derived by Settings. Upload byte/duration budgets do not establish supported model duration; see current capabilities. Reading configuration does not renew Runtime diagnostic evidence. Invalid field values prevent API startup. Fix the variable and restart your own process. Explicit launch arguments can override environment values, including --data-dir.

Settings field: data_dir.

Type, default, allowed values, and validation constraints from Settings:

{
"default": "${REPOSITORY}/data",
"format": "path",
"title": "Data Dir",
"type": "string"
}

Settings field: max_upload_bytes.

Type, default, allowed values, and validation constraints from Settings:

{
"default": 67108864,
"exclusiveMinimum": 0,
"title": "Max Upload Bytes",
"type": "integer"
}

Settings field: max_audio_seconds.

Type, default, allowed values, and validation constraints from Settings:

{
"default": 600,
"exclusiveMinimum": 0,
"title": "Max Audio Seconds",
"type": "number"
}

Settings field: runtime_mode.

Type, default, allowed values, and validation constraints from Settings:

{
"default": "fake",
"description": "Identifiable Runtime mode; each mode owns an isolated data namespace.",
"enum": [
"fake",
"comfyui"
],
"title": "Runtime Mode",
"type": "string"
}

Settings field: runtime_url.

Type, default, allowed values, and validation constraints from Settings:

{
"default": "http://127.0.0.1:8188",
"description": "Loopback ComfyUI URL, used only in explicit comfyui mode.",
"title": "Runtime Url",
"type": "string"
}

Settings field: runtime_timeout_seconds.

Type, default, allowed values, and validation constraints from Settings:

{
"default": 10,
"description": "Bounded native HTTP timeout.",
"exclusiveMinimum": 0,
"title": "Runtime Timeout Seconds",
"type": "number"
}

Settings field: runtime_evidence_path.

Type, default, allowed values, and validation constraints from Settings:

{
"anyOf": [
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Read-only owner receipt; reading it does not renew its source timestamps.",
"title": "Runtime Evidence Path"
}

Settings field: diagnostics_max_age_seconds.

Type, default, allowed values, and validation constraints from Settings:

{
"default": 300,
"description": "Freshness policy for observed readiness and immutable owner evidence.",
"exclusiveMinimum": 0,
"title": "Diagnostics Max Age Seconds",
"type": "number"
}

MUSIC_API_RECOVERY_CONFIRMATION_WINDOW_SECONDS

Section titled “MUSIC_API_RECOVERY_CONFIRMATION_WINDOW_SECONDS”

Settings field: recovery_confirmation_window_seconds.

Type, default, allowed values, and validation constraints from Settings:

{
"default": 300,
"description": "Durable confirmation budget for uncertain original Runtime work; API restarts do not renew it.",
"exclusiveMinimum": 0,
"title": "Recovery Confirmation Window Seconds",
"type": "number"
}

Settings field: recovery_max_attempts.

Type, default, allowed values, and validation constraints from Settings:

{
"default": 30,
"description": "Persisted attempt limit when original Runtime work is unconfirmed.",
"exclusiveMinimum": 0,
"title": "Recovery Max Attempts",
"type": "integer"
}

Settings field: recovery_poll_interval_seconds.

Type, default, allowed values, and validation constraints from Settings:

{
"default": 1,
"description": "Initial bounded recovery polling interval.",
"exclusiveMinimum": 0,
"title": "Recovery Poll Interval Seconds",
"type": "number"
}

MUSIC_API_RECOVERY_MAX_POLL_INTERVAL_SECONDS

Section titled “MUSIC_API_RECOVERY_MAX_POLL_INTERVAL_SECONDS”

Settings field: recovery_max_poll_interval_seconds.

Type, default, allowed values, and validation constraints from Settings:

{
"default": 10,
"description": "Maximum recovery polling interval.",
"exclusiveMinimum": 0,
"title": "Recovery Max Poll Interval Seconds",
"type": "number"
}
Source version: 1ce3268Page source: docs/reference/settings.en.md