Skip to main content
This walkthrough takes you from “I’ve heard of Seyn” to “I’ve made my first real API call.” Five minutes, three steps.

1. Create an API key

  1. Sign in at app.seynlabs.com.
  2. Open Settings → API Keys.
  3. Click Create. Give the key a label (e.g. “local-dev”).
  4. Copy the sk_live_* token shown once. Store it somewhere safe: only the first 8 characters are kept on the server after this screen closes.
Treat API keys like passwords. Don’t commit them, don’t ship them to browsers, don’t paste them in chat. Use a .env file or your secret store.

2. Install the SDK

Both SDKs are pre-release: the TypeScript SDK is in private beta, the Python SDK in early alpha. Neither is on a public registry yet. Email support@seynlabs.com to request access: we’ll send you the current builds along with install instructions.
# After receiving seyn_sdk-0.1.0.tar.gz from the team:
pip install ./seyn_sdk-0.1.0.tar.gz
TypeScript requires Node.js 18+ (uses native fetch); Python requires 3.10+.

3. Run your first query

Set your API key as an environment variable and run a script:
export SEYN_API_KEY="sk_live_..."
import os
from seyn import SeynClient

seyn = SeynClient(api_key=os.environ["SEYN_API_KEY"])

rules = seyn.rules.list(limit=5)
print(f"Got {len(rules)} rules:")
for rule in rules:
    print(f"  [{rule.confidence:.2f}] {rule.description}")
You should see a response like:
{
  "success": true,
  "data": [
    {
      "id": "7f3cb37f-7d67-43f1-a3eb-a95ffdafb6b9",
      "description": "Deals above $30M or flagged by finance require CEO-level approval before advancing to contract stage",
      "processId": "ceo-review",
      "appliesAtStep": "contract_stage",
      "confidence": 0.95,
      "frequency": 0.12,
      "reviewStatus": "confirmed",
      "createdAt": null
    }
  ],
  "meta": {
    "requestId": "a7678548-57ee-4f1a-8a80-a355a911b6f4",
    "pagination": { "total": 1, "limit": 5, "offset": 0 }
  }
}
That’s a real rule extracted by Seyn from a real organisation’s operational data.

Try one more: ask Seyn a question

The knowledge.query method takes a natural-language question and returns ranked rule hits:
result = seyn.knowledge.query(
    q="When does a deal need senior approval?",
    top_k=3,
)

for hit in result.results:
    print(f"[{hit.score:.2f}] {hit.description}")

Where to go next

Core Concepts

What’s a Rule? A Library? Provenance? Get the mental model first.

How Seyn works

The five-layer architecture behind the API you just called.

SDK Reference

Every method with full TypeScript signatures and examples.

Authentication

Key management, rotation, error codes, rate limits.

Something’s not working?

  • MISSING_AUTH_HEADER: you forgot the Authorization: Bearer ... header, or it’s a curl typo.
  • INVALID_API_KEY: the key doesn’t match anything on our side. Re-check what you pasted.
  • KEY_REVOKED: the key was valid but an admin revoked it. Generate a new one in the dashboard.
  • RATE_LIMITED: you’ve burnt 60 requests in a minute. Wait or request a higher limit.
  • Stuck on anything else: email support@seynlabs.com.