Skip to main content
POST
/
voice
/
v1
/
sessions
/
{session_id}
/
audio
/
{file_name}
Upload Audio
curl --request POST \
  --url https://api.eka.care/voice/v1/sessions/{session_id}/audio/{file_name} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/octet-stream' \
  --data '"<string>"'
{
  "session_id": "ses_abc123def456",
  "success": true,
  "original_filename": "audio_0.webm"
}
Upload audio to a session as a raw binary body (not multipart/form-data, not JSON). The filename is supplied in the URL path and determines how the chunk is stored. This is the path for sessions created with upload_type: chunked.
The Content-Type header should be the audio MIME type (e.g. audio/webm;codecs=opus). If omitted, it is inferred from the file extension.
Streaming over a WebSocket instead? Create the session with upload_type: stream and use Stream Audio. For single full-file / batch uploads, use the SDKs or the deprecated EkaScribe v2 APIs.

Path parameters

ParameterDescription
session_idThe session_id returned by Create Session.
file_nameAudio filename with extension. For chunked uploads use <base>_<sequence>.<ext> (e.g. audio_0.webm).

Chunked upload flow

Call this endpoint once per chunk, in order, with sequentially numbered filenames:
POST /voice/v1/sessions/ses_abc123def456/audio/audio_0.webm
POST /voice/v1/sessions/ses_abc123def456/audio/audio_1.webm
POST /voice/v1/sessions/ses_abc123def456/audio/audio_2.webm
  • Filename format: <base>_<sequence>.<ext> — the base name is arbitrary, the sequence number determines order.
  • The server stores each chunk by its sequence number (e.g. 0.webm, 1.webm).
When all chunks are uploaded, call End Session and poll Get Session for results.

Supported audio formats

audio/webm;codecs=opus · audio/wav · audio/ogg · audio/ogg;codecs=opus · audio/mp4 · audio/m4a · audio/mp3

Limits

LimitValue
Max chunk size10 MB
Recommended chunk duration≤ 20 seconds

Example request

curl -X POST \
  "https://api.eka.care/voice/v1/sessions/ses_abc123def456/audio/audio_0.webm" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: audio/webm;codecs=opus" \
  --data-binary "@chunk_0.webm"

Error codes

Statuserror.codeWhen
400session_endedThe session was already ended (committed).
400session_completedProcessing already finished (success/failure).
400invalid_audio_formatThe MIME type is not in the supported list.
404session_not_foundThe session_id does not exist.
413chunk_too_largeThe chunk exceeds the maximum size.

Next step

When all chunks are uploaded, call End Session.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Audio MIME type. Inferred from the file extension if omitted.

Example:

"audio/webm;codecs=opus"

Path Parameters

session_id
string
required

Session ID returned by Create Session

Example:

"ses_abc123def456"

file_name
string
required

Audio filename with extension. For chunked uploads use <base>_<sequence>.<ext> (e.g. audio_0.webm, audio_1.mp3).

Example:

"audio_0.webm"

Body

application/octet-stream

Raw binary audio data (max 10 MB per chunk, ≤20s duration recommended).

The body is of type file.

Response

Audio uploaded successfully

session_id
string
Example:

"ses_abc123def456"

success
boolean
Example:

true

original_filename
string
Example:

"audio_0.webm"