Documentation

Everything you need to integrate AI Logs into your application and start tracking events.

Quick Start

Get up and running with AI Logs in under 5 minutes.

1

Create an Account

Sign up for a free account and create your first project.

2

Get Your API Key

Navigate to Settings → API Keys and generate a new API key for your project.

3

Install the SDK

Install the AI Logs SDK for your preferred language.

python
pip install ai-logbook
node
npm install @ai-logbook/node
4

Log Your First Event

Initialize the client and log an event.

python
from logbook import LogbookClient

client = LogbookClient(api_key="your_api_key_here")

client.events.create(
    system_id="my-llm-service",
    kind="completion",
    message="Generated response",
    payload={
        "model": "gpt-4",
        "prompt": "What is AI?",
        "response": "AI stands for...",
        "tokens": 150,
        "latency_ms": 1200
    }
)
node
import { Logbook } from '@ai-logbook/node';

const client = new Logbook({ 
  apiKey: process.env.LOGBOOK_API_KEY 
});

await client.events.create({
  systemId: 'my-llm-service',
  kind: 'completion',
  message: 'Generated response',
  payload: {
    model: 'gpt-4',
    prompt: 'What is AI?',
    response: 'AI stands for...',
    tokens: 150,
    latencyMs: 1200
  }
});
5

View Your Events

Navigate to the Events page in the console to see your logged events.

SDK Guides

Python SDK
Complete guide to using the Python SDK
Node.js SDK
Complete guide to using the Node.js SDK
REST API
Direct API integration without an SDK

API Reference

Complete reference for the AI Logs REST API.

Base URL
https://api.ailogs.io/v1
POST/eventsCreate a new event
GET/eventsList events with filtering and pagination
GET/events/{id}Get a specific event by ID
GET/metricsGet aggregated metrics
POST/exportsCreate a compliance export

Need Help?

Can't find what you're looking for? Our support team is here to help.