Skip to main content
POST
/
voice
/
v1
/
sessions
/
{session_id}
/
audio
/
{file_sequence}
Upload Audio
curl --request POST \
  --url https://api.eka.care/voice/v1/sessions/{session_id}/audio/{file_sequence} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/octet-stream' \
  --data '"<string>"'
import requests

url = "https://api.eka.care/voice/v1/sessions/{session_id}/audio/{file_sequence}"

payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/octet-stream"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/octet-stream'},
body: JSON.stringify('<string>')
};

fetch('https://api.eka.care/voice/v1/sessions/{session_id}/audio/{file_sequence}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eka.care/voice/v1/sessions/{session_id}/audio/{file_sequence}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/octet-stream"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.eka.care/voice/v1/sessions/{session_id}/audio/{file_sequence}"

payload := strings.NewReader("\"<string>\"")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/octet-stream")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.eka.care/voice/v1/sessions/{session_id}/audio/{file_sequence}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/octet-stream")
.body("\"<string>\"")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.eka.care/voice/v1/sessions/{session_id}/audio/{file_sequence}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'
request.body = "\"<string>\""

response = http.request(request)
puts response.read_body
{
  "session_id": "ses_abc123def456",
  "success": true,
  "original_filename": "audio_0.webm"
}
{
"error": {
"code": "invalid_audio_format",
"message": "Audio format 'audio/mp3' is not supported",
"details": {}
}
}
{
"error": {
"code": "invalid_audio_format",
"message": "Audio format 'audio/mp3' is not supported",
"details": {}
}
}
{
"error": {
"code": "invalid_audio_format",
"message": "Audio format 'audio/mp3' is not supported",
"details": {}
}
}
Send audio as a raw binary body (not multipart, not JSON). single: call once with the complete file (≤10 MB) as audio_0.webm. chunked: call once per chunk, incrementing the sequence (audio_0.webm, audio_1.webm, …).
This endpoint can’t be tried from the browser — the docs playground can’t send raw binary bodies. Use the cURL below (or any HTTP client) instead; every other EkaScribe endpoint works in the playground.
No Content-Type header needed — it’s detected from the file_sequence extension (.webm, .mp3, .wav, .ogg, .m4a, .mp4).
curl -X POST "https://api.eka.care/voice/v1/sessions/{session_id}/audio/audio_0.mp3" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  --data-binary "@/path/to/consultation.mp3"
When all audio is uploaded, call End Session. For real-time streaming use Stream Audio instead.

Authorizations

Authorization
string
header
required

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

Headers

Content-Type
enum<string>

Audio MIME type. Leave unset — the server detects it automatically from the file_sequence extension (.webm, .mp3, .wav, .ogg, .m4a, .mp4). Generic values like application/octet-stream are also auto-resolved from the extension.

Available options:
audio/webm;codecs=opus,
audio/mp3,
audio/wav,
audio/ogg,
audio/m4a,
audio/mp4

Path Parameters

session_id
string
required

Session ID returned by Create Session

Example:

"ses_abc123def456"

file_sequence
string
required

Audio filename with a sequence number and extension: <base>_<sequence>.<ext>. For single uploads just use audio_0.webm; for chunked uploads increment the sequence per chunk (audio_0.webm, audio_1.webm, ...).

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"