Help videos API
The docs site exposes public feeds for help videos and docs search, plus Ask Aila.
Base URL:
https://docs.aila.fyiGET /api/videos
Return the public help-video catalog. The response does not include transcripts.
The catalog is CORS-open. Cache it for one hour.
curl https://docs.aila.fyi/api/videosResponse
{
"videos": [
{
"id": "connect-ghl",
"title": "Connect GoHighLevel",
"status": "published",
"youtubeId": "xxxx",
"durationSec": 98,
"audience": ["Admin"],
"docPages": ["/integrations/gohighlevel"],
"faqPage": "crm-sync",
"summary": "Connect LeadConnector and set summary options.",
"keywords": ["GoHighLevel", "LeadConnector"],
"chapters": [
{
"id": "connect-ghl.1",
"startSec": 0,
"endSec": 38,
"label": "Connect LeadConnector",
"summary": "Open Settings, click LeadConnector, pick a sub-account.",
"questions": ["How do I connect LeadConnector?"]
}
]
}
]
}Draft videos are omitted until a YouTube id is set.
Use startSec as an integer. Build a watch URL like this:
https://youtu.be/YOUTUBE_ID?t=START_SECGET /api/docs/search
Lexical search over the full docs corpus. No LLM call. CORS-open. Cache it for one hour.
curl 'https://docs.aila.fyi/api/docs/search?q=gohighlevel+inbound'Pass all=1 for a full dump of section chunks.
Each hit is { slug, title, section, snippet, url, policy? }. A matching per-slug policy may include doNotLinkFor.
GET /api/videos/:id/transcript
Return timestamped transcript segments for one published video.
curl https://docs.aila.fyi/api/videos/connect-ghl/transcriptPOST /api/ask
Ask a product question. The model answers from written docs and the video catalog. The server resolves timestamps. The model cannot invent a start time.
Auth
Send one of:
Originheader on the allow list (docs widget)Authorization: Bearer ASK_AILA_SERVICE_KEY(MCP and eval)
Body
| Field | Type | Notes |
|---|---|---|
messages | array | Required. Each item has role (user or assistant) and string content. Replay text only. Max 8 user turns. Max 1000 characters per message. |
page | string | Optional current docs path. This goes in the user message. |
stream | boolean | Default true. Set false for MCP and eval. |
Do not send tool_use or tool_result blocks in history.
JSON mode
curl -X POST https://docs.aila.fyi/api/ask \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ASK_AILA_SERVICE_KEY" \
-d '{"stream":false,"messages":[{"role":"user","content":"How do I connect GoHighLevel?"}]}'Response:
{
"answer": "Open Settings → Connections. Click LeadConnector.",
"citations": [
{
"videoId": "connect-ghl",
"chapterId": "connect-ghl.1",
"title": "Connect GoHighLevel",
"label": "Connect LeadConnector",
"startSec": 0,
"endSec": 38,
"youtubeId": "xxxx",
"url": "https://youtu.be/xxxx?t=0",
"embedUrl": "https://www.youtube-nocookie.com/embed/xxxx?start=0&end=38&rel=0",
"docPages": ["/integrations/gohighlevel"],
"faqPage": "crm-sync",
"summary": "Open Settings, click LeadConnector, pick a sub-account.",
"reason": "Shows the Connect button and sub-account picker."
}
],
"usage": {
"input_tokens": 0,
"output_tokens": 0
}
}Stream mode
Content-Type: text/event-stream
Events:
| Event | Data |
|---|---|
text | JSON object with a text string |
citations | JSON object with a citations array |
done | JSON object with a usage object |
error | JSON object with an error string |
curl -N -X POST https://docs.aila.fyi/api/ask \
-H "Content-Type: application/json" \
-H "Origin: https://docs.aila.fyi" \
-d '{"messages":[{"role":"user","content":"How do I connect GoHighLevel?"}]}'Errors
| Status | Reason |
|---|---|
| 403 | Missing Origin, or Origin is not on the allow list. |
| 413 | A message is longer than 1000 characters. |
| 429 | Rate limit. Read Retry-After. |
| 400 | Bad body, too many turns, or tool blocks in history. |
Limits: 20 requests / 10 minutes / IP, and 300 requests / hour globally.
MCP tools
The public MCP route in the Aila app repo (src/app/api/mcp/) should add:
search_help_videos— lexical search overGET /api/videos. No LLM call.ask_aila_docs—POST /api/askwithstream: falseand the service key.
See the implementation brief in the docs repo: docs/mcp-help-videos-brief.md.