Authentication
Learn how to authenticate your API requests and manage your quota.
Overview
The Kantesti API uses credential-based authentication. Every API request must include your username and password in the request body.
Authentication Method
Credentials are sent as form-data or JSON body with every request. No API keys or tokens required.
API Credentials
Your API credentials consist of:
| Field | Type | Description |
|---|---|---|
username |
string | Your unique API username |
password |
string | Your secure API password |
Request Format
Include your credentials in every API request. You can use either form-data or JSON format:
Form Data (Multipart)
curl -X POST "https://app.aibloodtestinterpret.com/api/v11/01-06-2025/analyze" \
-F "username=YOUR_USERNAME" \
-F "password=YOUR_PASSWORD" \
-F "language=en" \
-F "file=@blood_test.pdf"
JSON Body (for some endpoints)
curl -X POST "https://app.aibloodtestinterpret.com/api/quota/check" \
-H "Content-Type: application/json" \
-d '{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}'
Security Best Practices
Security Guidelines
- Never expose credentials in client-side code (JavaScript running in browsers)
- Use environment variables to store credentials in your backend
- Always use HTTPS - all API requests are encrypted
- Rotate passwords periodically for enhanced security
- Use a backend proxy if building web applications
Quota Management
Each account has an API quota (credits). Each successful production request consumes 1 credit. Sandbox requests do not consume quota.
Check Your Quota
Use the quota endpoint to check your remaining credits:
POST
/api/quota/check
Request:
curl -X POST "https://app.aibloodtestinterpret.com/api/quota/check" \
-H "Content-Type: application/json" \
-d '{"username": "YOUR_USERNAME", "password": "YOUR_PASSWORD"}'
Response:
{
"status": "success",
"data": {
"username": "your_username",
"remaining_quota": 150,
"timestamp": "2025-12-22T10:30:00Z"
}
}
Authentication Errors
| Error Code | Message | Solution |
|---|---|---|
AUTH_1001 |
Missing authentication credentials | Include both username and password |
AUTH_1002 |
Invalid username or password | Verify your credentials are correct |
AUTH_1003 |
Account temporarily locked | Wait and retry, or contact support |
Next Steps
- API Endpoints - Explore all available endpoints
- Rate Limits - Understand quota management
- Error Codes - Complete error reference