SDKs
There's no Thalam-specific SDK because you don't need one. Any client that speaks the OpenAI Chat Completions format works — official SDKs, frameworks, or raw HTTP.
Python
Official openai package:
install
pip install openaiNode / TypeScript
Same package, TypeScript-first:
install
npm install openai
# or: pnpm add openai / bun add openaiclient.ts
#60a5fa]">import OpenAI from class="text-emerald-400">"openai";
#60a5fa]">const client = new OpenAI({
apiKey: process.env.THALAM_KEY,
baseURL: #60a5fa]">class="text-emerald-400">"https://api.thalam.ai/v1",
});
#60a5fa]">const response = await client.chat.completions.create({
model: "<model-id>",
messages: [{ role: #60a5fa]">class="text-emerald-400">"user", content: class="text-emerald-400">"Hello" }],
});
console.log(response.choices[0].message.content);curl
Raw HTTP works too — no SDK required:
terminal
curl https://api.thalam.ai/v1/chat/completions \
-H #60a5fa]">class="text-emerald-400">"Content-Type: application/json" \
-H #60a5fa]">class="text-emerald-400">"Authorization: Bearer tl-xxxxxxxxxxxxxxxxxxxxxxxx" \
-d '{
#60a5fa]">class="text-emerald-400">"model": "<model-id>",
#60a5fa]">class="text-emerald-400">"messages": [{class="text-emerald-400">"role": class="text-emerald-400">"user", class="text-emerald-400">"content": class="text-emerald-400">"Hello"}]
}'Frameworks work unchanged. LangChain, LlamaIndex, Instructor, Guidance, Vercel AI SDK — any library that takes an OpenAI client will work once you set the base_url.