Extract or retry document text extraction
curl --request POST \
--url https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract', 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.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-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"
"net/http"
"io"
)
func main() {
url := "https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a",
"filename": "intake_form_maria_santos.pdf",
"file_size": 245760,
"public_url": "<string>",
"upload_date": "2026-03-20T11:15:00.000Z",
"extracted_date": "2026-03-20T11:16:00.000Z",
"extraction_error": "No text could be extracted from the PDF",
"has_extracted_text": true,
"extracted_text_length": 2048,
"external_id": "PARTNER-DOC-456"
},
"success": true,
"message": "Text extracted successfully",
"error": "Text extraction failed",
"details": "No text could be extracted from the PDF"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "Rate limit exceeded. Please retry after the window resets."
}{
"data": {
"id": "d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a",
"filename": "intake_form_maria_santos.pdf",
"file_size": 245760,
"public_url": "<string>",
"upload_date": "2026-03-20T11:15:00.000Z",
"extracted_date": "2026-03-20T11:16:00.000Z",
"extraction_error": "No text could be extracted from the PDF",
"has_extracted_text": true,
"extracted_text_length": 2048,
"external_id": "PARTNER-DOC-456"
},
"success": true,
"message": "Text extracted successfully",
"error": "Text extraction failed",
"details": "No text could be extracted from the PDF"
}Documents
Extract or retry document text extraction
Starts or retries text extraction for a patient document and returns the latest extraction status.
POST
/
patients
/
{patientId}
/
documents
/
{documentId}
/
extract
Extract or retry document text extraction
curl --request POST \
--url https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract', 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.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-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"
"net/http"
"io"
)
func main() {
url := "https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.healos.ai/ext-api/v1/patients/{patientId}/documents/{documentId}/extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a",
"filename": "intake_form_maria_santos.pdf",
"file_size": 245760,
"public_url": "<string>",
"upload_date": "2026-03-20T11:15:00.000Z",
"extracted_date": "2026-03-20T11:16:00.000Z",
"extraction_error": "No text could be extracted from the PDF",
"has_extracted_text": true,
"extracted_text_length": 2048,
"external_id": "PARTNER-DOC-456"
},
"success": true,
"message": "Text extracted successfully",
"error": "Text extraction failed",
"details": "No text could be extracted from the PDF"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "Rate limit exceeded. Please retry after the window resets."
}{
"data": {
"id": "d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a",
"filename": "intake_form_maria_santos.pdf",
"file_size": 245760,
"public_url": "<string>",
"upload_date": "2026-03-20T11:15:00.000Z",
"extracted_date": "2026-03-20T11:16:00.000Z",
"extraction_error": "No text could be extracted from the PDF",
"has_extracted_text": true,
"extracted_text_length": 2048,
"external_id": "PARTNER-DOC-456"
},
"success": true,
"message": "Text extracted successfully",
"error": "Text extraction failed",
"details": "No text could be extracted from the PDF"
}Authorizations
API key obtained from /api/v1/ext-api-keys
Path Parameters
Patient ID
Example:
"1743552000000"
Document ID
Example:
"d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a"
Was this page helpful?
⌘I

