Complete guide to using Dr7.ai Medical API
Dr7.ai Medical API uses API keys for authentication. Include your API key in the Authorization header:
Authorization: Bearer sk-dr7-your-api-keyNote: Keep your API key secure and never expose it in client-side code. You can manage your API keys in the dashboard.
/v1/medical/chat/completionsGenerate medical responses based on symptoms and medical queries
curl https://dr7.ai/api/v1/medical/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-dr7-your-api-key" \
-d '{
"model": "medgemma-4b-it",
"messages": [
{
"role": "user",
"content": "ๆฃ่
ไธป่ฏๅคด็3ๅคฉ๏ผไผดๆๅ็ญ38.5ยฐC"
}
],
"max_tokens": 1000,
"temperature": 0.7
}'{
"id": "med-1234567890",
"object": "medical.chat.completion",
"created": 1677652288,
"model": "medgemma-4b-it",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "ๆ นๆฎๆจๆ่ฟฐ็็็ถ๏ผๆฃ่
ๅบ็ฐๅคด็ไผดๅ็ญ๏ผ้่ฆ่่ไปฅไธๅฏ่ฝ็่ฏๆญ..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 25,
"completion_tokens": 150,
"total_tokens": 175
}
}The API uses standard HTTP status codes and returns error details in JSON format:
{
"error": {
"message": "Invalid API key provided",
"type": "authentication_error",
"code": "invalid_api_key"
}
}| Status Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 402 | Insufficient account balance |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Our API uses token-based pricing. You only pay for what you use.
| Model | Input | Output |
|---|---|---|
| med-palm-2 | $0.001 / 1K tokens | $0.002 / 1K tokens |
| biogpt | $0.001 / 1K tokens | $0.002 / 1K tokens |
| chexagent | $0.002 / 1K tokens | $0.004 / 1K tokens |
| llava-med | $0.002 / 1K tokens | $0.004 / 1K tokens |
| meditron | $0.001 / 1K tokens | $0.002 / 1K tokens |
| pmc-llama | $0.001 / 1K tokens | $0.002 / 1K tokens |
| med-flamingo | $0.002 / 1K tokens | $0.004 / 1K tokens |
| biomedlm | $0.001 / 1K tokens | $0.002 / 1K tokens |
| biomedclip | $0.002 / 1K tokens | $0.004 / 1K tokens |
| clinical-camel | $0.001 / 1K tokens | $0.002 / 1K tokens |
| medgemma-4b-it | $0.001 / 1K tokens | $0.002 / 1K tokens |
| medgemma-27b-it | $0.003 / 1K tokens | $0.006 / 1K tokens |
| medsiglip-v1 | $0.005 / 1K tokens | $0.002 / 1K tokens |
| alphagenome | $0.002 / 1K tokens | $0.004 / 1K tokens |
| baichuan-m3 | $0.001 / 1K tokens | $0.002 / 1K tokens |