HearDraft
Specs & API Guides

Transcription API Walkthrough: Automating Audio-to-Text with Workspace Sync

Build a reliable backend transcription pipeline using HearDraft API v1 with Idempotency-Key retries, millisecond segment parsing, and automatic web workspace sync.

By HearDraft Editorial (Product & Audio Workflows)Published Updated 6 min read
Illustration of audio waveform flowing through API nodes into structured segments and a synced workspace editor

Key takeaway

HearDraft’s Transcription API v1 lets backends on active annual plans upload raw audio or video files (up to 100 MB and 10 hours) via POST /api/v1/transcriptions with mandatory Idempotency-Key protection, then poll GET /api/v1/transcriptions/{id} for millisecond-timestamped segments. Every API job automatically syncs to the owning HearDraft workspace so human editors can still replay audio, edit quotes, and export SRT/VTT or Markdown.

Why engineering teams pick HearDraft API v1

Most speech APIs dump raw JSON and leave human review to you. HearDraft pairs safe backend ingestion with a full browser review editor out of the box.

Read API documentation
Workspace-synced

API uploads appear inside the web editor

Every job returns a sourceId linked to your HearDraft workspace so editors can replay audio, fix speaker names, and export SRT or Markdown.

Safe retries

First-class Idempotency-Key protection

Payload fingerprinting guarantees network retries never create duplicate jobs—while mismatched metadata fails loudly with HTTP 409.

Millisecond JSON

Exact startMs / endMs per spoken segment

Feed integer millisecond timing directly into search indexes, custom players, or downstream caption generators.

Included annually

No separate per-minute API metering

API access is included with active annual Starter ($96/yr) and Team plans, with up to 120 requests/minute per workspace.

What are the core endpoints, limits, and plan requirements for HearDraft API v1?

API v1 consists of two workspace-scoped endpoints—one to upload raw media and queue transcription, and one to poll results—available on confirmed annual Starter and Team plans.

Keep your Bearer API key strictly on your backend server; never expose it in frontend browser code.

HearDraft Transcription API v1 technical specification
ParameterSpecification
Submit endpointPOST https://heardraft.com/api/v1/transcriptions?filename=<name>&language=auto
Poll endpointGET https://heardraft.com/api/v1/transcriptions/{id}
AuthenticationAuthorization: Bearer <HEARDRAFT_API_KEY> (active annual plan required)
Required upload headersContent-Type (audio/*, video/*, or application/octet-stream), Content-Length, Idempotency-Key (8–128 chars)
Per-request limitsUp to 100 MB and up to 10 hours per recording
Rate limit120 requests per minute per workspace
Segment precisionInteger milliseconds (startMs, endMs) plus optional speaker label

How do you submit a file and poll safely in TypeScript?

Attach a deterministic Idempotency-Key tied to your media asset ID, treat HTTP 202 as queued, and poll every few seconds until status reaches ready.

If a network timeout occurs mid-upload, retrying with the exact same Idempotency-Key and identical file metadata avoids creating duplicate jobs. Reusing a key with different file metadata returns HTTP 409 IDEMPOTENCY_CONFLICT.

TypeScript upload + polling helper for HearDraft API v1
import { readFile } from 'node:fs/promises';

const apiKey = process.env.HEARDRAFT_API_KEY!;
const file = await readFile('./interview.wav');

const upload = await fetch(
  'https://heardraft.com/api/v1/transcriptions?filename=interview.wav&language=auto',
  {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${apiKey}`,
      'Content-Type': 'audio/wav',
      'Content-Length': String(file.byteLength),
      'Idempotency-Key': 'interview-2026-11-24-001',
    },
    body: file,
  },
);

if (upload.status !== 202) {
  throw new Error(`Submit failed (${upload.status}): ${await upload.text()}`);
}

const { id } = await upload.json();

while (true) {
  const poll = await fetch(`https://heardraft.com/api/v1/transcriptions/${id}`, {
    headers: { Authorization: `Bearer ${apiKey}` },
  });
  const job = await poll.json();
  if (job.status === 'ready') {
    console.log(job.result.segments);
    break;
  }
  if (job.status === 'failed' || job.status === 'canceled') {
    throw new Error(job.error?.message ?? job.status);
  }
  await new Promise(resolve => setTimeout(resolve, 4000));
}

Why does workspace sync matter for production pipelines?

Even automated pipelines hit edge cases—overlapping speakers, industry jargon, or publish-ready quotes—where a two-minute human check beats re-running models.

Because every API submission returns a sourceId linked to your HearDraft workspace, your pipeline can post a direct review link to Slack or your editorial queue. An editor opens the exact recording in HearDraft, replays uncertain timestamps, renames speakers, and exports TXT, Markdown, CSV, SRT, or VTT.

Human editor verifying an API-synced transcript against original audio playback in HearDraft
API-created jobs sync directly to HearDraft Tasks, letting reviewers verify high-stakes quotes against source audio without building a custom editor.

Frequently asked questions

Which HearDraft plans include Transcription API access?
API keys require a confirmed, active paid annual plan (Starter Annual or Team Annual). Free, guest, and monthly plans do not include API access.
Does API v1 support webhooks yet?
Not yet. Current v1 pipelines poll GET /api/v1/transcriptions/{id} every few seconds until status becomes ready or failed.
Can I edit an API-created transcript inside the HearDraft web app?
Yes. Every accepted API task appears in the Tasks view of the owning workspace, where you can replay audio, edit passages, and export reviewed files.