All endpoints require an API key sent in the request header:
X-API-KEY: <your_api_key>
If a rate limit is exceeded, the API responds with 429 Too Many Requests and a retry message.
POST /api/v1/pcr/upload/
Upload one or more documents for asynchronous summarization. You can include any number of extra form fields—they will be stored in metadata, and if you provide a webhook_url, they will all be forwarded in that webhook.
Patient auto-lookup/creation: If you supply email, first_name, and last_name in your form fields, the API will:
first_name/last_name or swapped).email, first_name, and last_name will also be reflected on your account in the Global Scribe app.Content-Type: multipart/form-datafiles: array of file uploadsextra_information (optional): additional context or noteswebhook_url (optional): URL to receive a POST when processing completesmetadata.emailfirst_namelast_name200 OK{
"message": "Files uploaded successfully; processing is underway.",
"upload_id": "684a9f404c658fc1a0743af9",
"webhook_url": "https://your-hook.example.com/notify",
"extra_information": "Patient Tony Stark, June 2025 notes",
"metadata": {
"unique_identifier": "case-1234",
"foo": "bar",
"email": "tony.stark@example.com",
"first_name": "Tony",
"last_name": "Stark"
}
}
429 Too Many Requests{
"detail": "Rate limit of 10 requests per hour exceeded. Please try again after an hour."
}
POST /api/v1/pcr/upload/text/
Submit plain text for immediate summarization. You can include any extra JSON properties; they will be stored in metadata and forwarded via webhook if you supply one.
Content-Type: application/json
{
"user_input": "Text to be summarized.",
"extra_information": "Optional context or instructions.",
"webhook_url": "https://your-hook.example.com/notify",
"unique_identifier": "note-5678",
"foo": "bar"
}
200 OK{
"response": "Generated summary of the provided text.",
"webhook_url": "https://your-hook.example.com/notify",
"extra_information": "Optional context or instructions.",
"metadata": {
"unique_identifier": "note-5678",
"foo": "bar"
}
}
429 Too Many Requests{
"detail": "Rate limit of 10 requests per hour exceeded. Please try again after an hour."
}
GET /api/v1/pcr/{upload_id}
Check the processing status of a previously uploaded batch. The response includes your original extra_information, stored metadata, and the patient lookup fields if provided.
| Parameter | Type | Description |
|---|---|---|
upload_id | string | ID returned when files were uploaded |
200 OK{
"status": "completed", // or "queued", "processing", "failed"
"response": "Summarized content of the uploaded files...",
"extra_information": "Patient Tony Stark, June 2025 notes",
"metadata": {
"unique_identifier": "case-1234",
"foo": "bar",
"email": "tony.stark@example.com",
"first_name": "Tony",
"last_name": "Stark"
}
}
400 Bad Request – Invalid upload_id format404 Not Found – No upload found for the given ID429 Too Many Requests – Rate limit of 5 requests per minute exceeded| Field | Type | Description |
|---|---|---|
message | string | Informational message |
upload_id | string | Identifier for async file uploads |
status | string | One of queued, processing, completed, failed |
response | string | Generated summary text |
extra_information | string | Original context or instructions you provided |
webhook_url | string | URL you provided to receive completion callbacks |
metadata | object | All other fields you sent, echoed back and forwarded; if you provided email, first_name, and last_name, those will also appear here and drive patient auto-lookup/creation (and reflect in your Global Scribe app account). |
detail | string | Error or rate-limit detail message |
For API key requests or assistance, please contact contact@sporohealth.com.