Authentication
The Knidian AI API uses API keys to authenticate requests. You need to include your API key in all requests to our API.
Obtaining an API Key
To obtain an API key:
- Contact our sales team to discuss your needs and use case
- Once approved, you'll receive your API key via email
- Store your API key securely - it grants access to the API and should be treated as sensitive information
Using Your API Key
Include your API key in the x-api-key
header with all API requests:
curl -X POST https://api.knidian.ai/diagnose \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"clinical_history": "A 45-year-old male presents with chest pain, shortness of breath, and fatigue for the past 3 days."
}'
API Key Security
To keep your API key secure:
- Never share your API key in publicly accessible areas such as GitHub, client-side code, or public forums
- Store your API key in environment variables or a secure configuration system
- Implement proper access controls to limit who can use your API key
- Consider using different API keys for development and production environments
- Rotate your API keys periodically for enhanced security
Environment Variables Example
// Node.js example
require('dotenv').config();
const apiKey = process.env.KNIDIAN_API_KEY;
// Make API request
const response = await fetch('https://api.knidian.ai/diagnose', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': apiKey
},
body: JSON.stringify({
clinical_history: 'A 45-year-old male presents with chest pain, shortness of breath, and fatigue for the past 3 days.'
})
});
Rate Limiting
API requests are subject to rate limiting based on your subscription plan. If you exceed your rate limit, you'll receive a 429 Too Many Requests
response. Contact our support team if you need to increase your rate limits.