Skip to main content
GET
/
denoise
/
{denoiseId}
/
progress
Stream Denoise Progress
curl --request GET \
  --url https://api.munsit.com/api/v1/denoise/{denoiseId}/progress \
  --header 'x-api-key: <api-key>'
{
  "stage": "processing",
  "pct": 50,
  "message": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.munsit.com/llms.txt

Use this file to discover all available pages before exploring further.

Subscribes to live progress events for a denoising job over Server-Sent Events (SSE). The connection emits a processing event as work advances and terminates with either a done event (carrying the final audio URL) or an error event.

Authentication

Requires API key authentication via x-api-key header.

Request

Path Parameters

ParameterTypeRequiredDescription
denoiseIdstring (UUID)YesThe denoiseId returned by POST /denoise.

Headers

HeaderValueDescription
Accepttext/event-streamRequired to negotiate the SSE response.

Response

Status Code: 200 OK Headers:
  • Content-Type: text/event-stream
  • Cache-Control: no-cache
  • Connection: keep-alive
The body is an SSE stream. Each message is delivered as a data: line whose payload is a JSON object. The connection automatically closes after a terminal event (done or error), or after 15 minutes of inactivity. When you connect to an already-completed job, the server immediately emits the cached final event and closes — no need to poll separately.

Event Schema

The stage field discriminates the event:
StageFieldsDescription
processingpct (number, 0–100), message (string, optional)Incremental progress update.
doneurl (string), denoiseId (string)Terminal success — url is the denoised audio URL.
errormessage (string)Terminal failure — human-readable error message.

Example Stream

data: {"stage":"processing","pct":15,"message":"Extracting audio"}

data: {"stage":"processing","pct":62,"message":"Running noise reduction"}

data: {"stage":"done","url":"https://cdn.munsit.com/denoising/user_123/5b1d2f7e_denoised.wav","denoiseId":"5b1d2f7e-3f81-4c2a-9c5d-7a2e91b4c7a1"}

Error Responses

404 Not Found — emitted as a JSON body, not as SSE:
{
  "message": "Denoising job not found"
}
401 Unauthorized
{
  "errorCode": "40101",
  "errorMessage": "Invalid or missing API key"
}

Example Usage

JavaScript (fetch + ReadableStream)

const denoiseId = "5b1d2f7e-3f81-4c2a-9c5d-7a2e91b4c7a1";

const res = await fetch(`https://api.munsit.com/api/v1/denoise/${denoiseId}/progress`, {
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Accept': 'text/event-stream',
  },
});

const reader = res.body.getReader();
const decoder = new TextDecoder();
let buffer = "";

while (true) {
  const { value, done } = await reader.read();
  if (done) break;
  buffer += decoder.decode(value, { stream: true });
  const lines = buffer.split("\n");
  buffer = lines.pop() ?? "";

  for (const line of lines) {
    if (!line.startsWith("data: ")) continue;
    const event = JSON.parse(line.slice(6));
    if (event.stage === "processing") {
      console.log(`Progress: ${event.pct}%`, event.message);
    } else if (event.stage === "done") {
      console.log("Denoised audio ready:", event.url);
      return;
    } else if (event.stage === "error") {
      console.error("Denoising failed:", event.message);
      return;
    }
  }
}

Python (httpx)

import httpx, json

denoise_id = "5b1d2f7e-3f81-4c2a-9c5d-7a2e91b4c7a1"
url = f"https://api.munsit.com/api/v1/denoise/{denoise_id}/progress"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Accept": "text/event-stream",
}

with httpx.stream("GET", url, headers=headers, timeout=None) as r:
    for line in r.iter_lines():
        if not line or not line.startswith("data: "):
            continue
        event = json.loads(line[6:])
        if event["stage"] == "processing":
            print(f"Progress: {event['pct']}% — {event.get('message','')}")
        elif event["stage"] == "done":
            print("Denoised audio URL:", event["url"])
            break
        elif event["stage"] == "error":
            print("Failed:", event["message"])
            break

cURL

curl -N "https://api.munsit.com/api/v1/denoise/5b1d2f7e-3f81-4c2a-9c5d-7a2e91b4c7a1/progress" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Accept: text/event-stream"
Reconnecting: If you reconnect after a job has already finished, the server replays the cached terminal event immediately so clients never miss completion.

Authorizations

x-api-key
string
header
required

API key for authentication

Path Parameters

denoiseId
string<uuid>
required

The denoiseId returned by POST /denoise.

Response

SSE stream of denoising events. Each message is a data: <json> line where the JSON conforms to DenoiseProgressEvent.

An SSE event payload for a denoising job. The stage field discriminates between processing, done, and error.

stage
enum<string>
required
Available options:
processing
pct
number
required

Completion percentage.

Required range: 0 <= x <= 100
message
string

Optional human-readable progress message.