The Lyralink API gives operators and developers a documented, lower-risk way to access searchable knowledge and operational endpoints in a production-friendly workflow.
All requests require an API key. Keys are generated from your account dashboard and can be rotated at any time. Rate limits and usage behavior are tied to the plan you choose.
Use this sequence to turn Lyralink into a business-ready operator workflow. It is designed to work for solo founders, agencies, and larger organizations.
1) Apply and activate operator account
2) Configure branding + acquisition link
3) Deploy widget and onboard first clients
4) Issue API key for technical integration
5) Track usage, credits, and payout cycles
Pass your API key in headers. For production clients, use X-API-Key right now.
Option 1 — X-API-Key header (recommended)
X-API-Key: lyr_your_key_here
Option 2 — Authorization Bearer header
Authorization: Bearer lyr_your_key_here
?key=...) are disabled by default for security. Use headers. If Bearer auth is blocked by an intermediate proxy in your environment, use X-API-Key.
{
"error": {
"code": "INVALID_KEY",
"message": "Invalid API key."
}
}
| HTTP Status | Error Code | Meaning |
|---|---|---|
| 400 | MISSING_QUERY | The ?q= parameter is missing |
| 400 | QUERY_TOO_LONG | Query exceeds 500 characters |
| 401 | MISSING_KEY | No API key provided |
| 401 | INVALID_KEY | Key not found or incorrect |
| 403 | KEY_DISABLED | Key has been revoked |
| 429 | RATE_LIMITED | Daily request limit reached |
| 503 | DB_ERROR | Service temporarily unavailable |
Your rate limit is determined by your Lyralink account plan. Rate limit headers are included on every response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1740873600
| Plan | Requests / Day | Notes |
|---|---|---|
| Free | 100 | Default for all accounts |
| Basic | 500 | $5/mo |
| Pro | 2,000 | $15/mo |
| Enterprise | 10,000 | $30/mo — LLaMA 70b access + recommended for production operator deployments |
Returns the most relevant Q&A entries from the dataset for a given query. Uses keyword matching with embedding similarity as a fallback.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q |
string | required | Your search query. Max 500 characters. |
X-API-Key header |
string | required | Your API key in request headers (Authorization Bearer also supported). |
limit |
integer | optional | Number of results to return. Default: 3, max: 10. |
Example Response
{
"object": "search_results",
"query": "how does photosynthesis work",
"count": 2,
"results": [
{
"id": 42,
"question": "Can you explain photosynthesis simply?",
"answer": "Photosynthesis is how plants convert sunlight...",
"score": 2.8431,
"method": "keyword"
},
{
"id": 17,
"question": "What do plants need to make food?",
"answer": "Plants need sunlight, water, and CO2...",
"score": 0.7812,
"method": "embedding"
}
],
"meta": {
"plan": "free",
"requests_today": 4,
"requests_limit": 100,
"requests_remaining": 96
}
}
Result fields
| Field | Type | Description |
|---|---|---|
id | integer | Unique dataset entry ID |
question | string | The stored question |
answer | string | The stored answer |
score | float | Relevance score — higher is more relevant |
method | string | keyword, like, or embedding |
cURL
curl -G https://lyralinkai.com/api/public_api.php \
--data-urlencode "q=how does AI work" \
-H "X-API-Key: lyr_your_key_here" \
-d "limit=3"
JavaScript (fetch)
const response = await fetch(
'https://lyralinkai.com/api/public_api.php?q=how+does+AI+work&limit=3',
{ headers: { 'X-API-Key': 'lyr_your_key_here' } }
);
const data = await response.json();
data.results.forEach(result => {
console.log(result.question);
console.log(result.answer);
console.log(`Score: ${result.score} via ${result.method}`);
});
Python (requests)
import requests
response = requests.get(
"https://lyralinkai.com/api/public_api.php",
params={"q": "how does AI work", "limit": 3},
headers={"X-API-Key": "lyr_your_key_here"}
)
data = response.json()
for result in data["results"]:
print(result["question"])
print(result["answer"])
print(f"Score: {result['score']} via {result['method']}")