Skip to main content

Prerequisites

  • A KiteFrost account (sign up free)
  • An API key: your project -> API Keys -> New API Key (Secret, sk_...)
  • A project id (create one in the dashboard, or via POST /v1/projects). All Game Narrative routes are project-scoped.
Alpha testing runs on our staging API, https://api-staging.kitefrost.ai. Point the SDK at it once, with an environment variable, and every client uses it:
Or pass it in code: base_url="https://api-staging.kitefrost.ai" (Python) / baseUrl: "https://api-staging.kitefrost.ai" (TypeScript). The examples on this page use it.

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. name is required; everything else about the character goes in the free-form properties object.
The response is 201 Created with the stored entity (id, external_id, type, name, properties). Author the rest of your cast, quests, locations, factions, and items the same way, under /v1/projects/{project_id}/game-narrative/ + characters, story-arcs, locations, factions, items. Dialogue trees live under /dialogues. A story arc lists what it requires in a top-level prerequisites array, by each entity’s external_id or id, and an NPC’s status goes in its properties. Step 2 reads both.

Step 2: Run the continuity check

This is the pack’s headline feature. It reads the NPC and quest facts you authored - each NPC’s status (alive, missing, dead) and each quest’s prerequisites - plus Ink / Yarn variables tied to them, and flags contradictions, citing the entities involved. The sample response below is for a project where the quest rescue-the-captain lists captain-mira as a prerequisite and Mira’s status is dead. 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).
Already have .ink or .yarn files? POST /v1/projects/{project_id}/game-narrative/continuity/audit-files audits them directly (SDK: client.continuity.audit_files).

Step 3: Export into your build

Once the report is clean, export the finished narrative into your game. Exports are build artifacts with no per-utterance cloud call at runtime. Dialogue trees export as Ink, Yarn Spinner, or universal JSON (format: ink, yarn, or json):
A single character’s drafted dialogue exports via POST .../game-narrative/characters/{character_id}/export with format json (default), csv, or markdown.

Advanced: runtime dialogue

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; poll GET /v1/sessions/{session_id}/status for the result. Unlike the continuity check, generation carries Story Units.
Request fields: player_actions (list of strings), project_context (string), storyline_id, mode (standard or fast), voice / voice_hint (optional audio), max_context_tokens, context_debug. scene_id is accepted for forward compatibility but currently has no effect on the generated output - pass the scene details you need in project_context instead.

Next steps

  • Run the continuity check over your full project before every milestone
  • Generate a consolidated lore bible for your writers’ room
  • Set up Webhooks to receive generation events
  • Supply your own LLM key via BYOK to route AI drafting through your chosen provider