# LiveDoc API

नॉलेज बेस बनाएं, संसाधन प्रबंधित करें और सेमांटिक रिट्रीवल और राउटिंग चलाएं।

यह पृष्ठ मौजूदा `/v2` Felo APIs का दस्तावेज़ीकरण करता है, जो **Felo account entitlements और Pro-credit rules** का उपयोग करती हैं। Credits deduct होंगी या नहीं, यह [operation](https://openapi.felo.ai/hi/docs/faq/billing-and-credits.md#v2) पर निर्भर करता है। Platform-balance calls के लिए, समर्थित [Felo OpenAPI endpoint](https://openapi.felo.ai/hi/docs/api-reference/openapi/overview.md) चुनें; request और response shapes अलग हो सकती हैं।

LiveDoc web URLs `https://felo.ai/livedoc/{short_id}` का उपयोग करती हैं। LiveDoc तक access वाला browser session आवश्यक हो सकता है। प्रत्येक endpoint के लिए API के field names वैसे ही रखें: SuperAgent `live_doc_short_id` लौटाता है, जबकि mindmap और PPT creation `livedoc_short_id` लौटाती हैं।

LiveDoc API LiveDocs और उनकी resources के लिए full CRUD operations प्रदान करती है, जिनमें document creation, file upload, URL import, और semantic retrieval शामिल हैं।

## AI एजेंटों के साथ उपयोग करें

किसी Agent को LiveDoc support और सभी अन्य उपलब्ध Felo Skills देने के लिए पूरा `felo-ai` package install करें। Installer `SKILL.md` वाली हर package directory को dynamically discover करता है, जिसमें future package additions भी शामिल हैं। सभी discovered Skills को Agent की native directory में install करें: Codex `~/.codex/skills`, Claude Code `~/.claude/skills`, OpenClaw `~/.agents/skills`, या Hermes Agent `~/.hermes/skills`। [manual AI Agent setup guide](https://openapi.felo.ai/hi/docs/felo-skills.md) प्रत्येक platform के लिए अलग API key और verification steps को कवर करती है।


## प्रमाणीकरण

सभी requests के लिए `Authorization` header में API Key आवश्यक है:

```
Authorization: Bearer YOUR_API_KEY
```

---

## 1. LiveDoc बनाएँ

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `name` | string | हाँ | LiveDoc नाम |
| `description` | string | नहीं | LiveDoc विवरण |
| `icon` | string | नहीं | LiveDoc आइकन |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "AI Research Notes",
    "description": "Collection of AI research materials"
  }'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "short_id": "PvyKouzJirXjFdst4uKRK3",
    "name": "AI Research Notes",
    "description": "Collection of AI research materials",
    "icon": null,
    "created_at": "2026-03-09T10:00:00Z",
    "modified_at": "2026-03-09T10:00:00Z"
  }
}
```
### प्रतिक्रिया फ़ील्ड

| फ़ील्ड | प्रकार | विवरण |
| ------- | ------ | ------------- |
| `short_id` | string | LiveDoc ID |
| `name` | string | LiveDoc नाम |
| `description` | string | LiveDoc विवरण |
| `icon` | string | LiveDoc आइकन |
| `created_at` | string | निर्माण समय-चिह्न (ISO 8601) |
| `modified_at` | string | अंतिम संशोधन समय-चिह्न (ISO 8601) |
| `is_shared` | boolean | क्या यह LiveDoc वर्तमान उपयोगकर्ता के साथ साझा है (उनका स्वामित्व नहीं) |

---

## 2. LiveDocs सूचीबद्ध करें

### एंडपॉइंट

```
GET https://openapi.felo.ai/v2/livedocs
```

### क्वेरी पैरामीटर

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `keyword` | string | नहीं | कीवर्ड द्वारा फ़िल्टर करें |
| `page` | integer | नहीं | पृष्ठ संख्या (1-आधारित) |
| `size` | integer | नहीं | पृष्ठ आकार |

### उदाहरण

```bash
curl 'https://openapi.felo.ai/v2/livedocs?keyword=AI&page=1&size=20' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "total": 2,
    "page": 1,
    "size": 20,
    "items": [
      {
        "short_id": "PvyKouzJirXjFdst4uKRK3",
        "name": "AI Research Notes",
        "description": "Collection of AI research materials",
        "icon": null,
        "created_at": "2026-03-09T10:00:00Z",
        "modified_at": "2026-03-09T10:05:00Z",
        "is_shared": false,
        "readme": {
          "summary": "AI research notes and papers collection",
          "content": "# AI Research Notes\n\nThis LiveDoc contains..."
        }
      }
    ]
  }
}
```
### प्रतिक्रिया फ़ील्ड

`items` में प्रत्येक item में [Create LiveDoc response](#section-5) जैसे ही fields होते हैं, साथ में:

| फ़ील्ड | प्रकार | विवरण |
| ------- | ------ | ------------- |
| `readme` | object \| null | README जानकारी। यदि कोई README मौजूद नहीं है तो `null`. |
| `readme.summary` | string \| null | एक-पंक्ति परियोजना विवरण |
| `readme.content` | string \| null | README सामग्री (Markdown) |

---

### एंडपॉइंट

```
PUT https://openapi.felo.ai/v2/livedocs/{short_id}
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `name` | string | नहीं | नया LiveDoc नाम |
| `description` | string | नहीं | नया LiveDoc विवरण |

### उदाहरण

```bash
curl -X PUT 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Updated Research Notes"
  }'
```

### सफल प्रतिक्रिया (200)

Updated LiveDoc object लौटाता है (Create जैसी ही structure)।

---

## 4. LiveDoc हटाएँ

### एंडपॉइंट

```
DELETE https://openapi.felo.ai/v2/livedocs/{short_id}
```

### उदाहरण

```bash
curl -X DELETE 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": null
}
```
---

## 5. संसाधन सूचीबद्ध करें

### एंडपॉइंट

```
GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources
```

### क्वेरी पैरामीटर

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `resource_types` | string[] | नहीं | संसाधन प्रकारों द्वारा फ़िल्टर करें |
| `page` | integer | नहीं | पृष्ठ संख्या (1-आधारित) |
| `size` | integer | नहीं | पृष्ठ आकार |

### उदाहरण

```bash
curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources?page=1&size=20' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "total": 2,
    "page": 1,
    "size": 20,
    "items": [
      {
        "id": "res_001",
        "title": "OpenAI Blog Post",
        "link": "https://openai.com/blog/...",
        "snippet": "Summary of the article...",
        "thumbnail": null,
        "resource_type": "web",
        "resource_key": "key_001",
        "status": "completed",
        "source": "url",
        "created_at": "2026-03-09T10:00:10Z",
        "modified_at": "2026-03-09T10:00:15Z"
      }
    ]
  }
}
```
### संसाधन प्रतिक्रिया फ़ील्ड

| फ़ील्ड | प्रकार | विवरण |
| ------- | ------ | ------------- |
| `id` | string | संसाधन ID |
| `title` | string | संसाधन शीर्षक |
| `link` | string | संसाधन लिंक/URL |
| `snippet` | string | संसाधन सारांश |
| `thumbnail` | string | थंबनेल URL |
| `resource_type` | string | संसाधन प्रकार (जैसे `web`, `ai_doc`, `file`) |
| `resource_key` | string | संसाधन संबद्धता कुंजी |
| `status` | string | संसाधन स्थिति |
| `source` | string | संसाधन स्रोत |
| `created_at` | string | निर्माण समय-चिह्न (ISO 8601) |
| `modified_at` | string | अंतिम संशोधन समय-चिह्न (ISO 8601) |

---

## 6. एकल संसाधन प्राप्त करें

### एंडपॉइंट

```
GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}
```

### उदाहरण

```bash
curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

एक single resource object लौटाता है (List Resources के items जैसी ही structure)।

---

## 7. संसाधन अपडेट करें

किसी resource का `title`, `snippet`, या `thumbnail` अपडेट करें। केवल provided fields update की जाती हैं; omitted fields अपनी current values बनाए रखती हैं।

### एंडपॉइंट

```
PUT https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}
```

### अनुरोध बॉडी

सभी fields optional हैं।

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `title` | string | नहीं | नया संसाधन शीर्षक (अधिकतम 500 वर्ण) |
| `snippet` | string | नहीं | नया संसाधन सारांश (अधिकतम 2000 वर्ण) |
| `thumbnail` | string | नहीं | नया थंबनेल URL (अधिकतम 2000 वर्ण) |

### उदाहरण

```bash
curl -X PUT 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Updated Title",
    "snippet": "Updated summary of the resource."
  }'
```

### सफल प्रतिक्रिया (200)

Updated resource object लौटाता है (List Resources के items जैसी ही structure)।

---

## 8. संसाधन सामग्री अपडेट करें

किसी `ai_doc` resource का Markdown content अपडेट करें। यह केवल `resource_type == ai_doc` वाली resources के लिए supported है। `snippet` field नए content के पहले 2000 bytes से automatically update होती है।

### एंडपॉइंट

```
PUT https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}/content
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `content` | string | हाँ | संसाधन के लिए नई Markdown सामग्री |

### उदाहरण

```bash
curl -X PUT 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001/content' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "# Updated Document\n\nThis is the new content."
  }'
```

### सफल प्रतिक्रिया (200)

Updated resource object लौटाता है (List Resources के items जैसी ही structure)।

---

## 9. दस्तावेज़ संसाधन बनाएँ

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/doc
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `title` | string | नहीं | दस्तावेज़ शीर्षक ("New Document" डिफ़ॉल्ट) |
| `content` | string | हाँ | Markdown दस्तावेज़ सामग्री; सादा पाठ भी वैध Markdown है |

यह एक `ai_doc` resource बनाता है। JSON string में headings, lists, और links को Markdown के रूप में भेजें, जहाँ newlines `\n` के रूप में escaped हों। Formatted document content के लिए Markdown उपयोग करें।

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/doc' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "My Research Notes",
    "content": "# Research Notes\n\n## Key findings\n\n- First finding\n- Second finding"
  }'
```

### सफल प्रतिक्रिया (200)

Created resource object लौटाता है।
---

## 10. फ़ाइल को दस्तावेज़ के रूप में अपलोड करें

एक file upload करें और उसे document resource (`ai_doc` type) में convert करें।

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/upload-doc
```

### Content-Type

`multipart/form-data`

### अनुरोध भाग

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `file` | file | हाँ | अपलोड की जाने वाली फ़ाइल |
| `title` | string | नहीं | दस्तावेज़ शीर्षक |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/upload-doc' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@document.pdf' \
  -F 'title=My PDF Document'
```

### सफल प्रतिक्रिया (200)

Created resource object लौटाता है।

---

## 11. फ़ाइल संसाधन अपलोड करें

एक file upload करें और उसका original format बनाए रखें।

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/upload
```

### Content-Type

`multipart/form-data`

### अनुरोध भाग

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `file` | file | हाँ | अपलोड की जाने वाली फ़ाइल |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/upload' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@report.xlsx'
```

### सफल प्रतिक्रिया (200)

Created resource object लौटाता है।
---

## 12. URL संसाधन जोड़ें

एक या अधिक URLs को LiveDoc में resources के रूप में जोड़ें।

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/urls
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `urls` | array | हाँ | जोड़ने के लिए URL आइटमों की सूची (1–10). प्रत्येक आइटम एक सादा स्ट्रिंग या `url` और वैकल्पिक `title` वाला ऑब्जेक्ट हो सकता है। |

#### URL आइटम प्रारूप

`urls` में प्रत्येक entry इनमें से एक हो सकती है:

- एक plain string: `"https://example.com/article"`
- एक object: `{"url": "https://example.com/article", "title": "Custom Title"}`

| फ़ील्ड | प्रकार | आवश्यक | विवरण |
| ------- | ------ | ---------- | ------------- |
| `url` | string | हाँ | जोड़ने के लिए URL (5–2000 वर्ण) |
| `title` | string | नहीं | संसाधन के लिए कस्टम शीर्षक (अधिकतम 1000 वर्ण). यदि छोड़ा जाए, तो शीर्षक स्वचालित रूप से पृष्ठ से जनरेट होता है। |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/urls' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "urls": [
      "https://example.com/article-1",
      {"url": "https://example.com/article-2", "title": "My Custom Title"}
    ]
  }'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": [
    {
      "url": "https://example.com/article-1",
      "status": "success",
      "fail_reason": null,
      "resource_id": "res_003"
    },
    {
      "url": "https://example.com/article-2",
      "status": "existed",
      "fail_reason": null,
      "resource_id": "res_004"
    }
  ]
}
```

### URL परिणाम फ़ील्ड

| फ़ील्ड | प्रकार | विवरण |
| ------- | ------ | ------------- |
| `url` | string | प्रसंस्कृत URL |
| `status` | string | परिणाम स्थिति: `success`, `failed`, या `existed` |
| `fail_reason` | string | विफलता का कारण (सफल होने पर null) |
| `resource_id` | string | बनाया गया संसाधन ID |

---

## 13. संसाधन हटाएँ

### एंडपॉइंट

```
DELETE https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}
```

### उदाहरण

```bash
curl -X DELETE 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": null
}
```

---

## 14. पुनःप्राप्त करें (अर्थगत खोज)

LiveDoc की resources पर semantic retrieval करें।

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/retrieve
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `query` | string | हाँ | अर्थगत खोज के लिए क्वेरी सामग्री |
| `resource_ids` | string[] | नहीं | जिन विशिष्ट संसाधन IDs के भीतर खोज करनी है (1-50). यदि छोड़ा जाए, तो प्रासंगिक संसाधन क्वेरी द्वारा स्वतः रूट किए जाते हैं |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/retrieve' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "latest developments in large language models",
    "resource_ids": ["res_001", "res_002"]
  }'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": [
    {
      "id": "res_001",
      "title": "LLM Research Paper",
      "content": "Relevant content excerpt...",
      "score": 0.92,
      "metadata": {}
    }
  ]
}
```

### पुनःप्राप्ति परिणाम फ़ील्ड

| फ़ील्ड | प्रकार | विवरण |
| ------- | ------ | ------------- |
| `id` | string | संसाधन ID |
| `title` | string | संसाधन शीर्षक |
| `content` | string | मिलान की गई सामग्री |
| `score` | number | प्रासंगिकता स्कोर |
| `metadata` | object | अतिरिक्त मेटाडेटा |

---

## 15. संसाधन रूट करें

Query के आधार पर LiveDoc से relevant resources route करें। Resource IDs की list लौटाता है जिसे retrieve endpoint को pass किया जा सकता है।

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/route
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `query` | string | हाँ | रूटिंग के लिए क्वेरी सामग्री |
| `max_resources` | integer | नहीं | लौटाए जाने वाले संसाधन IDs की अधिकतम संख्या |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/route' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "latest developments in large language models",
    "max_resources": 5
  }'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": ["res_001", "res_003", "res_007"]
}
```

---

## 16. संसाधन स्रोत फ़ाइल डाउनलोड करें

किसी resource की source file प्राप्त करें। Presigned download URL पर `302` redirect लौटाता है।

यह केवल उन resources के लिए supported है जिनसे source file associated हो (जैसे uploaded documents)।

### एंडपॉइंट

```
GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}/download
```

### क्वेरी पैरामीटर

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `expires_in` | integer | नहीं | URL समाप्ति समय सेकंड में (डिफ़ॉल्ट: 3600) |

### उदाहरण

```bash
curl -L 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001/download' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### प्रतिक्रिया

`Location` header के साथ `302 Found` लौटाता है, जो presigned S3 download URL की ओर point करता है। Redirect support वाले HTTP clients (जैसे `curl -L`) redirect follow करेंगे और file सीधे download करेंगे।

---

## 17. संसाधन सामग्री प्राप्त करें

किसी resource का extracted text content fetch करें। अधिकांश resource types (document, web, video, ai_doc, ai_ppt, text, voice, mindmap, आदि) के लिए supported है। `image` जैसे unsupported types के लिए 400 लौटाता है।

### एंडपॉइंट

```
GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}/content
```

### उदाहरण

```bash
curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001/content' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "title": "Q4 Financial Report",
    "type": "document",
    "content": "Full extracted text content of the resource..."
  }
}
```

### प्रतिक्रिया फ़ील्ड

| फ़ील्ड | प्रकार | विवरण |
| ------- | ------ | ------------- |
| `title` | string | संसाधन शीर्षक |
| `type` | string | संसाधन प्रकार |
| `content` | string | संसाधन सामग्री; व्याख्या `type` पर निर्भर करती है, जैसा नीचे वर्णित है |

### संसाधन सामग्री प्रारूप

`data.content` एक string है। इसे पढ़ने का तरीका चुनने के लिए `data.type` उपयोग करें:

| संसाधन प्रकार | सामग्री प्रारूप | पठन चरण |
| --- | --- | --- |
| `ai_doc` | Markdown | स्ट्रिंग को दस्तावेज़ के रूप में रेंडर या संग्रहीत करें; इसमें SuperAgent शोध रिपोर्ट शामिल हैं |
| `mindmap` | JSON-एन्कोडेड ऑब्जेक्ट | `layout` और `text` में Markdown शीर्षक रूपरेखा पढ़ने के लिए एक बार डिकोड करें |
| `ai_ppt` | `slides` वाला JSON-एन्कोडेड ऑब्जेक्ट | एक बार डिकोड करें, फिर यदि प्रत्येक स्लाइड की `content` स्ट्रिंग में JSON हो, तो उसे डिकोड करें |
| अन्य पाठ-युक्त प्रकार | निष्कर्षित पाठ | अपने अनुप्रयोग की आवश्यकता के अनुसार पाठ प्रदर्शित करें |

Decode करने के बाद mindmap content example:

```json
{
  "layout": "mindMap",
  "text": "# Topic\n## Branch\n### Leaf"
}
```

Decode करने के बाद PPT content example:

```json
{
  "slides": [
    {
      "page": 1,
      "title": "Introduction",
      "content": "{\"coreIdea\":\"Introduce the topic\",\"slideOverview\":\"Overview of key points\",\"themeDescription\":\"Light background\"}",
      "theme": "light",
      "url": "https://example.com/slide-preview?signature=..."
    }
  ]
}
```

Slide fields generator पर निर्भर करते हैं और absent हो सकते हैं या additional information शामिल कर सकते हैं। `coreIdea`, `slideOverview`, और `themeDescription` को optional presentation metadata मानें। यदि किसी slide का `content` plain text हो, तो उसे सीधे प्रदर्शित करें।

Slide `url` values temporary signed links हैं। उनकी lifetime issue होने के समय निर्धारित होती है; link expire होने पर fresh resource content retrieve करें। PPTX downloads के लिए अलग [PPT export workflow](https://openapi.felo.ai/hi/docs/api-reference/ppt-tasks.md#pptx) उपयोग करें, जिसकी response में `expires_at` शामिल होता है।

---

## 18. PPT पृष्ठ पुनःप्राप्त करें

PPT resource के किसी specific page पर deep content retrieval करें। Slide page को scrape करता है और ranked content chunks लौटाता है। Response format [Retrieve](#14) endpoint के समान है।

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/ppt-retrieve
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `resource_id` | string | हाँ | PPT संसाधन ID |
| `page_number` | integer | हाँ | पुनःप्राप्त करने के लिए पृष्ठ संख्या (1 से शुरू) |
| `query` | string | हाँ | क्या देखना है यह बताने वाली क्वेरी सामग्री |
| `max_chunk` | integer | नहीं | वापस करने के लिए अधिकतम chunks की संख्या (डिफ़ॉल्ट: 3) |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/ppt-retrieve' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "resource_id": "res_001",
    "page_number": 3,
    "query": "product pricing information",
    "max_chunk": 3
  }'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": [
    {
      "id": "res_001_page_3_chunk_1",
      "title": "Q4 Product Deck",
      "content": "Relevant slide content excerpt...",
      "score": null,
      "metadata": {
        "resource_id": "res_001",
        "page_number": 3,
        "index": 1
      }
    }
  ]
}
```

### प्रतिक्रिया फ़ील्ड

[Retrieve Result Fields](#section-44) जैसी ही।

---

## त्रुटि कोड


| कोड | HTTP स्थिति | विवरण |
| ------ | ------------- | ------------- |
| `INVALID_API_KEY` | 401 | API Key अमान्य या निरस्त है |
| `LIVEDOC_CREATE_FAILED` | 502 | LiveDoc बनाने में विफल |
| `LIVEDOC_UPDATE_FAILED` | 502 | LiveDoc अपडेट करने में विफल |
| `LIVEDOC_DELETE_FAILED` | 502 | LiveDoc हटाने में विफल |
| `LIVEDOC_NOT_FOUND` | 404 | LiveDoc नहीं मिला |
| `LIVEDOC_LIST_FAILED` | 502 | LiveDocs सूचीबद्ध करने में विफल |
| `LIVEDOC_RESOURCE_CREATE_FAILED` | 502 | संसाधन बनाने में विफल |
| `LIVEDOC_RESOURCE_UPLOAD_FAILED` | 502 | संसाधन अपलोड करने में विफल |
| `LIVEDOC_RESOURCE_DELETE_FAILED` | 502 | संसाधन हटाने में विफल |
| `LIVEDOC_RESOURCE_NOT_FOUND` | 404 | संसाधन नहीं मिला |
| `LIVEDOC_RESOURCE_LIST_FAILED` | 502 | संसाधनों की सूची बनाने में विफल |
| `LIVEDOC_RESOURCE_RETRIEVE_FAILED` | 502 | संसाधन पुनःप्राप्त करने में विफल |
| `LIVEDOC_RESOURCE_ADD_URLS_FAILED` | 502 | URL संसाधन जोड़ने में विफल |

---

## 19. README प्राप्त करें

किसी LiveDoc का README content प्राप्त करें। यदि कोई README set नहीं की गई है, तो empty string लौटाता है।

### एंडपॉइंट

```
GET https://openapi.felo.ai/v2/livedocs/{short_id}/readme
```

### उदाहरण

```bash
curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/readme' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "summary": "A brief one-line description of the project.",
    "content": "# My LiveDoc\n\nThis is the README content in Markdown."
  }
}
```

### प्रतिक्रिया फ़ील्ड

| फ़ील्ड | प्रकार | विवरण |
| ------- | ------ | ------------- |
| `summary` | string \| null | एक-पंक्ति परियोजना विवरण। अधिकतम 2000 वर्ण। |
| `content` | string | README सामग्री (Markdown)। यदि सेट नहीं है तो खाली स्ट्रिंग। |

---

## 20. README बनाएँ या अपडेट करें

किसी LiveDoc का README create या update करें (upsert semantics)।

### एंडपॉइंट

```
PUT https://openapi.felo.ai/v2/livedocs/{short_id}/readme
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `summary` | string | नहीं | एक-पंक्ति परियोजना विवरण (अधिकतम 2000 वर्ण) |
| `content` | string | नहीं | README सामग्री (Markdown) |

> **ध्यान दें:** `summary` या `content` में से कम से कम एक provide करना आवश्यक है।

### उदाहरण

```bash
curl -X PUT 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/readme' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "summary": "A brief one-line description of the project.",
    "content": "# My LiveDoc\n\nThis is the README content in Markdown."
  }'
```

### सफल प्रतिक्रिया (200)

Updated README object लौटाता है (Get README जैसी ही structure)।

---

## 21. README में जोड़ें

Existing README के अंत में content append करें। यदि कोई README मौजूद नहीं है, तो provided content के साथ नई README create करता है।

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/readme/append
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `content` | string | हाँ | जोड़ने के लिए सामग्री (Markdown) |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/readme/append' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "\n\n## New Section\n\nAdditional content appended to README."
  }'
```

### सफल प्रतिक्रिया (200)

Append करने के बाद complete README object लौटाता है (Get README जैसी ही structure)।

---

## 22. README हटाएँ

किसी LiveDoc की README delete करें।

### एंडपॉइंट

```
DELETE https://openapi.felo.ai/v2/livedocs/{short_id}/readme
```

### उदाहरण

```bash
curl -X DELETE 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/readme' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": null
}
```

---

## 23. कार्य सूचीबद्ध करें

किसी LiveDoc में tasks की paginated list प्राप्त करें। Results `sort` asc, `status` asc, `created_at` desc के अनुसार sort होते हैं।

### एंडपॉइंट

```
GET https://openapi.felo.ai/v2/livedocs/{short_id}/tasks
```

### क्वेरी पैरामीटर

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `status` | integer | नहीं | स्थिति द्वारा फ़िल्टर करें: `0`=TODO, `1`=IN_PROGRESS, `2`=DONE |
| `labels` | string[] | नहीं | लेबल द्वारा फ़िल्टर करें (कार्यों में निर्दिष्ट सभी लेबल होने चाहिए) |
| `page` | integer | नहीं | पृष्ठ संख्या (1-आधारित) |
| `size` | integer | नहीं | पृष्ठ आकार |

### उदाहरण

```bash
curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks?status=0&page=1&size=20' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "total": 1,
    "page": 1,
    "size": 20,
    "items": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "title": "Write documentation",
        "description": "Write API documentation for the new endpoints",
        "status": 0,
        "sort": 0,
        "labels": ["docs", "priority-high"],
        "created_at": "2026-03-19T10:00:00Z",
        "modified_at": "2026-03-19T10:00:00Z"
      }
    ]
  }
}
```

### कार्य प्रतिक्रिया फ़ील्ड

| फ़ील्ड | प्रकार | विवरण |
| ------- | ------ | ------------- |
| `id` | string | कार्य ID (UUID) |
| `title` | string | कार्य शीर्षक |
| `description` | string | कार्य विवरण |
| `status` | integer | कार्य स्थिति: `0`=TODO, `1`=IN_PROGRESS, `2`=DONE |
| `sort` | integer | क्रमबद्धता (गैर-ऋणात्मक) |
| `labels` | string[] | लेबल सूची |
| `operated_by` | string | ऑपरेटर हस्ताक्षर, जैसे `claude-code`, `openclaw` |
| `created_at` | string | निर्माण समय-चिह्न (ISO 8601) |
| `modified_at` | string | अंतिम संशोधन समय-चिह्न (ISO 8601) |

---

## 24. कार्य बनाएँ

किसी LiveDoc में नया task create करें।

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/tasks
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `title` | string | हाँ | कार्य शीर्षक |
| `description` | string | नहीं | कार्य विवरण |
| `status` | integer | हाँ | कार्य स्थिति: `0`=TODO, `1`=IN_PROGRESS, `2`=DONE |
| `sort` | integer | हाँ | क्रमबद्धता (गैर-ऋणात्मक पूर्णांक) |
| `labels` | string[] | नहीं | लेबल सूची (अधिकतम 10, प्रत्येक अधिकतम 50 वर्ण) |
| `operated_by` | string | नहीं | ऑपरेटर हस्ताक्षर, जैसे `claude-code`, `openclaw` (अधिकतम 100 वर्ण) |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Write documentation",
    "description": "Write API documentation for the new endpoints",
    "status": 0,
    "sort": 0,
    "labels": ["docs", "priority-high"]
  }'
```

### सफल प्रतिक्रिया (200)

Created task object लौटाता है (List Tasks के items जैसी ही structure)।

---

## 25. कार्य अपडेट करें

किसी task को partially update करें। केवल provided fields update की जाती हैं; omitted fields अपनी current values बनाए रखती हैं।

### एंडपॉइंट

```
PATCH https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}
```

### अनुरोध बॉडी

सभी fields optional हैं।

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `title` | string | नहीं | नया कार्य शीर्षक |
| `description` | string | नहीं | नया कार्य विवरण |
| `status` | integer | नहीं | नई स्थिति: `0`=TODO, `1`=IN_PROGRESS, `2`=DONE |
| `sort` | integer | नहीं | नई क्रमबद्धता (गैर-ऋणात्मक) |
| `labels` | string[] | नहीं | नई लेबल सूची (अधिकतम 10, प्रत्येक अधिकतम 50 वर्ण) |
| `operated_by` | string | नहीं | ऑपरेटर हस्ताक्षर, जैसे `claude-code`, `openclaw` (अधिकतम 100 वर्ण) |

### उदाहरण

```bash
curl -X PATCH 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks/550e8400-e29b-41d4-a716-446655440000' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": 1
  }'
```

### सफल प्रतिक्रिया (200)

Updated task object लौटाता है (List Tasks के items जैसी ही structure)।

---

## 26. कार्य हटाएँ

किसी task को soft-delete करें।

### एंडपॉइंट

```
DELETE https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}
```

### उदाहरण

```bash
curl -X DELETE 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks/550e8400-e29b-41d4-a716-446655440000' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": null
}
```

---

## 27. कार्य रिकॉर्ड सूचीबद्ध करें

किसी task के records (comments और change history) की paginated list प्राप्त करें, जो `created_at` ascending के अनुसार sort होती है।

### एंडपॉइंट

```
GET https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}/records
```

### क्वेरी पैरामीटर

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `record_type` | string | नहीं | रिकॉर्ड प्रकार द्वारा फ़िल्टर करें: `comment`, `edit`, `status_change` |
| `page` | integer | नहीं | पृष्ठ संख्या (1-आधारित) |
| `size` | integer | नहीं | पृष्ठ आकार |

### उदाहरण

```bash
curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks/550e8400-e29b-41d4-a716-446655440000/records' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

### सफल प्रतिक्रिया (200)

```json
{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "total": 2,
    "page": 1,
    "size": 20,
    "items": [
      {
        "id": "rec_001",
        "record_type": "comment",
        "content": "This is a comment",
        "meta": null,
        "task_id": "550e8400-e29b-41d4-a716-446655440000",
        "created_at": "2026-03-19T10:05:00Z",
        "modified_at": "2026-03-19T10:05:00Z"
      },
      {
        "id": "rec_002",
        "record_type": "status_change",
        "content": null,
        "meta": {"from": 0, "to": 1},
        "task_id": "550e8400-e29b-41d4-a716-446655440000",
        "created_at": "2026-03-19T10:10:00Z",
        "modified_at": "2026-03-19T10:10:00Z"
      }
    ]
  }
}
```

### कार्य रिकॉर्ड प्रतिक्रिया फ़ील्ड

| फ़ील्ड | प्रकार | विवरण |
| ------- | ------ | ------------- |
| `id` | string | रिकॉर्ड ID |
| `record_type` | string | रिकॉर्ड प्रकार: `comment` / `edit` / `status_change` |
| `content` | string | टिप्पणी पाठ (केवल `comment` प्रकार के लिए) |
| `meta` | object | परिवर्तन विवरण (`edit` और `status_change` प्रकारों के लिए) |
| `task_id` | string | मूल कार्य ID |
| `operated_by` | string | ऑपरेटर हस्ताक्षर, जैसे `claude-code`, `openclaw` |
| `created_at` | string | निर्माण समय-चिह्न (ISO 8601) |
| `modified_at` | string | अंतिम संशोधन समय-चिह्न (ISO 8601) |

---

## 28. कार्य टिप्पणी जोड़ें

किसी task में comment जोड़ें।

### एंडपॉइंट

```
POST https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}/comments
```

### अनुरोध बॉडी

| पैरामीटर | प्रकार | आवश्यक | विवरण |
| ----------- | ------ | ---------- | ------------- |
| `content` | string | हाँ | टिप्पणी सामग्री |
| `operated_by` | string | नहीं | ऑपरेटर हस्ताक्षर, जैसे `claude-code`, `openclaw` (अधिकतम 100 वर्ण) |

### उदाहरण

```bash
curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks/550e8400-e29b-41d4-a716-446655440000/comments' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "This task is now in progress."
  }'
```

### सफल प्रतिक्रिया (200)

Created record object लौटाता है (List Task Records के items जैसी ही structure)।

---

## त्रुटि कोड (अद्यतन)

| कोड | HTTP स्थिति | विवरण |
| ------ | ------------- | ------------- |
| `INVALID_API_KEY` | 401 | API Key अमान्य या निरस्त है |
| `LIVEDOC_CREATE_FAILED` | 502 | LiveDoc बनाने में विफल |
| `LIVEDOC_UPDATE_FAILED` | 502 | LiveDoc अपडेट करने में विफल |
| `LIVEDOC_DELETE_FAILED` | 502 | LiveDoc हटाने में विफल |
| `LIVEDOC_NOT_FOUND` | 404 | LiveDoc नहीं मिला |
| `LIVEDOC_LIST_FAILED` | 502 | LiveDocs सूचीबद्ध करने में विफल |
| `LIVEDOC_RESOURCE_CREATE_FAILED` | 502 | संसाधन बनाने में विफल |
| `LIVEDOC_RESOURCE_UPLOAD_FAILED` | 502 | संसाधन अपलोड करने में विफल |
| `LIVEDOC_RESOURCE_DELETE_FAILED` | 502 | संसाधन हटाने में विफल |
| `LIVEDOC_RESOURCE_NOT_FOUND` | 404 | संसाधन नहीं मिला |
| `LIVEDOC_RESOURCE_LIST_FAILED` | 502 | संसाधनों की सूची बनाने में विफल |
| `LIVEDOC_RESOURCE_RETRIEVE_FAILED` | 502 | संसाधन पुनःप्राप्त करने में विफल |
| `LIVEDOC_RESOURCE_ADD_URLS_FAILED` | 502 | URL संसाधन जोड़ने में विफल |
| `LIVEDOC_README_GET_FAILED` | 502 | README प्राप्त करने में विफल |
| `LIVEDOC_README_UPDATE_FAILED` | 502 | README बनाने या अपडेट करने में विफल |
| `LIVEDOC_README_DELETE_FAILED` | 502 | README हटाने में विफल |
| `LIVEDOC_README_NOT_FOUND` | 404 | README नहीं मिला |
| `LIVEDOC_TASK_LIST_FAILED` | 502 | कार्य सूचीबद्ध करने में विफल |
| `LIVEDOC_TASK_CREATE_FAILED` | 502 | कार्य बनाने में विफल |
| `LIVEDOC_TASK_UPDATE_FAILED` | 502 | कार्य अपडेट करने में विफल |
| `LIVEDOC_TASK_DELETE_FAILED` | 502 | कार्य हटाने में विफल |
| `LIVEDOC_TASK_NOT_FOUND` | 404 | कार्य नहीं मिला |
| `LIVEDOC_TASK_RECORD_LIST_FAILED` | 502 | कार्य रिकॉर्ड सूचीबद्ध करने में विफल |
| `LIVEDOC_TASK_COMMENT_CREATE_FAILED` | 502 | कार्य टिप्पणी बनाने में विफल |
