Skip to content
REST API

Scan a recording, read the timeline

One endpoint takes a file or a link and answers with the reading of the whole recording, a timeline of evidence over it and the conditions that make it less certain.

# Upload a recording and wait up to 30 s for the answer (202 + Location when it takes longer).
curl -sS "https://auscultare.io/api/v1/scans" \
  -H "Authorization: Bearer $AUSCULTARE_KEY" \
  -H "Prefer: wait=30" \
  -F "file=@./interview.m4a" \
  -F "title=Interview, take 2"

In short

POST /api/v1/scans with a multipart file or JSON with a link. The answer arrives with 200 when it is ready within the wait, otherwise 202 with a Location to poll. Read detection.label for the answer, detection.windows for the timeline, and delete the audio whenever you like: the answer stays.

Endpoints

Endpoints
EndpointWhat it does
POST/api/v1/scansScan a file (multipart) or a link (JSON).
GET/api/v1/scans/:idOne scan, while it runs and once it is done.
GET/api/v1/scansThe workspace’s scans, newest first, with a cursor.
DELETE/api/v1/scans/:id/audioDelete the stored audio now; the answer stays.
DELETE/api/v1/scans/:idDelete the scan.
POSTDELETE/api/v1/scans/:id/shareMake, or stop, a scan’s public link.
GET/api/v1/modelsThe models a scan can name.
GET/api/v1/usageClips left today and live minutes left this month (Enterprise: the pool).
POST/api/v1/live/ticketsA one-use ticket for a live WebSocket.
GET/api/v1/live/sessionsLive sessions, newest first (no audio).
GET/api/v1/live/sessions/:idOne live session with its timeline and alerts.
GETPOSTPATCHDELETE/api/v1/watch[/:id]Watch sources: podcast feeds and file URLs.
GET/api/v1/watch/:id/itemsWhat a Watch source found, with answers.
GET/api/v1/eventsThe workspace’s events, oldest first, for tools that poll.

Upload a file

Multipart form data, one file per request, up to 95 MB. Any audio or video file with a sound track: the type is read from the content, not from the name.

Upload a file
FieldTypeMeaning
filefile · requiredThe recording.
titlestring · optionalYour title, up to 200 characters. Otherwise the file name.
modelstring · optionalA model id from GET /models. truesound-2.1 when left out.

Common formats: .mp3 .wav .m4a .aac .ogg .oga .opus .flac .webm .mp4 .m4v .mov .mkv .amr .3gp .aif .aiff .wma .caf.

# Upload a recording and wait up to 30 s for the answer (202 + Location when it takes longer).
curl -sS "https://auscultare.io/api/v1/scans" \
  -H "Authorization: Bearer $AUSCULTARE_KEY" \
  -H "Prefer: wait=30" \
  -F "file=@./interview.m4a" \
  -F "title=Interview, take 2"

200, 202 and polling

The answer comes back with 200 when it is ready in time, otherwise 202 with a Location header. Prefer: wait=N (up to 30) asks the server to hold on longer before it answers 202. While a scan is queued or running, stage says what it is doing.

200, 202 and polling
stageMeaning
queuedWaiting for its turn.
preparingReading the file and drawing its waveform.
waking_modelThe model is starting after a quiet spell: about 25 seconds.
analysingTrueSound 2.1 is reading the speech.

A failed scan has failReason (unreadable_audio, no_audio_stream, fetch_failed, detector_unavailable, internal) and is never counted.

poll.mjs

const BASE = 'https://auscultare.io/api/v1';
const auth = { Authorization: `Bearer ${process.env.AUSCULTARE_KEY}` };

/** Reads a scan until it is completed or failed, saying what it is doing meanwhile. */
export async function waitForScan(id, { everyMs = 2000, timeoutMs = 5 * 60_000 } = {}) {
  const until = Date.now() + timeoutMs;
  for (;;) {
    const res = await fetch(`${BASE}/scans/${id}`, { headers: auth });
    const scan = await res.json();
    if (!res.ok) throw new Error(`${scan.code}: ${scan.detail ?? scan.title}`);
    if (scan.status === 'completed' || scan.status === 'failed') return scan;
    // stage: queued | preparing | waking_model (about 25 s after a quiet spell) | analysing
    console.log('…', scan.stage);
    if (Date.now() > until) throw new Error('Still reading: try again later');
    await new Promise((r) => setTimeout(r, everyMs));
  }
}

The scan object

Times are seconds from the start of the original recording. raw is always null for API keys: the line and the raw readings are never sent.

GET /api/v1/scans/6f0c2d8e-4b1a-4c5e-9d3f-2a7b8c9d0e1f · 200 · A fictional example (arrays shortened).
{
  "id": "6f0c2d8e-4b1a-4c5e-9d3f-2a7b8c9d0e1f",
  "status": "completed",
  "stage": null,
  "origin": "api",
  "mode": "live",
  "replayOf": null,
  "createdAt": "2026-12-02T09:41:07.212Z",
  "completedAt": "2026-12-02T09:41:12.904Z",
  "recording": {
    "source": "upload",
    "title": "Interview, take 2",
    "titleSource": "user",
    "filename": "interview.m4a",
    "url": null,
    "container": "m4a",
    "codec": "aac",
    "sampleRate": 44100,
    "channels": 1,
    "durationSec": 41.6,
    "scannedSec": 41.6,
    "speechSec": 33.9,
    "bytes": 682144,
    "waveform": {
      "points": 800,
      "peaks": [0.02, 0.18, 0.41, 0.37, 0.52, 0.33, 0.08]
    },
    "audioAvailable": true,
    "audioExpiresAt": "2027-01-01T09:41:12.904Z",
    "cautions": []
  },
  "detection": {
    "label": "ai_generated",
    "inconclusiveReason": null,
    "reliability": {
      "level": "normal",
      "speechSec": 33.9,
      "note": ""
    },
    "signal": 0.91,
    "lean": 0.86,
    "windows": [
      {
        "start": 0,
        "end": 4,
        "signal": 0.62,
        "flag": true,
        "speech": 0.81,
        "lean": "ai_generated"
      },
      {
        "start": 2,
        "end": 6,
        "signal": 0.88,
        "flag": true,
        "speech": 0.95,
        "lean": "ai_generated"
      },
      {
        "start": 4,
        "end": 8,
        "signal": 0.41,
        "flag": false,
        "speech": 0.64,
        "lean": null
      }
    ],
    "pieces": [
      {
        "start": 0.4,
        "end": 9.8,
        "signal": 0.84,
        "flag": true
      }
    ],
    "flaggedShare": 0.86,
    "raw": null,
    "detector": {
      "model": "TrueSound",
      "version": "2.1",
      "demo": false
    },
    "rated": true
  },
  "failReason": null,
  "usage": {
    "counted": true,
    "seconds": 41.6,
    "clips": 1
  },
  "latencyMs": 5692,
  "share": null
}

List scans

Newest first. limit up to 100 (20 by default); pass nextCursor back as cursor for the next page. A development key sees development answers only.

curl
# Newest first, up to 100 a page. Pass nextCursor back as cursor for the next page.
curl -sS "https://auscultare.io/api/v1/scans?limit=50" -H "Authorization: Bearer $AUSCULTARE_KEY"
curl -sS "https://auscultare.io/api/v1/scans?limit=50&cursor=$NEXT_CURSOR" -H "Authorization: Bearer $AUSCULTARE_KEY"

Delete the audio, or the scan

The audio is kept for playback for 30 days and then deleted; the answer stays until you delete it. You can delete either one at any time.

curl
# Delete the stored audio now (the answer and its timeline stay).
curl -sS -X DELETE "https://auscultare.io/api/v1/scans/$SCAN_ID/audio" -H "Authorization: Bearer $AUSCULTARE_KEY"

# Delete the whole scan.
curl -sS -X DELETE "https://auscultare.io/api/v1/scans/$SCAN_ID" -H "Authorization: Bearer $AUSCULTARE_KEY"

Models and usage

One model answers today, TrueSound 2.1 (truesound-2.1). Usage is the same allowance the app shows, in seconds.

curl
# The models a scan can name (the default answers when "model" is left out).
curl -sS "https://auscultare.io/api/v1/models" -H "Authorization: Bearer $AUSCULTARE_KEY"

# What the workspace may still use this month: seconds of files and of live listening.
curl -sS "https://auscultare.io/api/v1/usage" -H "Authorization: Bearer $AUSCULTARE_KEY"

Limits

A recording longer than what a plan reads is read in evenly spread stretches, and the answer carries the long_recording caution.

Limits
PlanLongest fileRead up toKeys
Free15 minutes15 minutesDevelopment
Pro3 hours20 minutesProduction and development
Enterprise4 hours20 minutesProduction and development
Plans and allowances

Idempotency

Send an Idempotency-Key (1 to 255 visible characters) with POST /scans. For 24 hours the same key and the same request return the same scan, not counted again; the same key with a different request answers 422 idempotency_key_reused.

Idempotency-Key: episode-2026-12-02