curl --request POST \
--url https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish \
--header 'Content-Type: application/json' \
--header 'x-daai-api-key: <api-key>' \
--data '
{
"specialty": "generic"
}
'import requests
url = "https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish"
payload = { "specialty": "generic" }
headers = {
"x-daai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-daai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({specialty: 'generic'})
};
fetch('https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish', 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://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish",
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([
'specialty' => 'generic'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-daai-api-key: <api-key>"
],
]);
$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://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish"
payload := strings.NewReader("{\n \"specialty\": \"generic\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-daai-api-key", "<api-key>")
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://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish")
.header("x-daai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"specialty\": \"generic\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-daai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"specialty\": \"generic\"\n}"
response = http.request(request)
puts response.read_body{
"id": "s0q0ud3fi1d9kcwjrt8vs50n",
"transcription": "",
"recording": {},
"report": {
"specialty": "generic",
"content": {}
},
"metadata": {}
}{
"message": "Unauthorized",
"statusCode": 401
}{
"message": "Consultation not found",
"error": "Not Found",
"statusCode": 404
}{
"message": [
"specialty must be a string"
],
"error": "Unprocessable Entity",
"statusCode": 422
}Finalizar consulta
Finaliza a consulta e inicia o processamento do áudio. A especialidade pode ser especificada para determinar o template do relatório.
curl --request POST \
--url https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish \
--header 'Content-Type: application/json' \
--header 'x-daai-api-key: <api-key>' \
--data '
{
"specialty": "generic"
}
'import requests
url = "https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish"
payload = { "specialty": "generic" }
headers = {
"x-daai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-daai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({specialty: 'generic'})
};
fetch('https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish', 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://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish",
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([
'specialty' => 'generic'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-daai-api-key: <api-key>"
],
]);
$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://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish"
payload := strings.NewReader("{\n \"specialty\": \"generic\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-daai-api-key", "<api-key>")
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://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish")
.header("x-daai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"specialty\": \"generic\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apim.doctorassistant.ai/api/sandbox/consultations/v2/{DAAI_CONSULTATION_ID}/recordings/{DAAI_RECORDING_ID}/finish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-daai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"specialty\": \"generic\"\n}"
response = http.request(request)
puts response.read_body{
"id": "s0q0ud3fi1d9kcwjrt8vs50n",
"transcription": "",
"recording": {},
"report": {
"specialty": "generic",
"content": {}
},
"metadata": {}
}{
"message": "Unauthorized",
"statusCode": 401
}{
"message": "Consultation not found",
"error": "Not Found",
"statusCode": 404
}{
"message": [
"specialty must be a string"
],
"error": "Unprocessable Entity",
"statusCode": 422
}Autorizações
Chave de API para autenticação
Corpo
Especialidade da consulta. Se não informada, será considerada como 'generic'
"generic"
Esquema do relatório. Se não informado, será considerado o esquema padrão da especialidade ou o configurado globalmente.
- O campo
schemadeve ser um JSON Schema válido, conforme a especificação oficial. Isso garante que o relatório gerado siga a estrutura esperada. - O campo
fewShotsdeve conter exemplos que satisfazem o schema definido.
Dica: É possível testar e validar a configuração do relatório customizado diretamente no backoffice, na aba de transformação nas configurações da aplicação. Assim, você pode experimentar diferentes schemas e exemplos antes de aplicar em produção.
Show child attributes
Show child attributes
Resposta
Consulta finalizada com sucesso
ID da consulta
"s0q0ud3fi1d9kcwjrt8vs50n"
Transcrição da consulta
""
Informações da gravação
{}
Relatório da consulta
Show child attributes
Show child attributes
Metadados da consulta
{}