Skip to main content
Upload a complete recording, then retrieve its transcript. For audio captured during a consultation, use segmented transcription. Before you begin: create a session and prepare a synthetic audio file. Use scribe:write to upload and scribe:read to retrieve the result.

Upload sequence

1. Create an upload

POST /sessions/{session_id}/recording-uploads
Replace the illustrative file size with the actual number of bytes in your file. The 201 response contains id, session_id, status, and part_count. Save id as CORTEXA_UPLOAD_ID. This is the upload ID, not the recording ID returned later on completion.

2. Request a URL for a part

The response contains upload_url, expires_at, and required headers. Parts are numbered from 1, unlike zero-based segmented transcription indices. Signed URLs expire after 15 minutes; request another URL if necessary.

3. Upload the bytes

Set CORTEXA_UPLOAD_URL to the returned URL. Send the returned headers; for the audio/wav example they contain Content-Type: audio/wav:
Save the storage response’s ETag for completion. Use only the returned storage headers on this PUT; the signed URL supplies authorization. Keep the Partner JWT on Cortexa API requests. For multiple parts, request and upload each consecutive part, retaining every part’s number and ETag.

4. Complete the upload

POST /recording-uploads/{upload_id}/completion
Replace the ETag and duration with the values for your recording. duration_ms is the whole recording’s duration in milliseconds. Include every uploaded part. The 202 response contains the recording id, status, and a transcription_job_id when processing is scheduled.

5. Retrieve the transcript and generate a note

Poll the returned transcription job until it succeeds, then read GET /sessions/{session_id}/transcript. Submit the resulting session to consult-note generation. Completing the upload starts transcription. Fetching the transcript only reads the current result.

Retry an interrupted upload

Reuse the same idempotency key and body for a retried upload-creation or completion operation. If a signed URL expires, request a fresh URL for that part. Do not call completion until the part PUTs have succeeded and their ETags are available. Keep upload and recording IDs separate in your application. See Errors for request failures and Jobs for transcription failures.