API Documentation
Chat with AI versions of influential minds through our simple REST API
Quick Start
Get started in 3 simple steps
Create a Chat Session
Choose a mind to chat with (e.g., paul_graham, elon_musk)
Send Messages
Use the session_id to have a conversation
Complete Example:
# Step 1: Create a session
curl -X POST https://digitalminds.wiki/api/v1/chat/sessions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"speaker_type": "paul_graham"}'
# Response: {"session_id": "abc-123", "message": "Session created"}
# Step 2: Send a message
curl -X POST https://digitalminds.wiki/api/v1/chat/sessions/abc-123/messages?speaker_type=paul_graham \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "What makes a great startup?"}'
# Response: {"response": "A great startup...", "citations": [...], "session_id": "abc-123"}
Simple API
RECOMMENDEDNo session management needed - just ask and get answers!
One-Shot Questions
POST/simple/ask
Perfect for quick integrations, webhooks, RSS readers, serverless functions
Request Example:
curl -X POST https://digitalminds.wiki/api/v1/simple/ask \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "What makes a great startup?",
"speaker_type": "paul_graham",
"context": "I am building a SaaS product for developers"
}'
Response:
{
"response": "A great startup solves a real problem...",
"citations": [{"index": 1, "source": "file.md", "excerpt": "..."}],
"speaker_type": "paul_graham"
}
Python Example:
import requests
response = requests.post(
"https://digitalminds.wiki/api/v1/simple/ask",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"message": "What makes a great startup?",
"speaker_type": "paul_graham"
}
)
result = response.json()
print(result["response"])
Multi-Turn Conversations
POST/simple/chat
For chatbots and conversations - automatic session management
First Message (no conversation_id):
curl -X POST https://digitalminds.wiki/api/v1/simple/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "What is the most important quality in a founder?",
"speaker_type": "paul_graham"
}'
# Response includes conversation_id
{
"response": "Determination...",
"citations": [...],
"speaker_type": "paul_graham",
"conversation_id": "abc-123-def"
}
Follow-up Message (with conversation_id):
curl -X POST https://digitalminds.wiki/api/v1/simple/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Can you give me examples?",
"speaker_type": "paul_graham",
"conversation_id": "abc-123-def"
}'
💡 Tip: Use /simple/ask for one-off questions and /simple/chat for conversations where you need to maintain context.
Authentication
All API requests require authentication using your API key. Include it in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Get your API key by signing in and visiting your dashboard.
Base URL
https://digitalminds.wiki/api/v1
Available Minds
You can chat with the following influential minds:
Full Chat API
For advanced use cases that require manual session management
Create Session
POST/chat/sessions
Create a new chat session with a specific mind.
Request Body
{
"speaker_type": "paul_graham"
}
Response
{
"session_id": "8569274c-c4bf-4cf9-b271-8bc22c4856d3",
"message": "Session created successfully"
}
cURL Example
curl -X POST https://digitalminds.wiki/api/v1/chat/sessions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"speaker_type": "paul_graham"}'
Send Message
POST/chat/sessions/{session_id}/messages
Send a message to an existing session and get the AI response.
Parameters
session_id(path) - The session UUIDspeaker_type(query, optional) - Validate session speaker
Request Body
{
"message": "What is your investment philosophy?"
}
Response
{
"message": "Message sent successfully",
"response": "My investment philosophy is to invest with high conviction...",
"citations": [...],
"session_id": "8569274c-c4bf-4cf9-b271-8bc22c4856d3"
}
cURL Example
curl -X POST https://digitalminds.wiki/api/v1/chat/sessions/SESSION_ID/messages?speaker_type=paul_graham \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "What is your investment philosophy?"}'
Get All Sessions
GET/chat/sessions
Retrieve all chat sessions for your account.
Query Parameters
speaker_type(optional) - Filter by specific speaker
cURL Example
curl -X GET https://digitalminds.wiki/api/v1/chat/sessions \
-H "Authorization: Bearer YOUR_API_KEY"
Get Session Details
GET/chat/sessions/{session_id}
Get detailed information about a specific session including message history.
cURL Example
curl -X GET https://digitalminds.wiki/api/v1/chat/sessions/SESSION_ID \
-H "Authorization: Bearer YOUR_API_KEY"
Delete Session
DELETE/chat/sessions/{session_id}
Permanently delete a chat session.
cURL Example
curl -X DELETE https://digitalminds.wiki/api/v1/chat/sessions/SESSION_ID \
-H "Authorization: Bearer YOUR_API_KEY"
Rate Limits
The free tier includes 1,000 requests per month. Check your usage on your dashboard.
When you exceed your rate limit, you'll receive a 429 Too Many Requests response.
Code Examples
Python
requestsimport requests
API_KEY = "your_api_key_here"
BASE_URL = "https://digitalminds.wiki/api/v1"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
# Create a session
response = requests.post(
f"{BASE_URL}/chat/sessions",
headers=headers,
json={"speaker_type": "paul_graham"}
)
session_id = response.json()["session_id"]
print(f"Session created: {session_id}")
# Send a message
response = requests.post(
f"{BASE_URL}/chat/sessions/{session_id}/messages",
headers=headers,
params={"speaker_type": "paul_graham"},
json={"message": "What makes a great startup?"}
)
result = response.json()
print(f"AI: {result['response']}")
# Citations
for citation in result.get('citations', []):
print(f" [{citation['index']}] {citation['source']}")
JavaScript
fetch APIconst API_KEY = 'your_api_key_here';
const BASE_URL = 'https://digitalminds.wiki/api/v1';
const headers = {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
};
// Create a session
const createSession = await fetch(`${BASE_URL}/chat/sessions`, {
method: 'POST',
headers: headers,
body: JSON.stringify({ speaker_type: 'paul_graham' })
});
const { session_id } = await createSession.json();
console.log(`Session created: ${session_id}`);
// Send a message
const sendMessage = await fetch(
`${BASE_URL}/chat/sessions/${session_id}/messages?speaker_type=paul_graham`,
{
method: 'POST',
headers: headers,
body: JSON.stringify({ message: 'What makes a great startup?' })
}
);
const result = await sendMessage.json();
console.log(`AI: ${result.response}`);
// Citations
result.citations?.forEach(citation => {
console.log(` [${citation.index}] ${citation.source}`);
});
Response Schema
The message response includes:
{
"message": "Message sent successfully",
"response": "The AI response text",
"session_id": "8569274c-c4bf-4cf9-b271-8bc22c4856d3",
"citations": [
{
"index": 1,
"source": "filename.md",
"excerpt": "Relevant excerpt from the source..."
}
]
}
response
The AI's response to your message
citations
Sources and excerpts the AI used to generate the response
session_id
The session ID for continuing the conversation
Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid input |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Not Found - Resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Something went wrong |