---
title: "Help videos API"
url: https://docs.aila.fyi/api-reference/help-videos
source: https://docs.aila.fyi/llms.txt
---

# Help videos API

The docs site (docs.aila.fyi) exposes public feeds for help videos and docs search, plus the docs Ask Aila assistant. This is separate from the [Aila product API](https://docs.aila.fyi/api-reference): it has its own base URL, and the feeds need no API key.

Base URL:
```
https://docs.aila.fyi
```
---

## GET /api/videos

Return the public help-video catalog. The response does not include transcripts.

The catalog is CORS-open. Cache it for one hour.
```bash
curl https://docs.aila.fyi/api/videos
```
### Response
```json
{
  "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_SEC
```
---

## GET /api/docs/search

Lexical search over the full docs corpus. No LLM call. CORS-open. Cache it for one hour.
```bash
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.
```bash
curl https://docs.aila.fyi/api/videos/connect-ghl/transcript
```
---

## POST /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:

- `Origin` header 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
```bash
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:
```json
{
  "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 |
```bash
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.
