Quick Start
Go from zero to your first LVNG API call in under five minutes. This guide walks you through getting an API key and sending your first request using curl.
Prerequisites
- ✓An LVNG account. If you do not have one yet, join the waitlist at lvng.ai.
- ✓A terminal with
curlavailable.
1. Get Your API Key
Every request to the LVNG API must be authenticated. The fastest way to get started is with an API key.
- Sign in to LVNG at app.lvng.ai.
- Open Settings > Developer and stay on the API Keys tab.
- Type a name for the key and click Generate Key.
- Copy the key and store it somewhere safe. It is shown only once.
Your key starts with lvng_sk_live_ followed by 32 random hexadecimal characters:
lvng_sk_live_<32 hex characters>Important: Treat your API key like a password. Never commit it to version control or expose it in client-side code. Use environment variables instead.
2. Configure Your Environment
Set your API key as an environment variable so you can reference it in commands.
# .env (add to .gitignore)
LVNG_API_KEY=lvng_sk_live_YOUR_KEY
# Base URL for all API requests
LVNG_API_URL=https://api.lvng.ai/apiOr export directly in your terminal:
export LVNG_API_KEY="lvng_sk_live_YOUR_KEY"3. Make Your First API Call
Send a message to the LVNG chat endpoint. The base URL for all API requests is https://api.lvng.ai/api.
Using curl
curl -X POST https://api.lvng.ai/api/v2/chat \
-H "Authorization: Bearer $LVNG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message": "Hello, LVNG!",
"platform": "api"
}'Response
{
"messageId": "7e6d5c4b-3a29-4098-8654-321fedcba098",
"reply": "Hello! How can I help you today?",
"personality": "lvng",
"sessionId": "b8c9d0e1-f2a3-4b5c-8d7e-8f9012345678",
"timestamp": "2026-10-13T10:00:00.000Z",
"responseTime": 1243,
"attachments": [],
"confidence": null,
"metadata": {
"toolsUsed": []
}
}Using Node.js (fetch)
No SDK is required. Use the standard fetch API available in Node.js 18+.
const response = await fetch('https://api.lvng.ai/api/v2/chat', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.LVNG_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: 'Hello, LVNG!',
platform: 'api',
}),
})
const data = await response.json()
console.log(data.reply)
// => "Hello! How can I help you today?"
console.log(data.metadata.toolsUsed)
// => []Using Python (requests)
import os
import requests
response = requests.post(
"https://api.lvng.ai/api/v2/chat",
headers={
"Authorization": f"Bearer {os.environ['LVNG_API_KEY']}",
"Content-Type": "application/json",
},
json={
"message": "Hello, LVNG!",
"platform": "api",
},
)
data = response.json()
print(data["reply"])
print(data["metadata"]["toolsUsed"])SDKs
Not published yet: the TypeScript and Python clients described on the SDKs page are not on npm or PyPI yet. The LVNG API is a standard REST API, so any HTTP client in any language works, as in the examples above.
Authentication Methods
The examples above use API key authentication via the Authorization: Bearer header. The API also supports JWT tokens for browser-based applications using the same header. The x-api-key header is also accepted as an alternative. See the Authentication page for full details.
Authorization: Bearer YOUR_API_KEYBackend services, scriptsAuthorization: Bearer <jwt>Browser apps, user sessionsNext Steps
Authentication
JWT tokens, API key formats, request context, and tenant isolation.
API Reference
Full endpoint reference for chat, agents, workflows, and more.
Rate Limits
Per-endpoint and per-plan rate limits, headers, and retry strategies.
Error Codes
HTTP and Socket.io error codes, response formats, and troubleshooting.