scribe:write to upload and scribe:read to retrieve the result.
Upload sequence
1. Create an upload
POST /sessions/{session_id}/recording-uploads
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
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
SetCORTEXA_UPLOAD_URL to the returned URL. Send the returned headers; for the
audio/wav example they contain Content-Type: audio/wav:
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
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 readGET /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.