> ## Documentation Index
> Fetch the complete documentation index at: https://game-narrative.docs.kitefrost.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Author a cast, audit it for continuity, and export it into your build - in under 5 minutes.

## Prerequisites

* A KiteFrost account ([sign up free](https://app.kitefrost.ai/signup))
* Your `sk_live_...` API key from **Settings → API Keys**
* A project id (create one in the dashboard, or via `POST /v1/projects`). All Game Narrative routes are project-scoped.

***

## Step 1: Author an NPC

Define an NPC as structured, version-controlled content. You author it once; it becomes part of your project's canon and feeds the continuity check and your exports.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.kitefrost.io/v1/projects/{project_id}/characters \
    -H "Authorization: Bearer sk_live_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Aldric the Blacksmith",
      "backstory": "A retired soldier who lost his arm in the Siege of Keldrath. Now runs the forge in Ashwick village. Distrusts the crown but respects courage.",
      "faction": "villagers",
      "traits": ["gruff", "honourable", "protective"],
      "voice_style": "terse, working-class, occasional dark humour"
    }'
  ```

  ```python Python theme={null}
  import requests

  npc = requests.post(
      "https://api.kitefrost.io/v1/projects/{project_id}/characters",
      headers={"Authorization": "Bearer sk_live_your_key_here"},
      json={
          "name": "Aldric the Blacksmith",
          "backstory": "A retired soldier who lost his arm in the Siege of Keldrath. Now runs the forge in Ashwick village. Distrusts the crown but respects courage.",
          "faction": "villagers",
          "traits": ["gruff", "honourable", "protective"],
          "voice_style": "terse, working-class, occasional dark humour",
      },
  ).json()
  print(npc["id"])  # npc_01HZ...
  ```

  ```typescript TypeScript theme={null}
  const npc = await fetch("https://api.kitefrost.io/v1/projects/{project_id}/characters", {
    method: "POST",
    headers: {
      Authorization: "Bearer sk_live_your_key_here",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      name: "Aldric the Blacksmith",
      backstory: "A retired soldier who lost his arm in the Siege of Keldrath. Now runs the forge in Ashwick village. Distrusts the crown but respects courage.",
      faction: "villagers",
      traits: ["gruff", "honourable", "protective"],
      voice_style: "terse, working-class, occasional dark humour",
    }),
  }).then((r) => r.json());

  console.log(npc.id); // npc_01HZ...
  ```
</CodeGroup>

Author the rest of your cast, quests, locations, factions, and items the same way (`/v1/projects/{project_id}/game-narrative/story-arcs`, `/locations`, `/factions`, `/items`).

***

## Step 2: Run the continuity check

This is the pack's headline feature. Point it at everything you've authored and it audits for cross-arc contradictions - citing the exact entity or arc each one breaks. It is **advisory and read-only** (it never edits or blocks your build) and **free** (0 Story Units; a budget-exhausted project still gets the full report).

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.kitefrost.io/v1/projects/{project_id}/game-narrative/continuity:check" \
    -H "Authorization: Bearer sk_live_your_key_here"
  ```

  ```json Response theme={null}
  {
    "project_id": "proj_01HZ...",
    "findings": [
      {
        "summary": "Captain Mira is killed in arc 2 but has speaking dialogue in arc 4.",
        "conflicts_with": { "entity": "Captain Mira", "arc": "arc_4" },
        "severity": "high"
      }
    ],
    "checked_entities": 42,
    "advisory": true
  }
  ```
</CodeGroup>

***

## Step 3: Export into your build

Once the report is clean, export the finished narrative into your game. Exports are build artifacts - **Ink, Yarn Spinner, or universal JSON** - with no per-utterance cloud call at runtime.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.kitefrost.io/v1/projects/{project_id}/characters/{character_id}/export" \
    -H "Authorization: Bearer sk_live_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{ "format": "ink" }'
  ```
</CodeGroup>

***

## Advanced: runtime dialogue

<Note>
  Runtime dialogue is a **secondary, advanced** capability. Most studios author and export at dev time (Steps 1-3). Use this only if you need in-character dialogue generated on demand. It is an **asynchronous** call: it returns `202 Accepted` with a `session_id` you poll for the result, and (unlike the continuity check) generation carries Story Units.
</Note>

<CodeGroup>
  ```bash cURL theme={null}
  # Returns 202 + session_id - poll for the generated dialogue
  curl -X POST "https://api.kitefrost.io/v1/projects/{project_id}/characters/{character_id}/generate" \
    -H "Authorization: Bearer sk_live_your_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "player_message": "I need the finest blade you have. The king himself demands it.",
      "context": {
        "location": "Ashwick forge",
        "time_of_day": "evening",
        "player_reputation": "stranger"
      }
    }'
  ```
</CodeGroup>

***

## Next steps

* Run the [continuity check](#step-2-run-the-continuity-check) over your full project before every milestone
* Generate a consolidated [lore bible](/api-reference#tag/lore-bible) for your writers' room
* Set up [Webhooks](_shared/core-concepts/webhooks) to receive generation events
* Supply your own LLM key via [BYOK](_shared/core-concepts/byok) to route AI drafting through your chosen provider
