Skip to main content

Overview

Graphiti supports OpenAI-compatible /v1 endpoints through OpenAIGenericClient. Point that client at TokenLab and choose a TokenLab model.
Type: Knowledge graph memory frameworkPrimary Path: OpenAI-compatible Chat CompletionsSupport Confidence: Supported OpenAI-compatible path

Environment

export TOKENLAB_API_KEY="sk-your-tokenlab-key"

LLM Client

import os

from graphiti_core.llm_client.config import LLMConfig
from graphiti_core.llm_client.openai_generic_client import OpenAIGenericClient

llm_config = LLMConfig(
    api_key=os.environ["TOKENLAB_API_KEY"],
    model="claude-sonnet-5",
    small_model="gpt-5.4-mini",
    base_url="https://api.tokenlab.sh/v1",
)

llm_client = OpenAIGenericClient(config=llm_config)
Pass llm_client into your Graphiti(...) instance alongside your graph database and embedder configuration.

Endpoint Notes

Graphiti’s OpenAI-compatible path is chat-completions oriented. Use models that reliably return structured JSON for extraction and deduplication tasks.