Skip to main content
Coming soon. The TypeScript SDK, @krun-ai/sdk, is not published on npm yet. Until it is, call the HTTP API directly from your Node.js server, or use the Python SDK.
We will update this page with install instructions when the package is published.

Preview

The SDK is implemented. This preview shows the planned interface so you can see what integration will look like. Details can still change before the first release.
Preview
Planned features:
  • ESM, Node.js 20 or later, no runtime dependencies (uses the built-in fetch).
  • Types inferred from your request: result.answers.department autocompletes, and answer.choice is typed as "shipping" | "returns" | "billing" | null.
  • camelCase fields (requestId, abstentionStatus, inputTokens, taskType). Your question ids and option ids are never renamed.
  • decide(), feedback() and models(), with the same 70-second default timeout and retry policy as the Python SDK.
Like the Python SDK, the TypeScript SDK is for server-side code. Never use a Krun API key in browser code. See Authentication.

Use the HTTP API from Node.js today

See the API reference for the full request and response schema.