# 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.

{% hint style="info" %}
**Prerequisites.** Step 1 uses the [GitHub CLI](https://cli.github.com/) to install the tiun-sdk skill. Run `gh --version` — if it returns a version number, you're good to go. Otherwise install it first, then come back here.
{% endhint %}

{% 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
gh skill install tiun-app/skills tiun-sdk
```

{% 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 [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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
