Logical group. Scopes search so results don’t leak across boundaries.
media_type
No
"audio" or "video". Auto-detected if omitted.
types
No
Surfaces to index: "audio", "video", "transcript". Defaults to all.
metadata
No
Flat string/number/boolean pairs for your own use.
Response
type IngestResponse = { asset_id: string; task_id: string; status: "pending";};
Tasks
Poll until ready
const task = await client.pollTask(task_id, { intervalMs: 2_000, // how often to check (default 1_500) timeoutMs: 120_000, // give up after this long (default 120_000)});if (task.status === "failed") { throw new Error(task.error ?? "indexing failed");}
pollTask throws SfVoiceMediaPollTimeoutError if the task doesn’t reach ready or failed within the timeout.