curl -X GET "https://api.sully.ai/alpha/consensus/consensus_abc123def456" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch('https://api.sully.ai/alpha/consensus/consensus_abc123def456', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.sully.ai/alpha/consensus/consensus_abc123def456"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)
{
"data": {
"id": "consensus_abc123def456",
"status": "completed",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z",
"result": {
"consensus_response": "Based on the clinical presentation of chest pain, shortness of breath, and elevated troponin levels in a 45-year-old patient, the most likely diagnosis is acute myocardial infarction (AMI). However, several differential diagnoses should be considered including pulmonary embolism, aortic dissection, and myocarditis. Immediate ECG and chest X-ray are recommended, along with serial troponin measurements. Consider CT pulmonary angiogram if PE is suspected, and cardiology consultation is recommended."
},
"metadata": {}
}
}
{
"data": {
"id": "consensus_abc123def456",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"metadata": {}
}
}
{
"data": {
"id": "consensus_abc123def456",
"status": "failed",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z",
"result": {
"error": "Request was rejected by the medical consensus bouncer due to insufficient clinical context"
},
"metadata": {}
}
}
Alpha API Reference
Get Medical Consensus
Retrieve a medical consensus request by its unique identifier.
GET
/
alpha
/
consensus
/
{id}
curl -X GET "https://api.sully.ai/alpha/consensus/consensus_abc123def456" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch('https://api.sully.ai/alpha/consensus/consensus_abc123def456', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.sully.ai/alpha/consensus/consensus_abc123def456"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)
{
"data": {
"id": "consensus_abc123def456",
"status": "completed",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z",
"result": {
"consensus_response": "Based on the clinical presentation of chest pain, shortness of breath, and elevated troponin levels in a 45-year-old patient, the most likely diagnosis is acute myocardial infarction (AMI). However, several differential diagnoses should be considered including pulmonary embolism, aortic dissection, and myocarditis. Immediate ECG and chest X-ray are recommended, along with serial troponin measurements. Consider CT pulmonary angiogram if PE is suspected, and cardiology consultation is recommended."
},
"metadata": {}
}
}
{
"data": {
"id": "consensus_abc123def456",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"metadata": {}
}
}
{
"data": {
"id": "consensus_abc123def456",
"status": "failed",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z",
"result": {
"error": "Request was rejected by the medical consensus bouncer due to insufficient clinical context"
},
"metadata": {}
}
}
Overview
Retrieve the details and results of a specific medical consensus request using its unique identifier. This endpoint returns the current status of the request and any available consensus results.Path Parameters
string
required
The unique identifier of the consensus request to retrieve
Response
object
The consensus request object with current status and results
Show Consensus Request Object
Show Consensus Request Object
string
Unique identifier for the consensus request
string
Current status of the consensus request
pending: Request is queued for processingprocessing: Currently being analyzedcompleted: Analysis complete, results availablefailed: Processing failed
string
Timestamp when the request was created (ISO 8601 format)
string
Timestamp when the request was last updated (ISO 8601 format)
object
object
Additional metadata associated with the request
curl -X GET "https://api.sully.ai/alpha/consensus/consensus_abc123def456" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch('https://api.sully.ai/alpha/consensus/consensus_abc123def456', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.sully.ai/alpha/consensus/consensus_abc123def456"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
result = response.json()
print(result)
{
"data": {
"id": "consensus_abc123def456",
"status": "completed",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z",
"result": {
"consensus_response": "Based on the clinical presentation of chest pain, shortness of breath, and elevated troponin levels in a 45-year-old patient, the most likely diagnosis is acute myocardial infarction (AMI). However, several differential diagnoses should be considered including pulmonary embolism, aortic dissection, and myocarditis. Immediate ECG and chest X-ray are recommended, along with serial troponin measurements. Consider CT pulmonary angiogram if PE is suspected, and cardiology consultation is recommended."
},
"metadata": {}
}
}
{
"data": {
"id": "consensus_abc123def456",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"metadata": {}
}
}
{
"data": {
"id": "consensus_abc123def456",
"status": "failed",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:35:00Z",
"result": {
"error": "Request was rejected by the medical consensus bouncer due to insufficient clinical context"
},
"metadata": {}
}
}
Status Codes
OK
Consensus request retrieved successfully
Unauthorized
Invalid or missing API key
Not Found
Consensus request with the specified ID was not found
Internal Server Error
Server error occurred while retrieving the request
Polling for Results
Since consensus requests are processed asynchronously, you may need to poll this endpoint periodically to check for completion:async function waitForConsensus(consensusId) {
let status = 'pending';
while (status === 'pending' || status === 'processing') {
const response = await fetch(`https://api.sully.ai/alpha/consensus/${consensusId}`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const data = await response.json();
status = data.data.status;
if (status === 'completed') {
return data.data;
}
if (status === 'failed') {
throw new Error('Consensus processing failed');
}
// Wait 5 seconds before polling again
await new Promise(resolve => setTimeout(resolve, 5000));
}
}
Related Endpoints
- Create Consensus - Create a new consensus request
- Delete Consensus - Delete a consensus request
⌘I