AI API for Developers with Chat + Always-On Memory
x-api-key and requires x-user-id because Memory is always included.
Call Lyren from your backend and keep your API key private.
1) Sign up and choose Starter, Growth, or Pro 2) Generate your API key in the dashboard 3) Store the API key server-side 4) Send x-api-key with protected requests 5) Send x-user-id for Developer Chat and user-scoped modules 6) Build chat, tools, memory, knowledge, business, automation, scheduling, and connectors
x-user-id so memory and task context stay scoped to the correct user.
/v1/* endpoints with validation, limits, and standardized responses.
/v1/chat/completionsYour backend sends: • x-api-key • x-user-id • user message • optional app context Lyren uses: • ranked memory • task context • chat mode Lyren returns: • user-aware response • metadata • daily cap details
/v1/knowledge/askUpload: • PDFs • policies • notes • docs Ask: "What does this policy say?" Lyren returns: • grounded answer • doc_id • source_name • chunk_index • score
/v1/schedule/createCreate jobs that run later: • reminder • follow-up • webhook action • workflow trigger Worker executes at run_at.
Why Lyren is different from a basic chat API
Developer Chat automatically attempts to use ranked user memory and task context. Memory is part of the chat experience, not a separate toggle.
Developers can summarize, translate, rewrite, extract, fetch web text, upload documents, and ask grounded questions with source metadata.
Workflows, scheduler jobs, calendar-ready flows, connectors, lead scoring, churn risk, and revenue leak analysis help power real dashboards and apps.
A public API for developers, separate from internal Lyren products
External developers call public /v1/* endpoints from their backend using an API key generated in the dashboard.
Developer Chat, Memory, Knowledge Base, Business, Workflows, Scheduler, Calendar, and Connectors should be tied to a stable user ID from the developer's app.
Plans control available modules, usage, daily caps, monthly quotas, and rate limits across developer scopes.
Required for protected routes: x-api-key: YOUR_API_KEY Required for Developer Chat and user-scoped modules: x-user-id: user_123 Never expose your API key in: • browser JavaScript • mobile apps without a backend proxy • public GitHub repositories • screenshots • support tickets
Chat: AI conversations with always-on user memory
POST /v1/chat/completions to power support assistants, onboarding assistants, sales assistants, writing helpers, and internal product workflows.
POST /v1/chat/completions
Headers:
x-api-key: YOUR_API_KEY
x-user-id: user_123
Content-Type: application/json
Body:
{
"model": "lyren-dev-standard",
"messages": [
{ "role": "user", "content": "Continue from my saved context." }
],
"memory_limit": 8,
"task_limit": 5,
"redact_output": true
}
Input: • user question • x-user-id • optional app context Output: • explanation • next steps • escalation summary
Input: • demo notes • customer pain points • remembered preferences Output: • follow-up email • short version • next action list
use_memory fields may be accepted for compatibility, but memory remains active.
Public chat modes: lyren-dev-fast lyren-dev-standard lyren-dev-deep
Chat behavior: • Memory always enabled • Task context included with memory • x-user-id required • daily caps by plan • response includes meta + daily_caps
lyren-dev-standard for most production developer integrations.
Tools: focused AI utility endpoints
POST /v1/tools/summarize Use for: • meeting notes • reports • support tickets • long messages
POST /v1/tools/translate Use for: • customer messages • support replies • FAQs • internal notes
POST /v1/tools/rewrite Use for: • professional tone • clearer copy • shorter replies • product text
POST /v1/tools/extract Use for: • action items • invoice fields • support issue fields • CRM notes
POST /v1/tools/fetch Use for: • readable webpage text • documentation pages • source extraction
POST /v1/tools/fetch_and_summarize Use for: • article summaries • documentation summaries • quick research
redact_output, safer URL handling, max_chars, metadata, and daily cap details.
Common response fields:
{
"ok": true,
"result": {},
"meta": {},
"daily_caps": {}
}
Common controls: • redact_output • max_chars • text length guards • safe style cleanup • safe language cleanup
Memory: persistent context per app user
x-user-id. Developer Chat automatically uses ranked Memory and task context.
Save: "User prefers short answers and implementation steps." Later: Developer Chat can use ranked memory for the same x-user-id.
Save: "Customer ACME is on Growth plan and uses Shopify." Later: support, dashboards, and chat can stay aligned with saved account context.
Save: "Finish onboarding checklist by Friday." Search later: "open onboarding tasks"
Ask for relevant context. Lyren returns matching memory instead of sending every saved item.
POST /v1/memory/save POST /v1/memory/search POST /v1/memory/forget POST /v1/memory/task/save POST /v1/memory/task/search POST /v1/memory/ranked-context
Knowledge Base: document-grounded answers with sources
Upload: • manuals • policies • troubleshooting docs Ask: "How do I fix this error?" "What is the cancellation policy?" Lyren returns: • answer • doc_id • source_name • mime • chunk_index • score
Upload: • strategy notes • reports • brand docs Ask: "What are the campaign priorities?"
Upload: • SOPs • handbook • onboarding docs Ask: "What are the onboarding steps?"
POST /v1/knowledge/upload POST /v1/knowledge/ask
Best for: • product docs • policies • reports • support docs • internal notes
Workflows and Scheduler: definitions and jobs that run later
Workflows are reusable definitions. Examples: • sales_followup • meeting_notes • support_ticket_triage • client_report_summary Routes: POST /v1/workflows/save GET /v1/workflows/list
Scheduler creates jobs that run later.
Examples:
• reminder
• follow-up
• webhook action
• status check
Routes:
POST /v1/schedule/create
GET /v1/schedule/list
GET /v1/schedule/status/{job_id}
POST /v1/schedule/cancel/{job_id}
Calendar-ready scheduling flows
Example flow: 1) Your app collects booking details 2) Your backend calls a calendar endpoint 3) Booking is created when enabled 4) Scheduler creates reminder/follow-up jobs 5) Worker triggers webhook 6) Your app sends email, SMS, or CRM updates
GET /v1/calendar/providers POST /v1/calendar/freebusy POST /v1/calendar/create-event POST /v1/calendar/book
x-user-id.
Connectors: user-scoped source configuration
Allowed connector kinds: • sitemap • website • rss • docs • api • webhook • custom Routes: POST /v1/connectors/create GET /v1/connectors/list
Use connectors for: • website source configs • sitemap configs • RSS source configs • docs source configs • API source configs • webhook configs • custom ingestion configs
Business APIs: structured intelligence for dashboards
POST /v1/business/lead-score Use for: • lead score 0–100 • close probability • drivers • next actions
POST /v1/business/churn-risk Use for: • churn probability • risk level • drivers • recommended actions
POST /v1/business/revenue-leaks Use for: • refund analysis • failed payment review • chargeback analysis • cancellation impact • downgrade impact
POST /v1/business/lead-score POST /v1/business/churn-risk POST /v1/business/revenue-leaks GET /v1/business/history
x-user-id so business history stays associated with the correct app user.
Pricing
- Basic developer chat integrations
- Text utility tools
- Early product testing
- Backend-only API usage
- Chat: starter usage limits
- Tools: starter tool limits
- Developer Chat: uses
x-user-id - Rate limit: starter scope limits
- Memory API controls
- Knowledge Base
- Workflows
- Scheduler
- Calendar-ready flows
- Business APIs
- Connectors
- Apps that need user memory
- Document-grounded answers
- Workflow definitions
- Scheduled jobs and follow-ups
- Business dashboard features
- Chat: memory-aware developer chat
- Tools: text and URL utilities
- Memory API: save, search, forget, task context
- Knowledge Base: upload and ask documents
- Workflows: reusable definitions
- Scheduler: jobs that run later
- Calendar: calendar-ready flows when enabled
- Business: lead, churn, revenue analysis
- Connectors
- Expanded usage limits
- Scale-ready capacity
- Full developer platform access
- Connector-powered source configs
- Higher daily caps
- Expanded rate limits
- Production apps with heavier usage
- Chat: expanded usage
- Tools: expanded usage
- Memory: expanded storage behavior
- Knowledge: expanded docs behavior
- Workflows: expanded workflow behavior
- Scheduler: high daily caps
- Calendar: high daily caps when enabled
- Business: high daily caps
- Connectors: included
Start with the module you need. Upgrade when your product grows.
Starter is for basic chat and tools. Growth adds memory API, documents, automation, calendar-ready flows, and business APIs. Pro adds connectors and expanded limits.
Frequently Asked Questions
What is Lyren API?
Lyren API is a developer-facing AI platform that helps developers add chat with always-on memory, tools, memory, knowledge base, workflows, scheduler jobs, calendar-ready flows, connectors, and business APIs into their own applications.
Is Lyren API the same as Lyren Chat?
No. Lyren API is the public developer API. Lyren Chat is a separate user-facing product. Internal Lyren Chat features such as code generation, code preview, Meet, and Agent are not part of this developer API page.
Does Developer Chat always include Memory?
Yes. Developer Chat always includes Lyren Memory. The chat endpoint requires x-user-id so user memory and task context stay scoped to the correct app user.
Why does Developer Chat require x-user-id?
Developer Chat requires x-user-id because memory is always enabled. The user ID keeps memory isolated by API key and user.
Can developers disable memory in chat completions?
No. Developer Chat keeps memory enabled. Legacy use_memory fields may be accepted for compatibility, but memory remains active.
What tools are included?
Lyren Tools include summarize, translate, rewrite, extract, fetch URL text, and fetch plus summarize.
What is the Knowledge Base API?
The Knowledge Base API lets developers upload user-scoped documents and ask grounded questions with source metadata.
What is the Business API?
The Business API helps developers power dashboards for lead scoring, churn risk, revenue leak analysis, and user-scoped business history.
What are Workflows and Scheduler?
Workflows save reusable automation definitions. Scheduler creates jobs that run later, such as reminders, follow-ups, and webhook actions.
What are Connectors?
Connectors store user-scoped source configurations such as sitemap, website, RSS, docs, API, webhook, and custom connector configs.
Which plan should I choose?
Starter is best for basic chat and tools. Growth is best for apps that need memory API controls, documents, workflows, scheduler, calendar-ready flows, and business APIs. Pro is best for full platform access, connectors, and expanded limits.
Should developers call Lyren from browser JavaScript?
No. Developers should call Lyren API from their backend so the API key stays private.
Where do developers manage API keys?
Developers manage their account and API keys from the Lyren dashboard after signup and billing.