ODEN is a plain HTTPS endpoint that sends and receives JSON. No SDK is required — it works from any language with an HTTP client. If you would rather have a small typed wrapper, copy one of these; they are complete, not sketches.
Python#
A single-file client with retry and typing. Drop it in as oden.py:
import os, time
from dataclasses import dataclass
import requests
@dataclass
class Citation:
title: str
url: str
score: float
snippet: str | None = None
class Oden:
def __init__(self, key: str | None = None, base: str = "https://api.oden-api.com"):
self.key = key or os.environ["ODEN_KEY"]
self.base = base
def search(self, query: str, *, answer: bool = True, depth: str = "advanced",
include_snippets: bool = False, retries: int = 3) -> dict:
body = {"query": query, "answer": answer, "depth": depth,
"include_snippets": include_snippets}
for attempt in range(retries + 1):
r = requests.post(
f"{self.base}/search",
headers={"Authorization": f"Bearer {self.key}"},
json=body, timeout=30,
)
if r.status_code == 429 and attempt < retries:
time.sleep(2 ** attempt)
continue
r.raise_for_status()
return r.json()
# Usage
oden = Oden()
data = oden.search("what is retrieval-augmented generation", include_snippets=True)
print(data["results"]["answer"])
TypeScript#
A typed client with no dependencies (Node 18+ or any fetch-capable runtime):
export interface OdenCitation { title: string; url: string; score: number; snippet?: string }
export interface OdenResponse {
query: string; trace_id: string; cached: boolean;
results: { answer?: string; citations: OdenCitation[] };
}
export class Oden {
constructor(private key = process.env.ODEN_KEY!, private base = "https://api.oden-api.com") {}
async search(query: string, opts: { answer?: boolean; depth?: "advanced" | "basic"; includeSnippets?: boolean } = {}): Promise<OdenResponse> {
const resp = await fetch(`${this.base}/search`, {
method: "POST",
headers: { Authorization: `Bearer ${this.key}`, "Content-Type": "application/json" },
body: JSON.stringify({
query,
answer: opts.answer ?? true,
depth: opts.depth ?? "advanced",
include_snippets: opts.includeSnippets ?? false,
}),
});
if (!resp.ok) throw new Error(`ODEN request failed: ${resp.status}`);
return resp.json() as Promise<OdenResponse>;
}
}
Any other language#
If your language can make an HTTPS POST with a JSON body and an Authorization header, it can call ODEN. See the Search endpoint for the exact contract and the OpenAPI description for a machine-readable spec.
A community Python package is planned. Until it ships, the single-file client above is the supported path — it has no moving parts to break.
Next steps#
- Quickstart — the same calls, inline.
- Use cases — ODEN inside RAG, LangChain, LlamaIndex and tool-use loops.