@nozomioai/nia-sdk
v0.0.0
Published
Type-safe TypeScript SDK for the public Nia API.
Downloads
72
Readme
@nozomioai/nia-sdk
Type-safe TypeScript SDK for the public Nia API.
Install
bun add @nozomioai/nia-sdk@nozomioai/nia-sdk is a public Eden-based client for the public Nia API surface.
Usage
import { createClient } from "@nozomioai/nia-sdk";
const client = createClient("https://api.nia.ai", {
apiKey: process.env.NIA_API_KEY,
});
const sources = await client.sources.get();The SDK is typed from the backend publicApi contract, so it only exposes public or API-key-safe endpoints.
Authentication
createClient() can set a default Authorization header for every request:
const client = createClient("https://api.nia.ai", {
apiKey: process.env.NIA_API_KEY,
});Pass your API key in apiKey. The SDK adds the Bearer prefix automatically. Internal session-token auth stays in @nia/api-client and is intentionally not part of the public SDK surface.
Examples
List available sources:
const response = await client.sources.get();Notes
- Public routes currently cover search, sources, and usage endpoints.
- Public OpenAPI auth is API-key based.
- Route types are inferred from the backend app's TypeScript route definitions.
- The backend does not perform runtime response validation for SDK generation.
