> For the complete documentation index, see [llms.txt](https://docs.tiun.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tiun.io/quickstart.md).

# Quickstart

Pick how you want to integrate tiun. Both paths end at the same place — a live integration. The full walkthroughs live in the guides; this page is the fast version.

{% hint style="info" %}
In case you have questions, check the [FAQ](/faq.md) or reach out to <support@tiun.app>
{% endhint %}

***

## Agent

Let your AI agent integrate tiun for you in three steps.

{% stepper %}
{% step %}

#### Install the tiun-sdk skill

Adds tiun-specific instructions to your codebase so your agent knows how to integrate tiun into your project.

```bash
npx skills add tiun-app/skills
```

{% endstep %}

{% step %}

#### Connect the MCP server (recommended)

Lets your agent fetch your snippet ID, provider, and product details directly from your dashboard — no copy-paste, no guessing. The tiun-sdk skill detects and uses it automatically.

Add this MCP server in your agent's MCP settings:

```
https://mcp.tiun.business/
```

{% endstep %}

{% step %}

#### Prompt your agent

You're all set. Instruct your agent to integrate tiun. Before writing any code, it'll confirm a few things — subscription vs. time-based, which products, which routes to gate — so nothing gets wired up silently.

[Full agent integration guide](/guides/agent-integration/agent-integration.md) →
{% endstep %}
{% endstepper %}

***

## Manual

Install and initialize the SDK yourself, then follow a guide for the rest.

{% stepper %}
{% step %}

#### Install the SDK

Add `@tiun/sdk` to your project.

{% tabs %}
{% tab title="npm" %}

```bash
npm install @tiun/sdk
```

{% endtab %}

{% tab title="pnpm" %}

```bash
pnpm add @tiun/sdk
```

{% endtab %}

{% tab title="yarn" %}

```bash
yarn add @tiun/sdk
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

#### Initialize the SDK

Import tiun and run `init` once at app startup. You can find your snippet ID in the [my.tiun.business dashboard](https://my.tiun.business/).

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

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

{% hint style="info" %}
**Set `language` to match your site.** Supported values are `'en'`, `'de'`, and `'fr'`. If omitted or invalid, the snippet UI falls back to `'en'`. See all options in [Initialization](/sdk/getting-started/initialization.md).
{% endhint %}
{% endstep %}

{% step %}

#### Follow a guide

Pick the walkthrough that matches what you're building:

* [**Authenticate your user**](/guides/authentication/authenticate-your-user.md) — Login, logout, and reading the signed-in user.
* [**Monetize with subscriptions**](/guides/subscriptions/monetize-with-subscriptions.md) — Recurring plans, checkout, and access control.
* [**Charge for time-based sessions**](/guides/time-based-billing/charge-for-time-based-sessions.md) — Usage-based billing, paywall events, and content metering.
  {% endstep %}
  {% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tiun.io/quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
