Skip to main content

Quickstart

Get up and running with the Companion API in under 5 minutes.

1Get your API key

Sign in to The Living Chronicle app and navigate to Settings → Developer. Generate a new API key. Keep it safe — you won't see it again.

2Install the SDK

JavaScript / TypeScript
npm install @thelivingchronicle/sdk
Python
pip install thelivingchronicle

3Make your first query

index.ts
import { ChronicleClient } from "@thelivingchronicle/sdk";

const client = new ChronicleClient({
  apiKey: process.env.TLC_API_KEY,
});

// Get the latest chapter
const chapter = await client.chapters.getCurrent();
console.log(chapter.title, chapter.seasonNumber, chapter.chapterNumber);

// List all factions
const factions = await client.factions.list();
for (const faction of factions) {
  console.log(faction.name, faction.memberCount);
}
main.py
from thelivingchronicle import ChronicleClient

client = ChronicleClient(api_key="your-api-key")

# Get the latest chapter
chapter = client.chapters.get_current()
print(chapter.title, chapter.season_number, chapter.chapter_number)

# List all factions
factions = client.factions.list()
for faction in factions:
    print(faction.name, faction.member_count)

4Rate limits

The Companion API enforces the following rate limits:

  • Free tier: 100 requests per minute, 10,000 per day
  • Premium tier: 1,000 requests per minute, 100,000 per day

Rate limit headers (X-RateLimit-Remaining, X-RateLimit-Reset) are included in every response.