curl -X POST "https://api.sully.ai/alpha/consensus" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What are the differential diagnoses for a 45-year-old patient presenting with chest pain, shortness of breath, and elevated troponin levels?"
}'
const response = await fetch('https://api.sully.ai/alpha/consensus', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: "What are the differential diagnoses for a 45-year-old patient presenting with chest pain, shortness of breath, and elevated troponin levels?"
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.sully.ai/alpha/consensus"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"query": "What are the differential diagnoses for a 45-year-old patient presenting with chest pain, shortness of breath, and elevated troponin levels?"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)
{
"data": {
"id": "consensus_abc123def456",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"metadata": {}
}
}
Alpha API Reference
Create Medical Consensus
Create a new medical consensus request to get expert medical opinions on a query.
POST
/
alpha
/
consensus
curl -X POST "https://api.sully.ai/alpha/consensus" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What are the differential diagnoses for a 45-year-old patient presenting with chest pain, shortness of breath, and elevated troponin levels?"
}'
const response = await fetch('https://api.sully.ai/alpha/consensus', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: "What are the differential diagnoses for a 45-year-old patient presenting with chest pain, shortness of breath, and elevated troponin levels?"
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.sully.ai/alpha/consensus"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"query": "What are the differential diagnoses for a 45-year-old patient presenting with chest pain, shortness of breath, and elevated troponin levels?"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)
{
"data": {
"id": "consensus_abc123def456",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"metadata": {}
}
}
Overview
The medical consensus endpoint allows you to submit queries to get expert medical opinions and consensus from multiple sources. This is useful for getting second opinions, validating diagnoses, or exploring treatment options.Rate Limiting
This endpoint is rate limited to prevent abuse:- Limit: Configurable requests per day (based on your plan)
- Window: 24 hours
- Behavior: Requests exceeding the limit will be blocked
Request Body
string
required
The medical query or question you want to get consensus on. This should be a clear, specific medical question or scenario.
Response
object
The created consensus request object
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 POST "https://api.sully.ai/alpha/consensus" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What are the differential diagnoses for a 45-year-old patient presenting with chest pain, shortness of breath, and elevated troponin levels?"
}'
const response = await fetch('https://api.sully.ai/alpha/consensus', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: "What are the differential diagnoses for a 45-year-old patient presenting with chest pain, shortness of breath, and elevated troponin levels?"
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://api.sully.ai/alpha/consensus"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"query": "What are the differential diagnoses for a 45-year-old patient presenting with chest pain, shortness of breath, and elevated troponin levels?"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)
{
"data": {
"id": "consensus_abc123def456",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"metadata": {}
}
}
Status Codes
Accepted
Consensus request created successfully and is being processed
Bad Request
Invalid request body or missing required parameters
Unauthorized
Invalid or missing API key
Too Many Requests
Rate limit exceeded - wait before making another request
Internal Server Error
Server error occurred while processing the request
Next Steps
After creating a consensus request:- Poll for results: Use the Get Consensus endpoint with the returned ID to check the status and retrieve results
- Clean up: Use the Delete Consensus endpoint to remove requests you no longer need