This is the shortest path from nothing to a working call. It takes about five minutes.
1. Get an API key#
Sign in at oden-api.com/app and generate a key from the dashboard. Every account starts on the free tier: 1,000 searches a month, no credit card. Keys look like oden_live_….
Keep the key server-side. Anyone who has it can spend your quota, so put it in an environment variable rather than in your source:
export ODEN_KEY="oden_live_your_key_here"
2. Make your first call#
Send a query to POST /search. That is the whole API.
curl https://api.oden-api.com/search \
-H "Authorization: Bearer $ODEN_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "What are the symptoms of vitamin D deficiency?"}'
The same call in Python (standard library plus requests):
import os, requests
resp = requests.post(
"https://api.oden-api.com/search",
headers={"Authorization": f"Bearer {os.environ['ODEN_KEY']}"},
json={"query": "What are the symptoms of vitamin D deficiency?", "answer": True},
timeout=30,
)
resp.raise_for_status()
data = resp.json()
print(data["results"]["answer"])
for c in data["results"]["citations"]:
print(f"- {c['title']} ({c['url']})")
In JavaScript / Node (18+, built-in fetch):
const resp = await fetch("https://api.oden-api.com/search", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ODEN_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ query: "What are the symptoms of vitamin D deficiency?", answer: true }),
});
if (!resp.ok) throw new Error(`ODEN ${resp.status}`);
const data = await resp.json();
console.log(data.results.answer);
In TypeScript, with the response typed:
interface OdenCitation { title: string; url: string; score: number; snippet?: string }
interface OdenResponse {
query: string;
trace_id: string;
cached: boolean;
results: { answer?: string; citations: OdenCitation[] };
}
async function search(query: string): Promise<OdenResponse> {
const resp = await fetch("https://api.oden-api.com/search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ODEN_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ query }),
});
if (!resp.ok) throw new Error(`ODEN request failed: ${resp.status}`);
return resp.json() as Promise<OdenResponse>;
}
3. Read the response#
You get the answer and the sources in one object:
{
"query": "What are the symptoms of vitamin D deficiency?",
"trace_id": "oden-mquycpae-p3thrk",
"cached": false,
"results": {
"answer": "Low vitamin D can cause muscle weakness, bone pain and fatigue...",
"citations": [
{ "title": "Vitamin D deficiency — 1177 Vårdguiden", "url": "https://www.1177.se/...", "score": 0.912 }
]
}
}
results.answer— the synthesized answer, in the same language as your query.results.citations— the ranked sources, highestscorefirst.trace_id— include it if you ever report an issue.cached—truewhen the result came from cache and returned in tens of milliseconds.
On Windows PowerShell,curlmangles the inner quotes in the JSON body. UseInvoke-RestMethodwithConvertTo-Json, or run the curl example from WSL or Git Bash.
Next steps#
- Tune the call with the search parameters —
answer,depthandinclude_snippets. - Understand answers and citations in depth.
- Handle rate limits and errors before you go to production.
- Wire ODEN into a RAG pipeline or OpenAI function calling.