For the complete documentation index, see llms.txt. This page is also available as Markdown.

Installation

This page covers the web SDK, @tiun/sdk — for websites and web apps.

Building with React Native? Use @tiun/react-native-sdk instead. It's a separate package with its own API; React Native apps don't install @tiun/sdk.

Setup

Install the SDK from npm using your preferred package manager:

npm install @tiun/sdk
pnpm add @tiun/sdk
yarn add @tiun/sdk

Configuration

After installing, import the SDK and call init() once at app startup:

import { tiun } from '@tiun/sdk';

tiun.init({
  snippetId: 'YOUR_SNIPPET_ID',
  language: 'en', // 'en' | 'de' | 'fr'
});

You'll need your Snippet ID from the tiun dashboard. That's the only required option — see Initialization for the full list of configuration options.

Use without a bundler

If you don't have a build step, load the SDK as an ES module from unpkg:

See the Vanilla JS examples for the full set of patterns.

Last updated

Was this helpful?