OpenAI-compatible AI tutor API. 162,000 words in 47 languages, powered by Claude. Drop-in replacement for any OpenAI client.
Works with any OpenAI-compatible client. Just change the base URL.
curl https://api.thedailylesson.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kelly-haiku",
"messages": [{"role": "user", "content": "What does ephemeral mean?"}],
"stream": true
}'
import requests
response = requests.post(
"https://api.thedailylesson.com/v1/chat/completions",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"model": "kelly-sonnet",
"messages": [{"role": "user", "content": "Teach me about 'serendipity'"}]
}
)
print(response.json()["choices"][0]["message"]["content"])
const res = await fetch('https://api.thedailylesson.com/v1/chat/completions', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'kelly-haiku',
messages: [{ role: 'user', content: 'What does ubiquitous mean?' }],
}),
});
const data = await res.json();
console.log(data.choices[0].message.content);
# Works with the official OpenAI Python SDK!
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.thedailylesson.com/v1", # just change the base URL
)
response = client.chat.completions.create(
model="kelly-sonnet",
messages=[{"role": "user", "content": "Explain 'paradigm' like I'm 12"}],
stream=True,
)
for chunk in response:
print(chunk.choices[0].delta.content or "", end="")
Kelly models include the AI tutor persona + vocabulary RAG. Claude models include RAG only.
| Model | Engine | Best For | Min Tier |
|---|---|---|---|
kelly-haiku | Claude Haiku 4.5 | Fast tutoring, quizzes, definitions | Free |
kelly-sonnet | Claude Sonnet 4.6 | Deep explanations, lesson generation | Developer |
kelly-opus | Claude Opus 4.6 | Curriculum design, complex pedagogy | Pro |
claude-haiku | Claude Haiku 4.5 | Fast general AI + vocab context | Free |
claude-sonnet | Claude Sonnet 4.6 | Balanced general AI + vocab context | Developer |
claude-opus | Claude Opus 4.6 | Most capable AI + vocab context | Pro |
Works with every tool that supports OpenAI's API format. Just change the base URL.
Generate a chat completion. Supports streaming.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | No | Default: kelly-haiku |
messages | array | Yes | Array of {role, content} objects |
stream | boolean | No | Enable SSE streaming |
max_tokens | integer | No | Max output tokens (default 1024, max 8192) |
temperature | number | No | 0-1, controls randomness |
top_p | number | No | Nucleus sampling |
List available models and your access level.
View your usage stats, limits, and recent requests.
All requests require a Bearer token in the Authorization header.
Authorization: Bearer lotd_your_api_key_here
Get your free API key at email-engine.nicoletterankin.workers.dev/developers
| Feature | Raw Claude API | Kelly Intelligence |
|---|---|---|
| 162K vocabulary database | ✗ | ✓ Auto-injected via RAG |
| 47 language translations | ✗ | ✓ 601K translations |
| AI tutor persona | ✗ | ✓ Kelly (12 archetypes) |
| Education guardrails | ✗ | ✓ Age-appropriate, factual |
| OpenAI format | ✗ | ✓ Drop-in compatible |
| Usage dashboard | Basic | ✓ Per-model analytics |
| Structured lessons | ✗ | ✓ 74K lessons, 5-phase method |