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

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 allowance
  • X-RateLimit-Remaining โ€” requests left
  • X-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"
  }
}
APIdeveloperquick-startauthentication

Was this article helpful?