Skip to main content
Exports render a finished karaoke as a video file. Use client.exports.create(...) as the main entrypoint. Pick target: "local" when you want the SDK to render directly on the current machine; otherwise cloud export is the default.

client.exports.create(projectId, input, options?)

Choose the export target with target: "cloud" | "local".
const cloud = await client.exports.create("prj_abc123", {
  resolution: "1080p",
  quality: "high",
});
// => ExportOperation

const local = await client.exports.create("prj_abc123", {
  target: "local",
  resolution: "1080p",
  quality: "high",
  outputPath: "./karaoke.mp4",
});
// => { outputPath, fileSize, duration, ... }
Use cloud when you want a managed async export. Use local when you want to render directly on the caller’s machine.

Common fields

FieldTypeDescription
resolution"540p" | "720p" | "1080p"Output resolution.
quality"low" | "average" | "high"Encoding quality.
playbackRatenumberSpeed multiplier (e.g. 0.9).
toneFrequencynumberPitch shift in semitones.
transparentbooleanRender with a transparent background.
presetIdstringApply a preset before rendering.
stemVolumesRecord<string, number>Per-stem volume overrides keyed by stem id.
settingsOverrideobjectPatch the project settings for this export only.

Example with stem volumes

const result = await client.exports.create("prj_abc123", {
  resolution: "1080p",
  quality: "high",
  stemVolumes: {
    vocals: 0,
    instrumental: 1,
    backing: 0.5,
  },
});

Example with settings override

const result = await client.exports.create("prj_abc123", {
  resolution: "1080p",
  settingsOverride: {
    trim: { startSeconds: 5, endSeconds: 180 },
    style: {
      background: { type: "color", color: "#101010" },
    },
  },
});
See Render settings reference for the full settingsOverride shape.

client.exports.quote(projectId, input, options?)

Quote the credits required for a cloud export without starting the export.
const quote = await client.exports.quote("prj_abc123", {
  resolution: "1080p",
  quality: "high",
  transparent: false,
});

console.log(quote.creditsRequired, quote.sufficientBalance);
Local exports run on the caller’s machine and do not use cloud export credits, so quote(...) is only for cloud exports.

client.exports.list(projectId, input?, options?)

List exports for a project, with pagination.
const exports = await client.exports.list("prj_abc123", {
  page: 1,
  pageSize: 50,
});
page
number
Page number. Defaults to 1 on the server.
pageSize
number
Page size. Defaults to 100. Maximum 100.

client.exports.get(exportId, options?)

Fetch an export by ID alone, without knowing the parent project.
const exported = await client.exports.get("exp_xyz");

Local export

const result = await client.exports.create("prj_abc123", {
  target: "local",
  resolution: "1080p",
  quality: "high",
  outputPath: "./karaoke.mp4",
  onProgress(progress) {
    console.log(progress.stage, progress.percent);
  },
});

console.log(result.outputPath);
Use onDependencyProgress if you want updates while the local render toolchain is being installed or verified.

client.exports.prepareLocal(projectId, body, options?)

Return the prepared payload needed to render an export locally. Use this when integrating with @youka/remotion or another local renderer. The server returns the composition inputs, asset URLs, and render parameters without queuing a cloud render.
const payload = await client.exports.prepareLocal("prj_abc123", {
  resolution: "1080p",
  quality: "high",
});

// Hand payload off to your local renderer
await renderLocally(payload);
client.exports.prepareLocal(...) does not start a cloud render. No billable compute is consumed on the Youka side.

Waiting for an export

Cloud exports are async. Use client.exports.wait(...):
const operation = await client.exports.create("prj_abc123", {
  resolution: "1080p",
});

const finalized = await client.exports.wait(operation, {
  pollIntervalMs: 3_000,
});
console.log("Download from", finalized.url);

Downloading the result

Cloud exports finish with a signed url. Use the built-in helper to stream the file to disk. output can be either a directory or a full file path, and filename is optional:
await client.exports.download(finalized, {
  output: "./exports",
});

What’s next

  • Tasks — operation handles and advanced task polling
  • Presets — reusable render configurations
  • Project settings — patch a project’s active settings