Skip to content
readback

ASCII transcript to PDF API: a worked quickstart

Updated

Four calls turn a page-image ASCII deposition into finished PDFs. Upload the ASCII file, create a transcript, wait for the render (or get a webhook), then download the full-size and condensed PDFs with the word index and linked exhibits.

You can run all of it in test mode, which every Readback plan includes, including Free. Live keys are on the Agency and Enterprise plans.

POST /v1/files                     → file_…   (the ASCII, then each exhibit PDF)
POST /v1/transcripts               → trn_…    (queues the first render: rnd_…)
GET  /v1/renders/{id}              → status, acceptance, outputs
GET  /v1/renders/{id}/outputs/full_pdf → 302 to a 5-minute signed URL

Base URL: https://api.readbackhq.com. Full reference: the API reference. Overview, keys and plans: Developers.

Why not a generic text-to-PDF API

A court reporter's ASCII export is not ordinary text. It's a page-image export: every page break and every line number sits exactly where the certified transcript prints it. Attorneys cite testimony by page and line, so the PDF has to keep them exactly. A generic converter reflows the text, and the citations stop matching the record. More on the format: page-image ASCII.

A finished deposition also needs more than the pages:

  • a condensed edition, four transcript pages on each sheet, each labeled with its page number;
  • a word index (also called a concordance), every word with its page and line references;
  • exhibits appended and linked from the transcript;
  • the reporter's signature on the certificate.

The API builds all of these, then checks every PDF it built against the parsed transcript before it reports success.

Before you start

  1. A test key. In the Readback app, owners and admins open Developers and create a test key. Test keys start rb_test_. Send it as Authorization: Bearer rb_test_….
  2. A sample ASCII. Download the synthetic deposition from the samples page (sample-deposition.txt; every name in it is invented). Or use a test fixture and skip the upload.
  3. An HTTPS endpoint for webhooks, if you want them. It has to be a public https URL. Redirects are not followed. For local work, use a tunnel.

Step 1: upload the ASCII (and exhibits)

Upload the ASCII as a multipart form with purpose=transcript. A transcript file can be up to 10 MiB, which is enough for any ASCII deposition.

curl https://api.readbackhq.com/v1/files \
  -H "Authorization: Bearer $READBACK_KEY" \
  -H "Idempotency-Key: upload-smith-v1" \
  -F purpose=transcript \
  -F file=@sample-deposition.txt
{
  "id": "file_01k6q7c3x8e9r0t1y2v3w4x5y6",
  "object": "file",
  "livemode": false,
  "purpose": "transcript",
  "filename": "sample-deposition.txt",
  "content_type": "text/plain",
  "status": "ready",
  "expires_at": "2026-10-18T17:04:15.000Z"
}

(Abridged. Full schema: File in the reference.)

Exhibits are PDFs, uploaded the same way with purpose=exhibit:

curl https://api.readbackhq.com/v1/files \
  -H "Authorization: Bearer $READBACK_KEY" \
  -H "Idempotency-Key: upload-smith-ex1-v1" \
  -F purpose=exhibit \
  -F file=@exhibit-1.pdf
{
  "id": "file_01k6q7c3x8e9r0t1y2v3w4x5y7",
  "object": "file",
  "livemode": false,
  "purpose": "exhibit",
  "filename": "exhibit-1.pdf",
  "content_type": "application/pdf",
  "status": "ready"
}

(Abridged.) No exhibits? Leave exhibits out of step 2. For an exhibit over 10 MiB, call POST /v1/files/uploads. It returns a 15-minute signed PUT URL for up to 50 MiB. Then call POST /v1/files/{id}/complete, which checks the size, the file type and the SHA-256.

Uploaded files are staging copies. They're deleted 24 hours after you create them. A transcript keeps its own copies of what it uses.

Step 2: create the transcript and its first render

Name the ASCII file and the exhibit from step 1 (leave exhibits out if you uploaded none). Prefer: wait=30 holds the request for up to 30 seconds while the render runs.

curl https://api.readbackhq.com/v1/transcripts \
  -H "Authorization: Bearer $READBACK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-smith-v1" \
  -H "Prefer: wait=30" \
  -d '{
    "source_file": "file_01k6q7c3x8e9r0t1y2v3w4x5y6",
    "case_number": "2026-CV-01234",
    "exhibits": [
      { "designator": "1", "file": "file_01k6q7c3x8e9r0t1y2v3w4x5y7" }
    ],
    "render": { "editions": ["full", "condensed"] },
    "metadata": { "job_id": "88231" }
  }'
  • 201 means the render finished in time. 202 means it's still running. Either way, the response is the transcript, and latest_render.id is the render to follow.
  • render is optional. Without it, the first render uses your organization's defaults and builds both editions.
  • metadata takes your own keys, such as your job ID, and comes back on the transcript.

Step 3: wait, poll or listen

Follow the render with GET /v1/renders/{id}, or let webhooks tell you (step 5).

curl https://api.readbackhq.com/v1/renders/rnd_01k6q7c3x8e9r0t1y2v3w4x5y6 \
  -H "Authorization: Bearer $READBACK_KEY"

A render moves through these statuses:

StatusMeaningWhat to do
queued, processingRunning. progress.stage says where (parse, build, merge_exhibits, verify …)Wait, poll, or listen for a webhook
succeededDone. The PDFs are built and checkedDownload the outputs
needs_reviewDone, but the parser flagged the transcript. The outputs are review copiesRead acceptance.warnings; fix the export, or, for a live render, escalate to Readback staff (POST /v1/renders/{id}/escalate)
in_reviewWaiting on Readback staffWait for render.released or render.rejected
rejected, failed, canceledFinalRead rejection or failure

Each render carries the parser's verdict in acceptance: status (accepted or needs_review), a confidence from 0 to 1, and warnings with stable codes. Use the verdict, not just the presence of a PDF, to decide whether a transcript can go to a client.

Very large transcripts run on the heavy lane. They start more slowly, and Prefer: wait returns 202 at once.

Step 4: download the outputs

Each output is served by kind. The answer is a 302 to a signed URL that lasts 5 minutes, so follow the redirect.

curl -L -o smith-full.pdf \
  -H "Authorization: Bearer $READBACK_KEY" \
  https://api.readbackhq.com/v1/renders/rnd_01k6q7c3x8e9r0t1y2v3w4x5y6/outputs/full_pdf
KindWhat it is
full_pdfThe full-size transcript
condensed_pdfThe condensed transcript
verify_reportThe report of the automated checks
rtf, docxRich Text and Word copies, page for page and line for line, with the word index and exhibit index. Clean copies only, once the render is unlocked
model_jsonThe parsed transcript model (Enterprise, opt-in)

In test mode, PDFs are stamped TEST MODE, NOT FOR FILING.

Step 5: receive webhooks and verify the signature

Create an endpoint and choose the events:

curl https://api.readbackhq.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $READBACK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: endpoint-1" \
  -d '{
    "url": "https://example.com/hooks/readback",
    "enabled_events": ["render.succeeded", "render.needs_review", "render.failed"]
  }'

The response includes the endpoint's secret (whsec_…). It is shown only in this response, so store it.

Deliveries follow the Standard Webhooks specification. Each request carries three headers:

  • webhook-id: the event ID. Delivery is at least once, so dedupe on it.
  • webhook-timestamp: Unix seconds at the attempt.
  • webhook-signature: v1,<base64 HMAC-SHA256> of "<id>.<timestamp>.<body>". During a secret rotation there are two, separated by a space.

A verifier in Node.js, with no dependencies:

import { createHmac, timingSafeEqual } from "node:crypto";

/** Returns true when the delivery is from Readback and recent. */
export function verifyReadbackWebhook(rawBody, headers, secret) {
  const id = headers["webhook-id"];
  const sigHeader = headers["webhook-signature"];
  const timestamp = Number(headers["webhook-timestamp"]);
  if (!id || !sigHeader || !Number.isSafeInteger(timestamp)) return false;
  if (Math.abs(Date.now() / 1000 - timestamp) > 300) return false; // 5 minutes

  const key = Buffer.from(secret.slice("whsec_".length), "base64");
  const expected = createHmac("sha256", key)
    .update(`${id}.${timestamp}.${rawBody}`)
    .digest();

  return sigHeader.split(" ").some((candidate) => {
    const [version, signature] = candidate.split(",");
    if (version !== "v1" || !signature) return false;
    const given = Buffer.from(signature, "base64");
    return given.length === expected.length && timingSafeEqual(given, expected);
  });
}

Verify the raw request body, before any JSON parsing. Any Standard Webhooks library works too.

The body is an event:

{
  "id": "evt_01k6q7c3x8e9r0t1y2v3w4x5y6",
  "object": "event",
  "type": "render.succeeded",
  "livemode": false,
  "api_version": "v1",
  "created_at": "2026-10-17T17:04:15.000Z",
  "data": { "object": { "id": "rnd_…", "status": "succeeded" } }
}

data.object is a snapshot. Fetch the render with your key and treat that as the truth.

Retries. Answer with a 2xx within 10 seconds. A failed delivery is retried on a schedule: 8 attempts over about 24 hours. An endpoint that keeps failing for 72 hours, with at least 8 failed attempts in a row, is disabled, and the organization's owners and admins are emailed. Events are kept for 30 days in GET /v1/events, so you can catch up.

There are 25 event types, including transcript.parsed, render.succeeded, render.needs_review, render.failed, render.unlocked and the delivery repository's publication.published and publication.viewed.

Test fixtures

With a test key, pass a fixture ID as source_file instead of an uploaded file. Each one forces an outcome, like a test card number. List them with GET /v1/test/fixtures.

FixtureOutcome
file_test_acceptedSucceeds
file_test_needs_reviewEnds in needs_review
file_test_failFails
file_test_slowTakes a while, for testing waits and timeouts
file_test_heavyRuns on the heavy lane
curl https://api.readbackhq.com/v1/transcripts \
  -H "Authorization: Bearer $READBACK_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: quickstart-1" \
  -H "Prefer: wait=30" \
  -d '{ "source_file": "file_test_needs_review" }'

Your own uploaded ASCII files also work in test mode. Test data is fully separate from live data, test renders are free and never billed, and an organization can run up to 200 test renders in a rolling day.

Going live

  • Keys by plan. Test keys: every plan, including Free. Live keys (rb_live_…): Agency and Enterprise. A live key stops working if the plan no longer includes live keys.
  • What counts. A live transcript counts against the plan once, at its first unlock. Re-renders of the same transcript unlock free. A render that is needs_review can't be unlocked, so it isn't counted.
  • Unlocks. On Agency and Enterprise a live render unlocks, and counts, automatically when it succeeds. You can also call POST /v1/renders/{id}/unlock. Agency plans never ask before an extra transcript past the monthly allowance, up to a monthly cap.
  • Scopes. Give each key only what it needs. This quickstart uses files:write, transcripts:write, transcripts:read and webhooks:manage.

Plan prices: pricing. How we handle data: security.

Conventions

  • Idempotency. Send an Idempotency-Key on every POST. The same key with the same body within 24 hours replays the first answer. The same key with a different body is 409 idempotency_key_reused.
  • Errors. RFC 9457 problem documents (application/problem+json) with a stable code, such as file_too_large, render_locked or rate_limited.

Tracing, rate limits, pagination, versioning and size limits are in the API reference.

What the API does not do

  • It reads page-image ASCII only. It does not read CAT job files, Word documents or audio. Not sure about an export? Send us a sample.
  • It does not produce E-Transcript (.ptx) files or video sync files.
  • It does not certify transcripts. The reporter certifies; the API places the reporter's saved signature when you ask it to.
  • SDKs for TypeScript and Python are coming. Until then, use any HTTP client and the OpenAPI document.

API reference · Developers overview

Questions

Is there a free way to try the API?

Yes. Test mode is on every plan, including Free. Test renders are free, never billed, and stamped TEST MODE, NOT FOR FILING.

Which plans have live API keys?

Agency and Enterprise. Other plans have test keys only.

Can I convert any text file to a transcript PDF?

No. The input is a court reporter's page-image ASCII export, which keeps the page and line layout. A reflowed text file loses the page and line numbers attorneys cite.

Do I have to poll?

No. Use Prefer: wait=30 for standard renders, subscribe to webhooks, or both.

How do I know the PDF is right?

Every render reports the parser's verdict (accepted or needs_review) with a confidence score and warning codes, and every PDF is checked before the render succeeds. The verify_report output has the details.

Can I deliver the finished transcript to attorneys through the API?

Yes, through the delivery repository resources (cases, contacts, publications). They work with live keys only.

  • Developers: the Readback API

    A REST API for deposition transcripts: send the ASCII or your finished files, get the PDFs and the acceptance verdict, deliver to attorneys by case, and hear about it by signed webhook. Free test mode on every plan.

  • Page-image ASCII

    The plain-text file that keeps every page and line number. What it looks like and why text-to-PDF breaks it.

  • Sample deposition transcript PDF, full-size and condensed

    Download a free sample deposition transcript: full-size and condensed PDFs with a word index and linked exhibits, next to the ASCII they came from.

  • Pricing

    Two transcripts free, no card. Pay as you go, or plans priced by volume, never per seat, with launch prices for early subscribers.

  • Security

    Where transcripts live, who can reach them, how long we keep them, and what we have not done yet.

  • Contact and demo

    Book a demo for your agency, ask a question, or send us a sample export to confirm your CAT format.

Try it in test mode.

Test mode is on every plan, including Free. Test renders are never billed.