API Quick Start
API Quick Start
The Pharazi.ai API lets you run pharmacokinetic calculations programmatically. Available on Pro and Enterprise plans.
Authentication
All API requests require a Bearer token. Get your API key from Settings โ API.
bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.pharazi.ai/v1/tools
๐ก๏ธ
Caution
Never expose your API key in client-side code, public repositories, or browser JavaScript. Use server-side requests only.
Your First Request
1
List Available Tools
bash
GET /api/v1/tools
Response:
json
{
"data": [
{
"slug": "clearance-calculator",
"name": "Clearance Calculator",
"category": "pk-parameters"
}
]
}
2
Run a Calculation
bash
POST /api/v1/calculate/clearance-calculator
Content-Type: application/json
{
"dose": 500,
"auc": 25,
"bioavailability": 0.85
}
3
Get Results
json
{
"result": {
"clearance": 17.0,
"unit": "L/h"
},
"interpretation": "Clearance of 17.0 L/h is within the typical range..."
}
Rate Limits
| Tier | Rate Limit | Per |
|---|---|---|
| Pro | 1,000 | month |
| Enterprise | Custom | negotiated |
Rate limit headers in every response:
X-RateLimit-Limitโ your total allowanceX-RateLimit-Remainingโ requests leftX-RateLimit-Resetโ reset timestamp (Unix epoch)
Error Handling
| Status | Meaning | What to Do |
|---|---|---|
200 |
Success | Parse the result |
400 |
Invalid parameters | Check your inputs |
401 |
Missing/invalid API key | Verify your Bearer token |
429 |
Rate limit exceeded | Wait and retry |
500 |
Server error | Retry after 30 seconds |
All errors return consistent JSON:
json
{
"error": {
"code": "INVALID_PARAMS",
"message": "Parameter 'dose' must be a positive number"
}
}
๐ก
Tip
For the complete OpenAPI specification, visit api.pharazi.ai/docs.
APIdeveloperquick-startauthentication
Was this article helpful?