nexu-io/open-design · error · Error
Vela video only supports aspect ratios 16:9, 9:16, or 1:1; r
Error message
Vela video only supports aspect ratios 16:9, 9:16, or 1:1; received ${ratio} What it means
Thrown by renderVelaVideo when input.aspect is not one of the three supported ratios. The valid set is VELA_VIDEO_RATIOS = new Set(['16:9', '9:16', '1:1']). The default is '16:9' when input.aspect is nullish, so this error only fires when an explicit unsupported value is supplied.
Source
Thrown at apps/daemon/src/media/vela.ts:422
// was chosen and say so plainly when the server's default decided.
providerNote: `vela/${wireModel} · ${
profile ? `${profile.aspectRatio} ${profile.resolution}` : 'model default profile'
} · ${requestedQuality ?? 'model default quality'} · ${bytes.length} bytes`,
suggestedExt: extensionForImageMime(mime),
};
} finally {
await rm(tempDir, { recursive: true, force: true });
}
}
export async function renderVelaVideo(
input: VelaVideoRenderInput,
runCommand: VelaCommandRunner = runVelaCommand,
): Promise<VelaRenderResult> {
assertInputImageCount(input.imageRefs);
const ratio = input.aspect ?? '16:9';
if (!VELA_VIDEO_RATIOS.has(ratio)) {
throw new Error(`Vela video only supports aspect ratios 16:9, 9:16, or 1:1; received ${ratio}`);
}
if (input.length != null && !VELA_VIDEO_DURATIONS.has(input.length)) {
throw new Error(`Vela video only supports durations of 5 or 10 seconds; received ${input.length}`);
}
const wireModel = wireModelForVela(input.model, input.wireModel);
const tempDir = await mkdtemp(path.join(os.tmpdir(), 'open-design-vela-video-'));
const outputPath = path.join(tempDir, 'result.mp4');
const startedAt = Date.now();
const pollIntervalMs = positiveIntegerFromEnv(
'OD_VELA_VIDEO_POLL_INTERVAL_MS',
DEFAULT_VELA_VIDEO_POLL_INTERVAL_MS,
);
const totalTimeoutMs = positiveIntegerFromEnv(
'OD_VELA_VIDEO_TIMEOUT_MS',
DEFAULT_VELA_VIDEO_TOTAL_TIMEOUT_MS,
);
const pollCommandTimeoutMs = positiveIntegerFromEnv(View on GitHub (pinned to 5be4028344)
Solutions
- Set input.aspect to exactly one of '16:9', '9:16', or '1:1'
- Omit input.aspect entirely to use the '16:9' default
- If building a caller UI, restrict the dropdown options to the three supported values
Example fix
// before
renderVelaVideo({ aspect: '4:3', imageRefs: refs, ... });
// after
renderVelaVideo({ aspect: '16:9', imageRefs: refs, ... });
// or omit aspect to default to 16:9
renderVelaVideo({ imageRefs: refs, ... }); Defensive patterns
Strategy: validation
Validate before calling
const VELA_VIDEO_RATIOS = new Set(['16:9', '9:16', '1:1']);
function assertValidVelaRatio(aspect) {
const ratio = aspect ?? '16:9';
if (!VELA_VIDEO_RATIOS.has(ratio)) {
throw new Error(`Unsupported aspect ratio: ${ratio}. Use 16:9, 9:16, or 1:1.`);
}
return ratio;
} Type guard
function isVelaVideoRatio(value: unknown): value is '16:9' | '9:16' | '1:1' {
return typeof value === 'string' && ['16:9', '9:16', '1:1'].includes(value);
} Prevention
- Restrict UI dropdowns to the three supported ratios so users can never select an invalid value
- Validate input.aspect before calling renderVelaVideo rather than relying on the internal throw
- Document the supported ratios at the API boundary
When it happens
Trigger: Calling renderVelaVideo or the /api/media video route with input.aspect set to any string outside {16:9, 9:16, 1:1} — e.g. '4:3', '2:1', '3:2', '16:09', '1.77:1'.
Common situations: A UI dropdown passing a newly-added or stale ratio option the backend doesn't support; an API caller assuming arbitrary ratios are accepted; typos like '16:09' or decimal ratios like '1.78:1'.
Related errors
- Vela video only supports durations of 5 or 10 seconds; recei
- authorized pull receipt has invalid ${key}
- authorized pull response must be an object
- --image path "${rel}" resolves outside the project directory
- --image not found: ${rel}
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/03ee3989f6180ab1.
Report an issue: GitHub.