Anam Transcription

Your first service integration

Quickstart

From backend setup to the final result

The workflow below captures browser audio with durable storage and acknowledgments. Use a test tenant, an authorized backend, and synthetic or authorized audio.

1. Provision the tenant on the backend

The operator uses PUT /v1/admin/clients/{clientId} for recoverable tenant registration. Keep secrets on the backend and maintain a stable mapping between your organization and the tenant. The service does not need to know your accounts, users or business objects.

Authorize the user and resource for every operation. References and metadata support lookup; they do not grant access. GET /v1/tenant reports granted capabilities and limits.

Administrative provisioning is separate from the tenant key and browser token. Idempotent registration must not generate a new key on every retry.

2. Reserve the capture idempotently

After authorizing the user, the backend calls POST /v1/captures. Preserve the key and identical payload until the response is confirmed. If the response is lost, recover the same reservation rather than creating another operation.

{
  "actor_ref": "actor_demo_01",
  "idempotency_key": "capture_demo_01",
  "language": "pt",
  "diarize": true,
  "realtime": false,
  "delivery_mode": "priority",
  "tracks": []
}

tracks: [] reserves mixed audio. For separate sources, configure generic labels and each source’s policy. A track may contain several people; it does not automatically identify a speaker.

The response identifies the reservation, job, public tenant, policy and tracks. These identifiers are not credentials.

3. Issue short-lived browser authorization

Your backend calls POST /v1/browser-credentials with the tenant key. Grant only the required scopes for jobs that have already been authorized. For an open capture:

{
  "actor_ref": "actor_demo_01",
  "job_ids": ["<job_id confirmed by the reservation>"],
  "scopes": ["capture:write", "jobs:read", "events:read", "recordings:read"],
  "ttl_seconds": 300
}

The frontend receives an access_token, expiration, scopes and authorized identifiers. Keep the token in memory and use Authorization: Bearer. Do not place tokens in URLs, logs or persistent storage. Renew through the backend after revalidating permissions.

For a finalized recording, issue only read scopes. Writing requires an open capture and the same actor as the reservation.

4. Capture, acknowledge and finalize every source

durable_pcm_v1 sends 16 kHz mono PCM per source, using immutable appends, offsets, SHA-256 and writer generations. The recorder SDK provides resampling, an encrypted spool, acknowledgments and replay.

  1. Reserve and connect the operation before requesting media access.
  2. Start the microphone or browser-tab picker only through an explicit user action.
  3. Persist pending chunks and send bounded batches. A network error does not authorize deleting audio or assuming an ACK.
  4. Pause to stop acquisition; pausing does not finalize processing.
  5. When finishing, confirm every source with POST /v1/browser/jobs/{jobId}/capture/finish.

HTTP 202 with state: sealing confirms the durable source manifest, not finished inference. Managed recovery continues processing independently of optional realtime. Leaving the screen does not require an open recording socket. Realtime is optional and does not replace the final result.

Capture and reconnection protocol and examples →

5. Follow processing state and retrieve the result

Use SSE for the interface, webhooks for the backend, or GET for reconciliation. An event does not grant permission to read content.

GET /v1/browser/jobs/{jobId}
GET /v1/browser/jobs/{jobId}/result

# Through the backend, with the tenant key:
GET /v1/jobs/{jobId}
GET /v1/jobs/{jobId}/result
GET /v1/transcripts?actor_ref=actor_demo_01

The event transcription.transcript_ready and job.transcript_ready_at mean text is available, not a new job status. completed means processing has finished; also check diarization and integrity. Finishing ASR does not turn a failed source into an intact capture.

Your backend can use PUT /v1/transcripts/{id}/reference to bind opaque application references. This binding is immutable. Free-form metadata does not replace authorization.

6. Make recovery part of the workflow

Situation Action
Reservation response lost Repeat the same key and payload; a different intent must receive a conflict.
Audio ACK lost Reconcile and resend the same immutable chunk. A byte counter alone is not sufficient to discard pending data.
Browser reloaded Reauthorize and recover the same job and spool. Do not start the microphone automatically.
Token expired or revoked Stop operations that have lost access and request a new authorization decision from the backend.
SSE cursor outside the replay window Apply the reset or snapshot and query current state. SSE does not provide push notifications when the browser is closed.
Repeated webhook Verify the signature, persist the inbox and deduplicate by delivery_id before applying effects.
Source interrupted Preserve the incomplete-capture state. Processing recovered audio does not prove the capture is complete.

Existing files and historical transcripts

POST /v1/jobs accepts files and has different guarantees from durable capture. Browser imports reserve POST /v1/uploads and PUT the exact file with a scoped grant. POST /v1/transcripts accepts normalized external text; genuine source attribution may be retained, while unknown evidence stays unknown. Read the limits and schemas in the REST reference.

Reports, semantic search and chat are independent consumers. Transfer only the authorized revisions required for each purpose.