Gevety
REST API Integration
Access your health data programmatically from any application, platform, or service using simple HTTP requests.
Prerequisites
- A Gevety account with uploaded lab results
- An API token from your Developer Settings
- Any HTTP client (curl, fetch, axios, requests, etc.)
1
Generate Your API Token
Your API token authenticates requests to the Gevety API. Keep it secure and never share it publicly.
- Go to Profile → Developer Settings
- Click "Generate New Token"
- Copy and securely store your token
Security Note: Your token grants full access to your health data. Store it securely and never commit it to version control. Use environment variables in production.
2
API Base URL
All API requests should be made to:
Base URL
https://api.gevety.com/api/v13
Authentication
Include your API token in the Authorization header with every request:
Authorization Header
Authorization: Bearer YOUR_API_TOKEN4
Available Endpoints
API tokens from Developer Settings access the MCP tools endpoints below. These are designed for AI integrations and programmatic access.
GET /mcp/tools/get_health_summaryOverall health score, concerns, and recommendationsGET /mcp/tools/query_biomarkerSpecific biomarker with history and trendsGET /mcp/tools/get_wearable_statsSleep, activity, and heart rate dataGET /mcp/tools/get_biological_ageCalculated biological age breakdownGET /mcp/tools/list_supplementsCurrent supplement stack with dosingGET /mcp/tools/get_upcoming_testsRecommended tests and their urgency5
Code Examples
cURL
Get Health Summary
curl -X GET "https://api.gevety.com/api/v1/mcp/tools/get_health_summary" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"Python
python
import requests
API_TOKEN = "YOUR_API_TOKEN" # From Developer Settings (gvt_...)
BASE_URL = "https://api.gevety.com/api/v1/mcp/tools"
headers = {
"Authorization": f"Bearer {API_TOKEN}",
"Content-Type": "application/json"
}
# Get health summary
response = requests.get(f"{BASE_URL}/get_health_summary", headers=headers)
summary = response.json()
# Query a specific biomarker (with history)
response = requests.get(
f"{BASE_URL}/query_biomarker",
params={"biomarker": "vitamin d"},
headers=headers
)
vitamin_d = response.json()JavaScript / TypeScript
javascript
const API_TOKEN = "YOUR_API_TOKEN"; // From Developer Settings (gvt_...)
const BASE_URL = "https://api.gevety.com/api/v1/mcp/tools";
async function getHealthSummary() {
const response = await fetch(`${BASE_URL}/get_health_summary`, {
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
"Content-Type": "application/json"
}
});
return response.json();
}
// Get health summary
const summary = await getHealthSummary();
// Query specific biomarker
const vitaminD = await fetch(
`${BASE_URL}/query_biomarker?biomarker=vitamin%20d`,
{
headers: {
"Authorization": `Bearer ${API_TOKEN}`,
"Content-Type": "application/json"
}
}
).then(r => r.json());Response Format
All responses are JSON. Response structure varies by endpoint. See the examples below for common response formats:
get_health_summary Response
{
"overall_score": 78,
"overall_status": "good",
"trend": "stable",
"axis_scores": [
{ "axis": "metabolic", "score": 82, "status": "good" },
{ "axis": "cardiovascular", "score": 75, "status": "fair" },
{ "axis": "inflammation", "score": 80, "status": "good" }
],
"top_concerns": [
{ "biomarker": "Vitamin D", "axis": "metabolic", "impact": 5.2, "status": "low" }
],
"total_biomarkers": 45,
"last_test_date": "2026-01-15"
}query_biomarker Response
{
"canonical_name": "Vitamin D",
"category": "Vitamins",
"unit": "ng/mL",
"latest": {
"test_date": "2026-01-15",
"value": 45.2,
"unit": "ng/mL",
"flag": null,
"reference_low": 30,
"reference_high": 100
},
"trend": {
"direction": "increasing",
"percent_change": 12.5,
"data_points": 3
},
"optimal_range": { "min": 40, "max": 60 },
"history": [...]
}Error Response
{
"detail": "Invalid or expired token"
}Best Practices
For optimal API usage:
- Cache responses when possible to reduce API calls
- Use pagination for endpoints that return lists
- Handle errors gracefully with retry logic
Implement exponential backoff for retries to handle temporary failures gracefully.
Common Use Cases
Build a custom health dashboard
Integrate with fitness tracking apps
Create automated health reports
Power custom GPT or AI assistants
Troubleshooting
401 Unauthorized Error
- Verify your API token is correct and hasn't expired
- Ensure the Authorization header format is exactly
Bearer YOUR_TOKEN - Check that there's a space between "Bearer" and the token
- Generate a new token from your Developer Settings
429 Too Many Requests
- You're making requests too quickly
- Implement exponential backoff in your code
- Consider caching responses locally
- Wait a few seconds before retrying
Empty or missing data
- Ensure you've uploaded lab results to your Gevety account
- Check that the biomarker name is spelled correctly
- Use
GET /mcp/tools/list_available_datato see what data is available for your account
Related Integrations
Ready to Build?
Generate your API token from Developer Settings and start integrating your health data today.