Everything you need to integrate FaradayMind into your system.
All requests must include your API key in the Authorization header as a Bearer token. Your key is provided when you subscribe.
Authorization: Bearer YOUR_API_KEY
Requests without a valid key return 401 Unauthorized. Keep your key secret — contact us immediately if you believe it has been compromised.
https://api.faradaymind.com
| Model | Plan | Best for |
|---|---|---|
| llama3.1:8b | Starter | Summaries, extraction, classification — fast responses |
| qwen2.5:14b | Pro | Complex documents, nuanced analysis, drafting — highest accuracy |
/api/generate
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model identifier (see above) |
| prompt | string | Yes | Your instruction + document text |
| stream | boolean | No | Set to false to receive a single JSON response (recommended) |
cURL
curl https://api.faradaymind.com/api/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen2.5:14b",
"prompt": "Summarise the key obligations in this contract:\n\n[DOCUMENT TEXT HERE]",
"stream": false
}'
Python
import requests
response = requests.post(
"https://api.faradaymind.com/api/generate",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "qwen2.5:14b",
"prompt": f"Summarise the key obligations:\n\n{document_text}",
"stream": False
}
)
result = response.json()["response"]
Node.js
const response = await fetch("https://api.faradaymind.com/api/generate", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "qwen2.5:14b",
prompt: `Summarise the key obligations:\n\n${documentText}`,
stream: false
})
});
const { response: result } = await response.json();
{
"model": "qwen2.5:14b",
"response": "The contract contains the following key obligations...",
"done": true,
"done_reason": "stop"
}
| Plan | Requests per minute | Burst |
|---|---|---|
| Starter | 20 | 5 |
| Pro | 60 | 5 |
Exceeding your rate limit returns 429 Too Many Requests. Implement exponential backoff before retrying.
Email us at hello@faradaymind.com and we'll get back to you within one business day.