SDKs
Generation Model
SDKs are generated from the external OpenAPI schema in CI. The workflow prefers a committed docs/openapi.json when present and otherwise falls back to the deployed schema at:
Generated output targets:
sdks/pythonsdks/typescript
Current Status
The repository now includes the generation pipeline and placeholder SDK directory. Package publishing is not wired in this task, so direct HTTP remains the supported integration path until release packaging is added.
Python Example
import requests
response = requests.post(
"https://api.tanfi.ai/api/v1/ext/kb/query",
headers={
"X-API-Key": "bach_live_...",
"Content-Type": "application/json",
},
json={"query": "Basel operational risk", "top_k": 5},
timeout=10,
)
response.raise_for_status()
print(response.json())
TypeScript Example
const response = await fetch("https://api.tanfi.ai/api/v1/ext/kb/query", {
method: "POST",
headers: {
"X-API-Key": "bach_live_...",
"Content-Type": "application/json",
},
body: JSON.stringify({ query: "model risk management", top_k: 5 }),
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
console.log(await response.json());