Skip to content

Quickstart

This page takes you from an account to five working calls: analyse a log file, ask Cortex about it, scan a repository for missing logs, and connect Claude Code. Every curl below was run against the dev estate with a real key on 2026-10-01; the responses are trimmed, not invented.

Production is the default throughout. If you were given a dev account, swap the host.

WhatProductionDev
The apphttps://app.logrite.aihttps://dev-app.logrite.ai
Backend API (projects, scans, keys)https://leapfrogapi.deployd.iohttps://dev-leapfrogapi.logrite.ai
AI Service (log analysis, Cortex)https://aiservice.logrite.aihttps://dev-aiservice.logrite.ai
MCP serverhttps://mcp.logrite.aihttps://dev-mcp.logrite.ai
  1. Sign in at app.logrite.ai.
  2. Open Sandbox in the sidebar (/sandbox), then the API keys button in its header.
  3. Name the key and pick a lifetime — 30 days, 90 days (the default), 1 year, or no expiry. Creating a key needs the Admin or Owner role in the workspace.
  4. Copy the key. It starts with lgp_live_ and is shown once — Logrite stores only a hash.

The key authenticates as you, in the workspace you created it in. Send it as a bearer token:

Terminal window
export LOGRITE_API_KEY='lgp_live_…'
Authorization: Bearer lgp_live_…

Check the key, and learn your workspace id, with the one route authenticated by the key itself:

Terminal window
curl -s -X POST https://leapfrogapi.deployd.io/api/v1/api-keys/introspect \
-H "Authorization: Bearer $LOGRITE_API_KEY"
{"active":true,"workspaceId":3103,"userId":15,"scope":"production",
"name":"docs-verify","last4":"t6c8","expiresAt":"2026-10-31T07:33:04.183628Z"}

A revoked, expired or unknown key answers 401 {"active": false} and nothing else. Keys are managed in the app only: an API key cannot create, rotate or revoke keys (403). Detail: API Sandbox → Logrite API keys.

Send the file as the raw body and name it in x-filename. The reply is the analysis — no job id to poll.

Terminal window
curl -s -X POST https://aiservice.logrite.ai/api/v1/log-analyses \
-H "Authorization: Bearer $LOGRITE_API_KEY" \
-H "x-filename: app.log" \
--data-binary @app.log
{
"analysisId": "ANL-544f9e4a",
"status": "COMPLETED",
"file": {"name": "app.log", "sizeBytes": 180, "format": "text", "eventsParsed": 3},
"dataset": {"id": "log-analytics-3103-app-4f9e4a", "eventsStored": 3, "eventsRejected": 0},
"summary": {
"headline": "3 events over … 2 error-level (67%). Worst of 2 findings: HIGH — …",
"findings": {"total": 2, "bySeverity": {"CRITICAL": 0, "HIGH": 2, "MEDIUM": 0, "LOW": 0, "INFO": 0}}
},
"findings": [
{"id": "F-1001", "type": "OBSERVABILITY", "severity": "HIGH",
"title": "66.7% of events failed, most often: PaymentService - Connection refused to db-primary:⟨number⟩",
"recommendation": "…"}
]
}

-F "file=@./app.log" (multipart) works too. The events are also stored in your workspace as dataset.id, so Cortex can answer questions about them in the next step. Limits, formats (PDF, Office, screenshots), error codes and retries: Log Analysis API.

Terminal window
curl -s -X POST https://aiservice.logrite.ai/api/v1/chat/sync \
-H "Authorization: Bearer $LOGRITE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "How many error-level events are in my logs in the last 24 hours?"}'
{
"status": "success",
"data": {
"conversation_id": "365bb44b-419c-4a01-b3c9-c960cf61f3c8",
"message_id": "aa16ace9-7499-4439-baf7-95a9bf614055",
"content": "There are … error-level events in the logs from the last 24 hours. **Breakdown by index:** …",
"tool_calls": [ … ],
"results": [ … ],
"metadata": {"response_shape": "data", … }
}
}

data.content is the answer as Markdown. To ask a follow-up in the same thread, send the returned conversation_id with the next message. A non-browser caller gets data.results (rows and series); add ?shape=ui to get the render blocks the app draws instead.

A scan reads a repository on a branch and reports, per severity, how many log statements your template expects that are missing, and how much of the expected logging already exists.

Connect the repository (once, in the app):

  1. Settings → Workspace Settings → Source control → Connect GitHub, then Add repositories. This installs the Logrite GitHub App on the organisation or account and lets you pick repositories.
  2. Add the repository as a project with Add new project on the Generator or Compliance page, and choose a logging template.

Find the project id:

Terminal window
curl -s https://leapfrogapi.deployd.io/api/v1/project/workspace/<workspaceId> \
-H "Authorization: Bearer $LOGRITE_API_KEY"
# {"status":"SUCCESS","data":[{"id":4252,"projectName":"BankJava_TestRepo","templates":[…]}, …]}

Start the scan:

Terminal window
curl -s -X POST https://leapfrogapi.deployd.io/api/v1/scan/initiate \
-H "Authorization: Bearer $LOGRITE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"projectId": 4252, "branch": "main", "template": "General Logging"}'
{"status":"SUCCESS","data":{
"projectId":4252,"template":"GENERAL LOGGING","branch":"main","status":"RUNNING",
"afterScanId":1313,"pollUrl":"/api/v1/scan-runs/latest?projectId=4252",
"message":"Scan started on branch 'main' (commit HEAD). … Watch /api/v1/scan-runs/latest?projectId=4252 for the first run newer than scan 1313."}}

template is optional (it defaults to GENERAL); branch is the branch to read.

Poll pollUrl until state is COMPLETED and scanResultId is newer than afterScanId:

Terminal window
curl -s "https://leapfrogapi.deployd.io/api/v1/scan-runs/latest?projectId=4252" \
-H "Authorization: Bearer $LOGRITE_API_KEY"
{"id":1624,"projectId":4252,"kind":"SCAN","state":"COMPLETED","stage":"archive",
"branchName":"main","scanResultId":1314,"failureReason":null}

Read the result:

Terminal window
curl -s https://leapfrogapi.deployd.io/api/v1/scan-results/1314/summary \
-H "Authorization: Bearer $LOGRITE_API_KEY"
{"id":1314,"projectName":"BankJava_TestRepo","branchName":"main","language":"Java",
"criticalTotal":94,"criticalPercent":15.32,"highTotal":133,"highPercent":0.0,
"mediumTotal":47,"mediumPercent":26.56,"lowTotal":235,"lowPercent":2.89,
"startLogCoveragePercent":7.45, … }

For each severity, …Total is the number of missing log statements still outstanding, and …Percent is the share of the expected logging that already exists. More on the fields: Analyzer → Reading a scan summary.

One command installs the Logrite plugin and registers the MCP server. It will not run as root and never prints the key.

Terminal window
curl -fsSL https://mcp.logrite.ai/install.sh | LOGRITE_API_KEY="$LOGRITE_API_KEY" sh

The variable must be set on sh, not on curl. Without it the installer asks for the key with echo off; press Enter instead to skip the key and sign in from Claude Code (/mcp → logrite → Authenticate). A key is stored in ~/.logrite/api-key (mode 0600) and passed by a headersHelper, never on a command line or in Claude Code’s MCP config.

Or register just the MCP server by hand, then sign in with /mcp → Authenticate:

Terminal window
claude mcp add -s user --transport http logrite https://mcp.logrite.ai/sse

Then, in a repository, run /logrite:init. Claude Code can now list your projects, analyse a log file, search your logs and ask Cortex from the editor. Tools, examples and configuration: MCP Server.

The key works on the AI Service (log analyses, Cortex chat, knowledge packs), the MCP server, and the backend’s project, scan, collector-agent and OpenSearch-proxy routes. Many backend management routes still need a signed-in session — see API Sandbox → Which endpoints accept an API key.