Create transcription record
curl --request POST \
--url https://{your-prod-endpoint}/v1/transcriptions/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-doctor: <x-doctor>' \
--data '
{
"duration_seconds": 180,
"original_transcript": "The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...",
"language_used": "en"
}
'import requests
url = "https://{your-prod-endpoint}/v1/transcriptions/create"
payload = {
"duration_seconds": 180,
"original_transcript": "The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...",
"language_used": "en"
}
headers = {
"x-doctor": "<x-doctor>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-doctor': '<x-doctor>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
duration_seconds: 180,
original_transcript: 'The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...',
language_used: 'en'
})
};
fetch('https://{your-prod-endpoint}/v1/transcriptions/create', 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://{your-prod-endpoint}/v1/transcriptions/create",
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([
'duration_seconds' => 180,
'original_transcript' => 'The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...',
'language_used' => 'en'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-doctor: <x-doctor>"
],
]);
$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://{your-prod-endpoint}/v1/transcriptions/create"
payload := strings.NewReader("{\n \"duration_seconds\": 180,\n \"original_transcript\": \"The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...\",\n \"language_used\": \"en\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-doctor", "<x-doctor>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{your-prod-endpoint}/v1/transcriptions/create")
.header("x-doctor", "<x-doctor>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"duration_seconds\": 180,\n \"original_transcript\": \"The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...\",\n \"language_used\": \"en\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-prod-endpoint}/v1/transcriptions/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-doctor"] = '<x-doctor>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"duration_seconds\": 180,\n \"original_transcript\": \"The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...\",\n \"language_used\": \"en\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Transcription created successfully",
"transcription": {
"id": "trans_abc123xyz",
"user_id": "usr_123456789",
"group_id": "grp_987654321",
"duration_seconds": 180,
"language_used": "en",
"original_transcript": "The patient is a 45-year-old male...",
"created_at": "2023-10-09T10:00:00.000Z",
"updated_at": "2023-10-09T10:00:00.000Z"
}
}{
"success": false,
"error": "Bad Request",
"details": "duration_seconds and original_transcript are required"
}{
"success": false,
"error": "Bad Request",
"details": "Either medical_note or pdf_file must be provided"
}API Reference
Create transcription record
Creates a new transcription record for audio-to-text conversion from patient-doctor conversations. This is the first step in the clinical documentation workflow - stores the raw transcription from a doctor-patient conversation before AI processing.
POST
/
v1
/
transcriptions
/
create
Create transcription record
curl --request POST \
--url https://{your-prod-endpoint}/v1/transcriptions/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-doctor: <x-doctor>' \
--data '
{
"duration_seconds": 180,
"original_transcript": "The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...",
"language_used": "en"
}
'import requests
url = "https://{your-prod-endpoint}/v1/transcriptions/create"
payload = {
"duration_seconds": 180,
"original_transcript": "The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...",
"language_used": "en"
}
headers = {
"x-doctor": "<x-doctor>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-doctor': '<x-doctor>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
duration_seconds: 180,
original_transcript: 'The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...',
language_used: 'en'
})
};
fetch('https://{your-prod-endpoint}/v1/transcriptions/create', 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://{your-prod-endpoint}/v1/transcriptions/create",
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([
'duration_seconds' => 180,
'original_transcript' => 'The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...',
'language_used' => 'en'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-doctor: <x-doctor>"
],
]);
$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://{your-prod-endpoint}/v1/transcriptions/create"
payload := strings.NewReader("{\n \"duration_seconds\": 180,\n \"original_transcript\": \"The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...\",\n \"language_used\": \"en\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-doctor", "<x-doctor>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{your-prod-endpoint}/v1/transcriptions/create")
.header("x-doctor", "<x-doctor>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"duration_seconds\": 180,\n \"original_transcript\": \"The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...\",\n \"language_used\": \"en\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{your-prod-endpoint}/v1/transcriptions/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-doctor"] = '<x-doctor>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"duration_seconds\": 180,\n \"original_transcript\": \"The patient is a 45-year-old male presenting with chest pain radiating to left arm for the past 2 hours...\",\n \"language_used\": \"en\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Transcription created successfully",
"transcription": {
"id": "trans_abc123xyz",
"user_id": "usr_123456789",
"group_id": "grp_987654321",
"duration_seconds": 180,
"language_used": "en",
"original_transcript": "The patient is a 45-year-old male...",
"created_at": "2023-10-09T10:00:00.000Z",
"updated_at": "2023-10-09T10:00:00.000Z"
}
}{
"success": false,
"error": "Bad Request",
"details": "duration_seconds and original_transcript are required"
}{
"success": false,
"error": "Bad Request",
"details": "Either medical_note or pdf_file must be provided"
}Autorizaciones
Bearer token for API authentication
Encabezados
Doctor identifier for tracking and auditing
Patient identifier for tracking and auditing
Cuerpo
application/json
Duration of the recording in seconds
Rango requerido:
x >= 0Ejemplo:
180
The transcribed text from the conversation
Ejemplo:
"The patient is a 45-year-old male presenting with chest pain..."
Language code (e.g., 'en', 'es', 'fr')
Ejemplo:
"en"
⌘I