[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-runway-rw-integrate-documents":3,"mdc--iiu8mp-key":38,"related-repo-runway-rw-integrate-documents":2725,"related-org-runway-rw-integrate-documents":2823},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":33,"sourceUrl":36,"mdContent":37},"rw-integrate-documents","add documents to Runway Characters","Help users add knowledge base documents to Runway Characters for domain-specific conversations",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"runway","Runway","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Frunway.png","runwayml",[13,17,20,21,24],{"name":14,"slug":15,"type":16},"AI Context","ai-context","tag",{"name":18,"slug":19,"type":16},"Knowledge Management","knowledge-management",{"name":9,"slug":8,"type":16},{"name":22,"slug":23,"type":16},"Documents","documents",{"name":25,"slug":26,"type":16},"Agents","agents",57,"https:\u002F\u002Fgithub.com\u002Frunwayml\u002Fskills","2026-04-08T04:42:04.95186",null,15,[],{"repoUrl":28,"stars":27,"forks":31,"topics":34,"description":35},[],"for Runway coding agent skills","https:\u002F\u002Fgithub.com\u002Frunwayml\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Frw-integrate-documents","---\nname: rw-integrate-documents\ndescription: \"Help users add knowledge base documents to Runway Characters for domain-specific conversations\"\nuser-invocable: false\nallowed-tools: Read, Grep, Glob, Edit, Write\n---\n\n# Integrate Documents (Knowledge Base)\n\n> **PREREQUISITE:** Run `+rw-check-compatibility` first. Run `+rw-fetch-api-reference` to load the latest API reference before integrating. `+rw-setup-api-key` — API credentials must be configured\n>\n> **USED BY:** `+rw-integrate-characters` — Documents are linked to Avatars to give them domain-specific knowledge\n\nGive your Characters access to domain-specific knowledge. Upload content that your Avatar can reference during conversations for accurate, contextual responses.\n\n## When to Use Documents\n\n| Use Case | Example Content |\n|----------|----------------|\n| **Customer support** | FAQs, product info, company policies, return procedures |\n| **Quizzes & games** | Question banks, correct answers, scoring rules |\n| **Education** | Course material, reference content, learning objectives |\n| **Brand experiences** | Brand guidelines, messaging, product catalogs |\n\n## Constraints\n\n- Each Avatar supports up to **50,000 tokens** of knowledge\n- Supported formats: **plain text** and **Markdown**\n- More formats planned for future releases\n\n## Flow\n\nThe flow is: **Create a Document** → **Link it to an Avatar**\n\n## Step 1: Create a Document\n\n### Node.js\n\n```javascript\nimport RunwayML from '@runwayml\u002Fsdk';\n\nconst client = new RunwayML();\n\nconst document = await client.documents.create({\n  name: 'Product FAQ',\n  content: `# Product FAQ\n\n## What is your return policy?\nWe offer a 30-day return policy for all unused items in original packaging.\n\n## How do I track my order?\nLog in to your account and visit the Orders page. You'll find tracking information for all shipped orders.\n\n## Do you offer international shipping?\nYes, we ship to over 50 countries. Shipping costs and delivery times vary by destination.`,\n});\n\nconsole.log('Document created:', document.id);\n```\n\n### Python\n\n```python\nfrom runwayml import RunwayML\n\nclient = RunwayML()\n\ndocument = client.documents.create(\n    name='Product FAQ',\n    content=\"\"\"# Product FAQ\n\n## What is your return policy?\nWe offer a 30-day return policy for all unused items in original packaging.\n\n## How do I track my order?\nLog in to your account and visit the Orders page.\n\n## Do you offer international shipping?\nYes, we ship to over 50 countries.\"\"\",\n)\n\nprint('Document created:', document.id)\n```\n\n## Step 2: Link the Document to an Avatar\n\nUpdate your Avatar to attach the document. **This replaces any existing document attachments** — pass all document IDs you want linked.\n\n### Node.js\n\n```javascript\nawait client.avatars.update(avatarId, {\n  documentIds: [document.id],\n});\n```\n\n### Python\n\n```python\nclient.avatars.update(\n    avatar_id,\n    document_ids=[document.id],\n)\n```\n\n### Multiple Documents\n\nYou can link multiple documents to a single avatar (total must stay under 50,000 tokens):\n\n```javascript\nconst faq = await client.documents.create({\n  name: 'FAQ',\n  content: '...',\n});\n\nconst policies = await client.documents.create({\n  name: 'Company Policies',\n  content: '...',\n});\n\nawait client.avatars.update(avatarId, {\n  documentIds: [faq.id, policies.id],\n});\n```\n\n## Step 3: Start a Session\n\nOnce documents are linked, the Avatar automatically has access to the knowledge during conversations. Start a session as usual — no additional configuration needed:\n\n```javascript\nconst session = await client.realtimeSessions.create({\n  model: 'gwm1_avatars',\n  avatar: {\n    type: 'custom',\n    avatarId: avatarId,\n  },\n});\n```\n\n```python\nsession = client.realtime_sessions.create(\n    model='gwm1_avatars',\n    avatar={\n        'type': 'custom',\n        'avatar_id': avatar_id,\n    },\n)\n```\n\nSee `+rw-integrate-characters` for the full session creation, polling, and WebRTC flow.\n\n## Integration Patterns\n\n### Load Documents from Files\n\nRead content from local files and create documents:\n\n```javascript\nimport fs from 'fs';\nimport RunwayML from '@runwayml\u002Fsdk';\n\nconst client = new RunwayML();\n\n\u002F\u002F Read a local markdown file\nconst content = fs.readFileSync('.\u002Fknowledge\u002Fproduct-faq.md', 'utf-8');\n\nconst document = await client.documents.create({\n  name: 'Product FAQ',\n  content,\n});\n```\n\n```python\nfrom pathlib import Path\nfrom runwayml import RunwayML\n\nclient = RunwayML()\n\ncontent = Path('.\u002Fknowledge\u002Fproduct-faq.md').read_text()\n\ndocument = client.documents.create(\n    name='Product FAQ',\n    content=content,\n)\n```\n\n### Dynamic Knowledge Updates\n\nUpdate documents programmatically — useful for syncing with a CMS or database:\n\n```javascript\n\u002F\u002F Example: API endpoint to update character knowledge\napp.post('\u002Fapi\u002Favatar\u002Fupdate-knowledge', async (req, res) => {\n  const { avatarId, documents } = req.body;\n\n  \u002F\u002F Create new documents\n  const docIds = [];\n  for (const doc of documents) {\n    const created = await client.documents.create({\n      name: doc.name,\n      content: doc.content,\n    });\n    docIds.push(created.id);\n  }\n\n  \u002F\u002F Link all documents to the avatar (replaces existing)\n  await client.avatars.update(avatarId, {\n    documentIds: docIds,\n  });\n\n  res.json({ success: true, documentCount: docIds.length });\n});\n```\n\n## Tips\n\n- **Use Markdown** for structured content — headings help the Avatar navigate the knowledge.\n- **Be concise** — stay well under the 50,000 token limit for best retrieval quality.\n- **Organize by topic** — multiple focused documents work better than one giant document.\n- **Update regularly** — keep knowledge current by re-creating documents when content changes.\n- Documents can also be managed via the [Developer Portal](https:\u002F\u002Fdev.runwayml.com\u002F) UI.\n",{"data":39,"body":42},{"name":4,"description":6,"user-invocable":40,"allowed-tools":41},false,"Read, Grep, Glob, Edit, Write",{"type":43,"children":44},"root",[45,54,113,118,125,217,223,262,268,285,291,298,693,699,849,855,867,872,968,973,1011,1017,1022,1380,1386,1391,1565,1627,1639,1645,1651,1656,1960,2047,2053,2058,2654,2660,2719],{"type":46,"tag":47,"props":48,"children":50},"element","h1",{"id":49},"integrate-documents-knowledge-base",[51],{"type":52,"value":53},"text","Integrate Documents (Knowledge Base)",{"type":46,"tag":55,"props":56,"children":57},"blockquote",{},[58,95],{"type":46,"tag":59,"props":60,"children":61},"p",{},[62,68,70,77,79,85,87,93],{"type":46,"tag":63,"props":64,"children":65},"strong",{},[66],{"type":52,"value":67},"PREREQUISITE:",{"type":52,"value":69}," Run ",{"type":46,"tag":71,"props":72,"children":74},"code",{"className":73},[],[75],{"type":52,"value":76},"+rw-check-compatibility",{"type":52,"value":78}," first. Run ",{"type":46,"tag":71,"props":80,"children":82},{"className":81},[],[83],{"type":52,"value":84},"+rw-fetch-api-reference",{"type":52,"value":86}," to load the latest API reference before integrating. ",{"type":46,"tag":71,"props":88,"children":90},{"className":89},[],[91],{"type":52,"value":92},"+rw-setup-api-key",{"type":52,"value":94}," — API credentials must be configured",{"type":46,"tag":59,"props":96,"children":97},{},[98,103,105,111],{"type":46,"tag":63,"props":99,"children":100},{},[101],{"type":52,"value":102},"USED BY:",{"type":52,"value":104}," ",{"type":46,"tag":71,"props":106,"children":108},{"className":107},[],[109],{"type":52,"value":110},"+rw-integrate-characters",{"type":52,"value":112}," — Documents are linked to Avatars to give them domain-specific knowledge",{"type":46,"tag":59,"props":114,"children":115},{},[116],{"type":52,"value":117},"Give your Characters access to domain-specific knowledge. Upload content that your Avatar can reference during conversations for accurate, contextual responses.",{"type":46,"tag":119,"props":120,"children":122},"h2",{"id":121},"when-to-use-documents",[123],{"type":52,"value":124},"When to Use Documents",{"type":46,"tag":126,"props":127,"children":128},"table",{},[129,148],{"type":46,"tag":130,"props":131,"children":132},"thead",{},[133],{"type":46,"tag":134,"props":135,"children":136},"tr",{},[137,143],{"type":46,"tag":138,"props":139,"children":140},"th",{},[141],{"type":52,"value":142},"Use Case",{"type":46,"tag":138,"props":144,"children":145},{},[146],{"type":52,"value":147},"Example Content",{"type":46,"tag":149,"props":150,"children":151},"tbody",{},[152,169,185,201],{"type":46,"tag":134,"props":153,"children":154},{},[155,164],{"type":46,"tag":156,"props":157,"children":158},"td",{},[159],{"type":46,"tag":63,"props":160,"children":161},{},[162],{"type":52,"value":163},"Customer support",{"type":46,"tag":156,"props":165,"children":166},{},[167],{"type":52,"value":168},"FAQs, product info, company policies, return procedures",{"type":46,"tag":134,"props":170,"children":171},{},[172,180],{"type":46,"tag":156,"props":173,"children":174},{},[175],{"type":46,"tag":63,"props":176,"children":177},{},[178],{"type":52,"value":179},"Quizzes & games",{"type":46,"tag":156,"props":181,"children":182},{},[183],{"type":52,"value":184},"Question banks, correct answers, scoring rules",{"type":46,"tag":134,"props":186,"children":187},{},[188,196],{"type":46,"tag":156,"props":189,"children":190},{},[191],{"type":46,"tag":63,"props":192,"children":193},{},[194],{"type":52,"value":195},"Education",{"type":46,"tag":156,"props":197,"children":198},{},[199],{"type":52,"value":200},"Course material, reference content, learning objectives",{"type":46,"tag":134,"props":202,"children":203},{},[204,212],{"type":46,"tag":156,"props":205,"children":206},{},[207],{"type":46,"tag":63,"props":208,"children":209},{},[210],{"type":52,"value":211},"Brand experiences",{"type":46,"tag":156,"props":213,"children":214},{},[215],{"type":52,"value":216},"Brand guidelines, messaging, product catalogs",{"type":46,"tag":119,"props":218,"children":220},{"id":219},"constraints",[221],{"type":52,"value":222},"Constraints",{"type":46,"tag":224,"props":225,"children":226},"ul",{},[227,240,257],{"type":46,"tag":228,"props":229,"children":230},"li",{},[231,233,238],{"type":52,"value":232},"Each Avatar supports up to ",{"type":46,"tag":63,"props":234,"children":235},{},[236],{"type":52,"value":237},"50,000 tokens",{"type":52,"value":239}," of knowledge",{"type":46,"tag":228,"props":241,"children":242},{},[243,245,250,252],{"type":52,"value":244},"Supported formats: ",{"type":46,"tag":63,"props":246,"children":247},{},[248],{"type":52,"value":249},"plain text",{"type":52,"value":251}," and ",{"type":46,"tag":63,"props":253,"children":254},{},[255],{"type":52,"value":256},"Markdown",{"type":46,"tag":228,"props":258,"children":259},{},[260],{"type":52,"value":261},"More formats planned for future releases",{"type":46,"tag":119,"props":263,"children":265},{"id":264},"flow",[266],{"type":52,"value":267},"Flow",{"type":46,"tag":59,"props":269,"children":270},{},[271,273,278,280],{"type":52,"value":272},"The flow is: ",{"type":46,"tag":63,"props":274,"children":275},{},[276],{"type":52,"value":277},"Create a Document",{"type":52,"value":279}," → ",{"type":46,"tag":63,"props":281,"children":282},{},[283],{"type":52,"value":284},"Link it to an Avatar",{"type":46,"tag":119,"props":286,"children":288},{"id":287},"step-1-create-a-document",[289],{"type":52,"value":290},"Step 1: Create a Document",{"type":46,"tag":292,"props":293,"children":295},"h3",{"id":294},"nodejs",[296],{"type":52,"value":297},"Node.js",{"type":46,"tag":299,"props":300,"children":305},"pre",{"className":301,"code":302,"language":303,"meta":304,"style":304},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import RunwayML from '@runwayml\u002Fsdk';\n\nconst client = new RunwayML();\n\nconst document = await client.documents.create({\n  name: 'Product FAQ',\n  content: `# Product FAQ\n\n## What is your return policy?\nWe offer a 30-day return policy for all unused items in original packaging.\n\n## How do I track my order?\nLog in to your account and visit the Orders page. You'll find tracking information for all shipped orders.\n\n## Do you offer international shipping?\nYes, we ship to over 50 countries. Shipping costs and delivery times vary by destination.`,\n});\n\nconsole.log('Document created:', document.id);\n","javascript","",[306],{"type":46,"tag":71,"props":307,"children":308},{"__ignoreMap":304},[309,354,364,404,412,467,500,523,531,540,549,557,566,575,583,591,609,627,635],{"type":46,"tag":310,"props":311,"children":314},"span",{"class":312,"line":313},"line",1,[315,321,327,332,338,344,349],{"type":46,"tag":310,"props":316,"children":318},{"style":317},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[319],{"type":52,"value":320},"import",{"type":46,"tag":310,"props":322,"children":324},{"style":323},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[325],{"type":52,"value":326}," RunwayML ",{"type":46,"tag":310,"props":328,"children":329},{"style":317},[330],{"type":52,"value":331},"from",{"type":46,"tag":310,"props":333,"children":335},{"style":334},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[336],{"type":52,"value":337}," '",{"type":46,"tag":310,"props":339,"children":341},{"style":340},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[342],{"type":52,"value":343},"@runwayml\u002Fsdk",{"type":46,"tag":310,"props":345,"children":346},{"style":334},[347],{"type":52,"value":348},"'",{"type":46,"tag":310,"props":350,"children":351},{"style":334},[352],{"type":52,"value":353},";\n",{"type":46,"tag":310,"props":355,"children":357},{"class":312,"line":356},2,[358],{"type":46,"tag":310,"props":359,"children":361},{"emptyLinePlaceholder":360},true,[362],{"type":52,"value":363},"\n",{"type":46,"tag":310,"props":365,"children":367},{"class":312,"line":366},3,[368,374,379,384,389,395,400],{"type":46,"tag":310,"props":369,"children":371},{"style":370},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[372],{"type":52,"value":373},"const",{"type":46,"tag":310,"props":375,"children":376},{"style":323},[377],{"type":52,"value":378}," client ",{"type":46,"tag":310,"props":380,"children":381},{"style":334},[382],{"type":52,"value":383},"=",{"type":46,"tag":310,"props":385,"children":386},{"style":334},[387],{"type":52,"value":388}," new",{"type":46,"tag":310,"props":390,"children":392},{"style":391},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[393],{"type":52,"value":394}," RunwayML",{"type":46,"tag":310,"props":396,"children":397},{"style":323},[398],{"type":52,"value":399},"()",{"type":46,"tag":310,"props":401,"children":402},{"style":334},[403],{"type":52,"value":353},{"type":46,"tag":310,"props":405,"children":407},{"class":312,"line":406},4,[408],{"type":46,"tag":310,"props":409,"children":410},{"emptyLinePlaceholder":360},[411],{"type":52,"value":363},{"type":46,"tag":310,"props":413,"children":415},{"class":312,"line":414},5,[416,420,425,429,434,439,444,448,452,457,462],{"type":46,"tag":310,"props":417,"children":418},{"style":370},[419],{"type":52,"value":373},{"type":46,"tag":310,"props":421,"children":422},{"style":323},[423],{"type":52,"value":424}," document ",{"type":46,"tag":310,"props":426,"children":427},{"style":334},[428],{"type":52,"value":383},{"type":46,"tag":310,"props":430,"children":431},{"style":317},[432],{"type":52,"value":433}," await",{"type":46,"tag":310,"props":435,"children":436},{"style":323},[437],{"type":52,"value":438}," client",{"type":46,"tag":310,"props":440,"children":441},{"style":334},[442],{"type":52,"value":443},".",{"type":46,"tag":310,"props":445,"children":446},{"style":323},[447],{"type":52,"value":23},{"type":46,"tag":310,"props":449,"children":450},{"style":334},[451],{"type":52,"value":443},{"type":46,"tag":310,"props":453,"children":454},{"style":391},[455],{"type":52,"value":456},"create",{"type":46,"tag":310,"props":458,"children":459},{"style":323},[460],{"type":52,"value":461},"(",{"type":46,"tag":310,"props":463,"children":464},{"style":334},[465],{"type":52,"value":466},"{\n",{"type":46,"tag":310,"props":468,"children":470},{"class":312,"line":469},6,[471,477,482,486,491,495],{"type":46,"tag":310,"props":472,"children":474},{"style":473},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[475],{"type":52,"value":476},"  name",{"type":46,"tag":310,"props":478,"children":479},{"style":334},[480],{"type":52,"value":481},":",{"type":46,"tag":310,"props":483,"children":484},{"style":334},[485],{"type":52,"value":337},{"type":46,"tag":310,"props":487,"children":488},{"style":340},[489],{"type":52,"value":490},"Product FAQ",{"type":46,"tag":310,"props":492,"children":493},{"style":334},[494],{"type":52,"value":348},{"type":46,"tag":310,"props":496,"children":497},{"style":334},[498],{"type":52,"value":499},",\n",{"type":46,"tag":310,"props":501,"children":503},{"class":312,"line":502},7,[504,509,513,518],{"type":46,"tag":310,"props":505,"children":506},{"style":473},[507],{"type":52,"value":508},"  content",{"type":46,"tag":310,"props":510,"children":511},{"style":334},[512],{"type":52,"value":481},{"type":46,"tag":310,"props":514,"children":515},{"style":334},[516],{"type":52,"value":517}," `",{"type":46,"tag":310,"props":519,"children":520},{"style":340},[521],{"type":52,"value":522},"# Product FAQ\n",{"type":46,"tag":310,"props":524,"children":526},{"class":312,"line":525},8,[527],{"type":46,"tag":310,"props":528,"children":529},{"emptyLinePlaceholder":360},[530],{"type":52,"value":363},{"type":46,"tag":310,"props":532,"children":534},{"class":312,"line":533},9,[535],{"type":46,"tag":310,"props":536,"children":537},{"style":340},[538],{"type":52,"value":539},"## What is your return policy?\n",{"type":46,"tag":310,"props":541,"children":543},{"class":312,"line":542},10,[544],{"type":46,"tag":310,"props":545,"children":546},{"style":340},[547],{"type":52,"value":548},"We offer a 30-day return policy for all unused items in original packaging.\n",{"type":46,"tag":310,"props":550,"children":552},{"class":312,"line":551},11,[553],{"type":46,"tag":310,"props":554,"children":555},{"emptyLinePlaceholder":360},[556],{"type":52,"value":363},{"type":46,"tag":310,"props":558,"children":560},{"class":312,"line":559},12,[561],{"type":46,"tag":310,"props":562,"children":563},{"style":340},[564],{"type":52,"value":565},"## How do I track my order?\n",{"type":46,"tag":310,"props":567,"children":569},{"class":312,"line":568},13,[570],{"type":46,"tag":310,"props":571,"children":572},{"style":340},[573],{"type":52,"value":574},"Log in to your account and visit the Orders page. You'll find tracking information for all shipped orders.\n",{"type":46,"tag":310,"props":576,"children":578},{"class":312,"line":577},14,[579],{"type":46,"tag":310,"props":580,"children":581},{"emptyLinePlaceholder":360},[582],{"type":52,"value":363},{"type":46,"tag":310,"props":584,"children":585},{"class":312,"line":31},[586],{"type":46,"tag":310,"props":587,"children":588},{"style":340},[589],{"type":52,"value":590},"## Do you offer international shipping?\n",{"type":46,"tag":310,"props":592,"children":594},{"class":312,"line":593},16,[595,600,605],{"type":46,"tag":310,"props":596,"children":597},{"style":340},[598],{"type":52,"value":599},"Yes, we ship to over 50 countries. Shipping costs and delivery times vary by destination.",{"type":46,"tag":310,"props":601,"children":602},{"style":334},[603],{"type":52,"value":604},"`",{"type":46,"tag":310,"props":606,"children":607},{"style":334},[608],{"type":52,"value":499},{"type":46,"tag":310,"props":610,"children":612},{"class":312,"line":611},17,[613,618,623],{"type":46,"tag":310,"props":614,"children":615},{"style":334},[616],{"type":52,"value":617},"}",{"type":46,"tag":310,"props":619,"children":620},{"style":323},[621],{"type":52,"value":622},")",{"type":46,"tag":310,"props":624,"children":625},{"style":334},[626],{"type":52,"value":353},{"type":46,"tag":310,"props":628,"children":630},{"class":312,"line":629},18,[631],{"type":46,"tag":310,"props":632,"children":633},{"emptyLinePlaceholder":360},[634],{"type":52,"value":363},{"type":46,"tag":310,"props":636,"children":638},{"class":312,"line":637},19,[639,644,648,653,657,661,666,670,675,680,684,689],{"type":46,"tag":310,"props":640,"children":641},{"style":323},[642],{"type":52,"value":643},"console",{"type":46,"tag":310,"props":645,"children":646},{"style":334},[647],{"type":52,"value":443},{"type":46,"tag":310,"props":649,"children":650},{"style":391},[651],{"type":52,"value":652},"log",{"type":46,"tag":310,"props":654,"children":655},{"style":323},[656],{"type":52,"value":461},{"type":46,"tag":310,"props":658,"children":659},{"style":334},[660],{"type":52,"value":348},{"type":46,"tag":310,"props":662,"children":663},{"style":340},[664],{"type":52,"value":665},"Document created:",{"type":46,"tag":310,"props":667,"children":668},{"style":334},[669],{"type":52,"value":348},{"type":46,"tag":310,"props":671,"children":672},{"style":334},[673],{"type":52,"value":674},",",{"type":46,"tag":310,"props":676,"children":677},{"style":323},[678],{"type":52,"value":679}," document",{"type":46,"tag":310,"props":681,"children":682},{"style":334},[683],{"type":52,"value":443},{"type":46,"tag":310,"props":685,"children":686},{"style":323},[687],{"type":52,"value":688},"id)",{"type":46,"tag":310,"props":690,"children":691},{"style":334},[692],{"type":52,"value":353},{"type":46,"tag":292,"props":694,"children":696},{"id":695},"python",[697],{"type":52,"value":698},"Python",{"type":46,"tag":299,"props":700,"children":703},{"className":701,"code":702,"language":695,"meta":304,"style":304},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from runwayml import RunwayML\n\nclient = RunwayML()\n\ndocument = client.documents.create(\n    name='Product FAQ',\n    content=\"\"\"# Product FAQ\n\n## What is your return policy?\nWe offer a 30-day return policy for all unused items in original packaging.\n\n## How do I track my order?\nLog in to your account and visit the Orders page.\n\n## Do you offer international shipping?\nYes, we ship to over 50 countries.\"\"\",\n)\n\nprint('Document created:', document.id)\n",[704],{"type":46,"tag":71,"props":705,"children":706},{"__ignoreMap":304},[707,715,722,730,737,745,753,761,768,775,782,789,796,804,811,818,826,834,841],{"type":46,"tag":310,"props":708,"children":709},{"class":312,"line":313},[710],{"type":46,"tag":310,"props":711,"children":712},{},[713],{"type":52,"value":714},"from runwayml import RunwayML\n",{"type":46,"tag":310,"props":716,"children":717},{"class":312,"line":356},[718],{"type":46,"tag":310,"props":719,"children":720},{"emptyLinePlaceholder":360},[721],{"type":52,"value":363},{"type":46,"tag":310,"props":723,"children":724},{"class":312,"line":366},[725],{"type":46,"tag":310,"props":726,"children":727},{},[728],{"type":52,"value":729},"client = RunwayML()\n",{"type":46,"tag":310,"props":731,"children":732},{"class":312,"line":406},[733],{"type":46,"tag":310,"props":734,"children":735},{"emptyLinePlaceholder":360},[736],{"type":52,"value":363},{"type":46,"tag":310,"props":738,"children":739},{"class":312,"line":414},[740],{"type":46,"tag":310,"props":741,"children":742},{},[743],{"type":52,"value":744},"document = client.documents.create(\n",{"type":46,"tag":310,"props":746,"children":747},{"class":312,"line":469},[748],{"type":46,"tag":310,"props":749,"children":750},{},[751],{"type":52,"value":752},"    name='Product FAQ',\n",{"type":46,"tag":310,"props":754,"children":755},{"class":312,"line":502},[756],{"type":46,"tag":310,"props":757,"children":758},{},[759],{"type":52,"value":760},"    content=\"\"\"# Product FAQ\n",{"type":46,"tag":310,"props":762,"children":763},{"class":312,"line":525},[764],{"type":46,"tag":310,"props":765,"children":766},{"emptyLinePlaceholder":360},[767],{"type":52,"value":363},{"type":46,"tag":310,"props":769,"children":770},{"class":312,"line":533},[771],{"type":46,"tag":310,"props":772,"children":773},{},[774],{"type":52,"value":539},{"type":46,"tag":310,"props":776,"children":777},{"class":312,"line":542},[778],{"type":46,"tag":310,"props":779,"children":780},{},[781],{"type":52,"value":548},{"type":46,"tag":310,"props":783,"children":784},{"class":312,"line":551},[785],{"type":46,"tag":310,"props":786,"children":787},{"emptyLinePlaceholder":360},[788],{"type":52,"value":363},{"type":46,"tag":310,"props":790,"children":791},{"class":312,"line":559},[792],{"type":46,"tag":310,"props":793,"children":794},{},[795],{"type":52,"value":565},{"type":46,"tag":310,"props":797,"children":798},{"class":312,"line":568},[799],{"type":46,"tag":310,"props":800,"children":801},{},[802],{"type":52,"value":803},"Log in to your account and visit the Orders page.\n",{"type":46,"tag":310,"props":805,"children":806},{"class":312,"line":577},[807],{"type":46,"tag":310,"props":808,"children":809},{"emptyLinePlaceholder":360},[810],{"type":52,"value":363},{"type":46,"tag":310,"props":812,"children":813},{"class":312,"line":31},[814],{"type":46,"tag":310,"props":815,"children":816},{},[817],{"type":52,"value":590},{"type":46,"tag":310,"props":819,"children":820},{"class":312,"line":593},[821],{"type":46,"tag":310,"props":822,"children":823},{},[824],{"type":52,"value":825},"Yes, we ship to over 50 countries.\"\"\",\n",{"type":46,"tag":310,"props":827,"children":828},{"class":312,"line":611},[829],{"type":46,"tag":310,"props":830,"children":831},{},[832],{"type":52,"value":833},")\n",{"type":46,"tag":310,"props":835,"children":836},{"class":312,"line":629},[837],{"type":46,"tag":310,"props":838,"children":839},{"emptyLinePlaceholder":360},[840],{"type":52,"value":363},{"type":46,"tag":310,"props":842,"children":843},{"class":312,"line":637},[844],{"type":46,"tag":310,"props":845,"children":846},{},[847],{"type":52,"value":848},"print('Document created:', document.id)\n",{"type":46,"tag":119,"props":850,"children":852},{"id":851},"step-2-link-the-document-to-an-avatar",[853],{"type":52,"value":854},"Step 2: Link the Document to an Avatar",{"type":46,"tag":59,"props":856,"children":857},{},[858,860,865],{"type":52,"value":859},"Update your Avatar to attach the document. ",{"type":46,"tag":63,"props":861,"children":862},{},[863],{"type":52,"value":864},"This replaces any existing document attachments",{"type":52,"value":866}," — pass all document IDs you want linked.",{"type":46,"tag":292,"props":868,"children":870},{"id":869},"nodejs-1",[871],{"type":52,"value":297},{"type":46,"tag":299,"props":873,"children":875},{"className":301,"code":874,"language":303,"meta":304,"style":304},"await client.avatars.update(avatarId, {\n  documentIds: [document.id],\n});\n",[876],{"type":46,"tag":71,"props":877,"children":878},{"__ignoreMap":304},[879,923,953],{"type":46,"tag":310,"props":880,"children":881},{"class":312,"line":313},[882,887,891,895,900,904,909,914,918],{"type":46,"tag":310,"props":883,"children":884},{"style":317},[885],{"type":52,"value":886},"await",{"type":46,"tag":310,"props":888,"children":889},{"style":323},[890],{"type":52,"value":438},{"type":46,"tag":310,"props":892,"children":893},{"style":334},[894],{"type":52,"value":443},{"type":46,"tag":310,"props":896,"children":897},{"style":323},[898],{"type":52,"value":899},"avatars",{"type":46,"tag":310,"props":901,"children":902},{"style":334},[903],{"type":52,"value":443},{"type":46,"tag":310,"props":905,"children":906},{"style":391},[907],{"type":52,"value":908},"update",{"type":46,"tag":310,"props":910,"children":911},{"style":323},[912],{"type":52,"value":913},"(avatarId",{"type":46,"tag":310,"props":915,"children":916},{"style":334},[917],{"type":52,"value":674},{"type":46,"tag":310,"props":919,"children":920},{"style":334},[921],{"type":52,"value":922}," {\n",{"type":46,"tag":310,"props":924,"children":925},{"class":312,"line":356},[926,931,935,940,944,949],{"type":46,"tag":310,"props":927,"children":928},{"style":473},[929],{"type":52,"value":930},"  documentIds",{"type":46,"tag":310,"props":932,"children":933},{"style":334},[934],{"type":52,"value":481},{"type":46,"tag":310,"props":936,"children":937},{"style":323},[938],{"type":52,"value":939}," [document",{"type":46,"tag":310,"props":941,"children":942},{"style":334},[943],{"type":52,"value":443},{"type":46,"tag":310,"props":945,"children":946},{"style":323},[947],{"type":52,"value":948},"id]",{"type":46,"tag":310,"props":950,"children":951},{"style":334},[952],{"type":52,"value":499},{"type":46,"tag":310,"props":954,"children":955},{"class":312,"line":366},[956,960,964],{"type":46,"tag":310,"props":957,"children":958},{"style":334},[959],{"type":52,"value":617},{"type":46,"tag":310,"props":961,"children":962},{"style":323},[963],{"type":52,"value":622},{"type":46,"tag":310,"props":965,"children":966},{"style":334},[967],{"type":52,"value":353},{"type":46,"tag":292,"props":969,"children":971},{"id":970},"python-1",[972],{"type":52,"value":698},{"type":46,"tag":299,"props":974,"children":976},{"className":701,"code":975,"language":695,"meta":304,"style":304},"client.avatars.update(\n    avatar_id,\n    document_ids=[document.id],\n)\n",[977],{"type":46,"tag":71,"props":978,"children":979},{"__ignoreMap":304},[980,988,996,1004],{"type":46,"tag":310,"props":981,"children":982},{"class":312,"line":313},[983],{"type":46,"tag":310,"props":984,"children":985},{},[986],{"type":52,"value":987},"client.avatars.update(\n",{"type":46,"tag":310,"props":989,"children":990},{"class":312,"line":356},[991],{"type":46,"tag":310,"props":992,"children":993},{},[994],{"type":52,"value":995},"    avatar_id,\n",{"type":46,"tag":310,"props":997,"children":998},{"class":312,"line":366},[999],{"type":46,"tag":310,"props":1000,"children":1001},{},[1002],{"type":52,"value":1003},"    document_ids=[document.id],\n",{"type":46,"tag":310,"props":1005,"children":1006},{"class":312,"line":406},[1007],{"type":46,"tag":310,"props":1008,"children":1009},{},[1010],{"type":52,"value":833},{"type":46,"tag":292,"props":1012,"children":1014},{"id":1013},"multiple-documents",[1015],{"type":52,"value":1016},"Multiple Documents",{"type":46,"tag":59,"props":1018,"children":1019},{},[1020],{"type":52,"value":1021},"You can link multiple documents to a single avatar (total must stay under 50,000 tokens):",{"type":46,"tag":299,"props":1023,"children":1025},{"className":301,"code":1024,"language":303,"meta":304,"style":304},"const faq = await client.documents.create({\n  name: 'FAQ',\n  content: '...',\n});\n\nconst policies = await client.documents.create({\n  name: 'Company Policies',\n  content: '...',\n});\n\nawait client.avatars.update(avatarId, {\n  documentIds: [faq.id, policies.id],\n});\n",[1026],{"type":46,"tag":71,"props":1027,"children":1028},{"__ignoreMap":304},[1029,1077,1105,1133,1148,1155,1203,1231,1258,1273,1280,1319,1365],{"type":46,"tag":310,"props":1030,"children":1031},{"class":312,"line":313},[1032,1036,1041,1045,1049,1053,1057,1061,1065,1069,1073],{"type":46,"tag":310,"props":1033,"children":1034},{"style":370},[1035],{"type":52,"value":373},{"type":46,"tag":310,"props":1037,"children":1038},{"style":323},[1039],{"type":52,"value":1040}," faq ",{"type":46,"tag":310,"props":1042,"children":1043},{"style":334},[1044],{"type":52,"value":383},{"type":46,"tag":310,"props":1046,"children":1047},{"style":317},[1048],{"type":52,"value":433},{"type":46,"tag":310,"props":1050,"children":1051},{"style":323},[1052],{"type":52,"value":438},{"type":46,"tag":310,"props":1054,"children":1055},{"style":334},[1056],{"type":52,"value":443},{"type":46,"tag":310,"props":1058,"children":1059},{"style":323},[1060],{"type":52,"value":23},{"type":46,"tag":310,"props":1062,"children":1063},{"style":334},[1064],{"type":52,"value":443},{"type":46,"tag":310,"props":1066,"children":1067},{"style":391},[1068],{"type":52,"value":456},{"type":46,"tag":310,"props":1070,"children":1071},{"style":323},[1072],{"type":52,"value":461},{"type":46,"tag":310,"props":1074,"children":1075},{"style":334},[1076],{"type":52,"value":466},{"type":46,"tag":310,"props":1078,"children":1079},{"class":312,"line":356},[1080,1084,1088,1092,1097,1101],{"type":46,"tag":310,"props":1081,"children":1082},{"style":473},[1083],{"type":52,"value":476},{"type":46,"tag":310,"props":1085,"children":1086},{"style":334},[1087],{"type":52,"value":481},{"type":46,"tag":310,"props":1089,"children":1090},{"style":334},[1091],{"type":52,"value":337},{"type":46,"tag":310,"props":1093,"children":1094},{"style":340},[1095],{"type":52,"value":1096},"FAQ",{"type":46,"tag":310,"props":1098,"children":1099},{"style":334},[1100],{"type":52,"value":348},{"type":46,"tag":310,"props":1102,"children":1103},{"style":334},[1104],{"type":52,"value":499},{"type":46,"tag":310,"props":1106,"children":1107},{"class":312,"line":366},[1108,1112,1116,1120,1125,1129],{"type":46,"tag":310,"props":1109,"children":1110},{"style":473},[1111],{"type":52,"value":508},{"type":46,"tag":310,"props":1113,"children":1114},{"style":334},[1115],{"type":52,"value":481},{"type":46,"tag":310,"props":1117,"children":1118},{"style":334},[1119],{"type":52,"value":337},{"type":46,"tag":310,"props":1121,"children":1122},{"style":340},[1123],{"type":52,"value":1124},"...",{"type":46,"tag":310,"props":1126,"children":1127},{"style":334},[1128],{"type":52,"value":348},{"type":46,"tag":310,"props":1130,"children":1131},{"style":334},[1132],{"type":52,"value":499},{"type":46,"tag":310,"props":1134,"children":1135},{"class":312,"line":406},[1136,1140,1144],{"type":46,"tag":310,"props":1137,"children":1138},{"style":334},[1139],{"type":52,"value":617},{"type":46,"tag":310,"props":1141,"children":1142},{"style":323},[1143],{"type":52,"value":622},{"type":46,"tag":310,"props":1145,"children":1146},{"style":334},[1147],{"type":52,"value":353},{"type":46,"tag":310,"props":1149,"children":1150},{"class":312,"line":414},[1151],{"type":46,"tag":310,"props":1152,"children":1153},{"emptyLinePlaceholder":360},[1154],{"type":52,"value":363},{"type":46,"tag":310,"props":1156,"children":1157},{"class":312,"line":469},[1158,1162,1167,1171,1175,1179,1183,1187,1191,1195,1199],{"type":46,"tag":310,"props":1159,"children":1160},{"style":370},[1161],{"type":52,"value":373},{"type":46,"tag":310,"props":1163,"children":1164},{"style":323},[1165],{"type":52,"value":1166}," policies ",{"type":46,"tag":310,"props":1168,"children":1169},{"style":334},[1170],{"type":52,"value":383},{"type":46,"tag":310,"props":1172,"children":1173},{"style":317},[1174],{"type":52,"value":433},{"type":46,"tag":310,"props":1176,"children":1177},{"style":323},[1178],{"type":52,"value":438},{"type":46,"tag":310,"props":1180,"children":1181},{"style":334},[1182],{"type":52,"value":443},{"type":46,"tag":310,"props":1184,"children":1185},{"style":323},[1186],{"type":52,"value":23},{"type":46,"tag":310,"props":1188,"children":1189},{"style":334},[1190],{"type":52,"value":443},{"type":46,"tag":310,"props":1192,"children":1193},{"style":391},[1194],{"type":52,"value":456},{"type":46,"tag":310,"props":1196,"children":1197},{"style":323},[1198],{"type":52,"value":461},{"type":46,"tag":310,"props":1200,"children":1201},{"style":334},[1202],{"type":52,"value":466},{"type":46,"tag":310,"props":1204,"children":1205},{"class":312,"line":502},[1206,1210,1214,1218,1223,1227],{"type":46,"tag":310,"props":1207,"children":1208},{"style":473},[1209],{"type":52,"value":476},{"type":46,"tag":310,"props":1211,"children":1212},{"style":334},[1213],{"type":52,"value":481},{"type":46,"tag":310,"props":1215,"children":1216},{"style":334},[1217],{"type":52,"value":337},{"type":46,"tag":310,"props":1219,"children":1220},{"style":340},[1221],{"type":52,"value":1222},"Company Policies",{"type":46,"tag":310,"props":1224,"children":1225},{"style":334},[1226],{"type":52,"value":348},{"type":46,"tag":310,"props":1228,"children":1229},{"style":334},[1230],{"type":52,"value":499},{"type":46,"tag":310,"props":1232,"children":1233},{"class":312,"line":525},[1234,1238,1242,1246,1250,1254],{"type":46,"tag":310,"props":1235,"children":1236},{"style":473},[1237],{"type":52,"value":508},{"type":46,"tag":310,"props":1239,"children":1240},{"style":334},[1241],{"type":52,"value":481},{"type":46,"tag":310,"props":1243,"children":1244},{"style":334},[1245],{"type":52,"value":337},{"type":46,"tag":310,"props":1247,"children":1248},{"style":340},[1249],{"type":52,"value":1124},{"type":46,"tag":310,"props":1251,"children":1252},{"style":334},[1253],{"type":52,"value":348},{"type":46,"tag":310,"props":1255,"children":1256},{"style":334},[1257],{"type":52,"value":499},{"type":46,"tag":310,"props":1259,"children":1260},{"class":312,"line":533},[1261,1265,1269],{"type":46,"tag":310,"props":1262,"children":1263},{"style":334},[1264],{"type":52,"value":617},{"type":46,"tag":310,"props":1266,"children":1267},{"style":323},[1268],{"type":52,"value":622},{"type":46,"tag":310,"props":1270,"children":1271},{"style":334},[1272],{"type":52,"value":353},{"type":46,"tag":310,"props":1274,"children":1275},{"class":312,"line":542},[1276],{"type":46,"tag":310,"props":1277,"children":1278},{"emptyLinePlaceholder":360},[1279],{"type":52,"value":363},{"type":46,"tag":310,"props":1281,"children":1282},{"class":312,"line":551},[1283,1287,1291,1295,1299,1303,1307,1311,1315],{"type":46,"tag":310,"props":1284,"children":1285},{"style":317},[1286],{"type":52,"value":886},{"type":46,"tag":310,"props":1288,"children":1289},{"style":323},[1290],{"type":52,"value":438},{"type":46,"tag":310,"props":1292,"children":1293},{"style":334},[1294],{"type":52,"value":443},{"type":46,"tag":310,"props":1296,"children":1297},{"style":323},[1298],{"type":52,"value":899},{"type":46,"tag":310,"props":1300,"children":1301},{"style":334},[1302],{"type":52,"value":443},{"type":46,"tag":310,"props":1304,"children":1305},{"style":391},[1306],{"type":52,"value":908},{"type":46,"tag":310,"props":1308,"children":1309},{"style":323},[1310],{"type":52,"value":913},{"type":46,"tag":310,"props":1312,"children":1313},{"style":334},[1314],{"type":52,"value":674},{"type":46,"tag":310,"props":1316,"children":1317},{"style":334},[1318],{"type":52,"value":922},{"type":46,"tag":310,"props":1320,"children":1321},{"class":312,"line":559},[1322,1326,1330,1335,1339,1344,1348,1353,1357,1361],{"type":46,"tag":310,"props":1323,"children":1324},{"style":473},[1325],{"type":52,"value":930},{"type":46,"tag":310,"props":1327,"children":1328},{"style":334},[1329],{"type":52,"value":481},{"type":46,"tag":310,"props":1331,"children":1332},{"style":323},[1333],{"type":52,"value":1334}," [faq",{"type":46,"tag":310,"props":1336,"children":1337},{"style":334},[1338],{"type":52,"value":443},{"type":46,"tag":310,"props":1340,"children":1341},{"style":323},[1342],{"type":52,"value":1343},"id",{"type":46,"tag":310,"props":1345,"children":1346},{"style":334},[1347],{"type":52,"value":674},{"type":46,"tag":310,"props":1349,"children":1350},{"style":323},[1351],{"type":52,"value":1352}," policies",{"type":46,"tag":310,"props":1354,"children":1355},{"style":334},[1356],{"type":52,"value":443},{"type":46,"tag":310,"props":1358,"children":1359},{"style":323},[1360],{"type":52,"value":948},{"type":46,"tag":310,"props":1362,"children":1363},{"style":334},[1364],{"type":52,"value":499},{"type":46,"tag":310,"props":1366,"children":1367},{"class":312,"line":568},[1368,1372,1376],{"type":46,"tag":310,"props":1369,"children":1370},{"style":334},[1371],{"type":52,"value":617},{"type":46,"tag":310,"props":1373,"children":1374},{"style":323},[1375],{"type":52,"value":622},{"type":46,"tag":310,"props":1377,"children":1378},{"style":334},[1379],{"type":52,"value":353},{"type":46,"tag":119,"props":1381,"children":1383},{"id":1382},"step-3-start-a-session",[1384],{"type":52,"value":1385},"Step 3: Start a Session",{"type":46,"tag":59,"props":1387,"children":1388},{},[1389],{"type":52,"value":1390},"Once documents are linked, the Avatar automatically has access to the knowledge during conversations. Start a session as usual — no additional configuration needed:",{"type":46,"tag":299,"props":1392,"children":1394},{"className":301,"code":1393,"language":303,"meta":304,"style":304},"const session = await client.realtimeSessions.create({\n  model: 'gwm1_avatars',\n  avatar: {\n    type: 'custom',\n    avatarId: avatarId,\n  },\n});\n",[1395],{"type":46,"tag":71,"props":1396,"children":1397},{"__ignoreMap":304},[1398,1447,1476,1492,1521,1542,1550],{"type":46,"tag":310,"props":1399,"children":1400},{"class":312,"line":313},[1401,1405,1410,1414,1418,1422,1426,1431,1435,1439,1443],{"type":46,"tag":310,"props":1402,"children":1403},{"style":370},[1404],{"type":52,"value":373},{"type":46,"tag":310,"props":1406,"children":1407},{"style":323},[1408],{"type":52,"value":1409}," session ",{"type":46,"tag":310,"props":1411,"children":1412},{"style":334},[1413],{"type":52,"value":383},{"type":46,"tag":310,"props":1415,"children":1416},{"style":317},[1417],{"type":52,"value":433},{"type":46,"tag":310,"props":1419,"children":1420},{"style":323},[1421],{"type":52,"value":438},{"type":46,"tag":310,"props":1423,"children":1424},{"style":334},[1425],{"type":52,"value":443},{"type":46,"tag":310,"props":1427,"children":1428},{"style":323},[1429],{"type":52,"value":1430},"realtimeSessions",{"type":46,"tag":310,"props":1432,"children":1433},{"style":334},[1434],{"type":52,"value":443},{"type":46,"tag":310,"props":1436,"children":1437},{"style":391},[1438],{"type":52,"value":456},{"type":46,"tag":310,"props":1440,"children":1441},{"style":323},[1442],{"type":52,"value":461},{"type":46,"tag":310,"props":1444,"children":1445},{"style":334},[1446],{"type":52,"value":466},{"type":46,"tag":310,"props":1448,"children":1449},{"class":312,"line":356},[1450,1455,1459,1463,1468,1472],{"type":46,"tag":310,"props":1451,"children":1452},{"style":473},[1453],{"type":52,"value":1454},"  model",{"type":46,"tag":310,"props":1456,"children":1457},{"style":334},[1458],{"type":52,"value":481},{"type":46,"tag":310,"props":1460,"children":1461},{"style":334},[1462],{"type":52,"value":337},{"type":46,"tag":310,"props":1464,"children":1465},{"style":340},[1466],{"type":52,"value":1467},"gwm1_avatars",{"type":46,"tag":310,"props":1469,"children":1470},{"style":334},[1471],{"type":52,"value":348},{"type":46,"tag":310,"props":1473,"children":1474},{"style":334},[1475],{"type":52,"value":499},{"type":46,"tag":310,"props":1477,"children":1478},{"class":312,"line":366},[1479,1484,1488],{"type":46,"tag":310,"props":1480,"children":1481},{"style":473},[1482],{"type":52,"value":1483},"  avatar",{"type":46,"tag":310,"props":1485,"children":1486},{"style":334},[1487],{"type":52,"value":481},{"type":46,"tag":310,"props":1489,"children":1490},{"style":334},[1491],{"type":52,"value":922},{"type":46,"tag":310,"props":1493,"children":1494},{"class":312,"line":406},[1495,1500,1504,1508,1513,1517],{"type":46,"tag":310,"props":1496,"children":1497},{"style":473},[1498],{"type":52,"value":1499},"    type",{"type":46,"tag":310,"props":1501,"children":1502},{"style":334},[1503],{"type":52,"value":481},{"type":46,"tag":310,"props":1505,"children":1506},{"style":334},[1507],{"type":52,"value":337},{"type":46,"tag":310,"props":1509,"children":1510},{"style":340},[1511],{"type":52,"value":1512},"custom",{"type":46,"tag":310,"props":1514,"children":1515},{"style":334},[1516],{"type":52,"value":348},{"type":46,"tag":310,"props":1518,"children":1519},{"style":334},[1520],{"type":52,"value":499},{"type":46,"tag":310,"props":1522,"children":1523},{"class":312,"line":414},[1524,1529,1533,1538],{"type":46,"tag":310,"props":1525,"children":1526},{"style":473},[1527],{"type":52,"value":1528},"    avatarId",{"type":46,"tag":310,"props":1530,"children":1531},{"style":334},[1532],{"type":52,"value":481},{"type":46,"tag":310,"props":1534,"children":1535},{"style":323},[1536],{"type":52,"value":1537}," avatarId",{"type":46,"tag":310,"props":1539,"children":1540},{"style":334},[1541],{"type":52,"value":499},{"type":46,"tag":310,"props":1543,"children":1544},{"class":312,"line":469},[1545],{"type":46,"tag":310,"props":1546,"children":1547},{"style":334},[1548],{"type":52,"value":1549},"  },\n",{"type":46,"tag":310,"props":1551,"children":1552},{"class":312,"line":502},[1553,1557,1561],{"type":46,"tag":310,"props":1554,"children":1555},{"style":334},[1556],{"type":52,"value":617},{"type":46,"tag":310,"props":1558,"children":1559},{"style":323},[1560],{"type":52,"value":622},{"type":46,"tag":310,"props":1562,"children":1563},{"style":334},[1564],{"type":52,"value":353},{"type":46,"tag":299,"props":1566,"children":1568},{"className":701,"code":1567,"language":695,"meta":304,"style":304},"session = client.realtime_sessions.create(\n    model='gwm1_avatars',\n    avatar={\n        'type': 'custom',\n        'avatar_id': avatar_id,\n    },\n)\n",[1569],{"type":46,"tag":71,"props":1570,"children":1571},{"__ignoreMap":304},[1572,1580,1588,1596,1604,1612,1620],{"type":46,"tag":310,"props":1573,"children":1574},{"class":312,"line":313},[1575],{"type":46,"tag":310,"props":1576,"children":1577},{},[1578],{"type":52,"value":1579},"session = client.realtime_sessions.create(\n",{"type":46,"tag":310,"props":1581,"children":1582},{"class":312,"line":356},[1583],{"type":46,"tag":310,"props":1584,"children":1585},{},[1586],{"type":52,"value":1587},"    model='gwm1_avatars',\n",{"type":46,"tag":310,"props":1589,"children":1590},{"class":312,"line":366},[1591],{"type":46,"tag":310,"props":1592,"children":1593},{},[1594],{"type":52,"value":1595},"    avatar={\n",{"type":46,"tag":310,"props":1597,"children":1598},{"class":312,"line":406},[1599],{"type":46,"tag":310,"props":1600,"children":1601},{},[1602],{"type":52,"value":1603},"        'type': 'custom',\n",{"type":46,"tag":310,"props":1605,"children":1606},{"class":312,"line":414},[1607],{"type":46,"tag":310,"props":1608,"children":1609},{},[1610],{"type":52,"value":1611},"        'avatar_id': avatar_id,\n",{"type":46,"tag":310,"props":1613,"children":1614},{"class":312,"line":469},[1615],{"type":46,"tag":310,"props":1616,"children":1617},{},[1618],{"type":52,"value":1619},"    },\n",{"type":46,"tag":310,"props":1621,"children":1622},{"class":312,"line":502},[1623],{"type":46,"tag":310,"props":1624,"children":1625},{},[1626],{"type":52,"value":833},{"type":46,"tag":59,"props":1628,"children":1629},{},[1630,1632,1637],{"type":52,"value":1631},"See ",{"type":46,"tag":71,"props":1633,"children":1635},{"className":1634},[],[1636],{"type":52,"value":110},{"type":52,"value":1638}," for the full session creation, polling, and WebRTC flow.",{"type":46,"tag":119,"props":1640,"children":1642},{"id":1641},"integration-patterns",[1643],{"type":52,"value":1644},"Integration Patterns",{"type":46,"tag":292,"props":1646,"children":1648},{"id":1647},"load-documents-from-files",[1649],{"type":52,"value":1650},"Load Documents from Files",{"type":46,"tag":59,"props":1652,"children":1653},{},[1654],{"type":52,"value":1655},"Read content from local files and create documents:",{"type":46,"tag":299,"props":1657,"children":1659},{"className":301,"code":1658,"language":303,"meta":304,"style":304},"import fs from 'fs';\nimport RunwayML from '@runwayml\u002Fsdk';\n\nconst client = new RunwayML();\n\n\u002F\u002F Read a local markdown file\nconst content = fs.readFileSync('.\u002Fknowledge\u002Fproduct-faq.md', 'utf-8');\n\nconst document = await client.documents.create({\n  name: 'Product FAQ',\n  content,\n});\n",[1660],{"type":46,"tag":71,"props":1661,"children":1662},{"__ignoreMap":304},[1663,1696,1727,1734,1765,1772,1781,1853,1860,1907,1934,1945],{"type":46,"tag":310,"props":1664,"children":1665},{"class":312,"line":313},[1666,1670,1675,1679,1683,1688,1692],{"type":46,"tag":310,"props":1667,"children":1668},{"style":317},[1669],{"type":52,"value":320},{"type":46,"tag":310,"props":1671,"children":1672},{"style":323},[1673],{"type":52,"value":1674}," fs ",{"type":46,"tag":310,"props":1676,"children":1677},{"style":317},[1678],{"type":52,"value":331},{"type":46,"tag":310,"props":1680,"children":1681},{"style":334},[1682],{"type":52,"value":337},{"type":46,"tag":310,"props":1684,"children":1685},{"style":340},[1686],{"type":52,"value":1687},"fs",{"type":46,"tag":310,"props":1689,"children":1690},{"style":334},[1691],{"type":52,"value":348},{"type":46,"tag":310,"props":1693,"children":1694},{"style":334},[1695],{"type":52,"value":353},{"type":46,"tag":310,"props":1697,"children":1698},{"class":312,"line":356},[1699,1703,1707,1711,1715,1719,1723],{"type":46,"tag":310,"props":1700,"children":1701},{"style":317},[1702],{"type":52,"value":320},{"type":46,"tag":310,"props":1704,"children":1705},{"style":323},[1706],{"type":52,"value":326},{"type":46,"tag":310,"props":1708,"children":1709},{"style":317},[1710],{"type":52,"value":331},{"type":46,"tag":310,"props":1712,"children":1713},{"style":334},[1714],{"type":52,"value":337},{"type":46,"tag":310,"props":1716,"children":1717},{"style":340},[1718],{"type":52,"value":343},{"type":46,"tag":310,"props":1720,"children":1721},{"style":334},[1722],{"type":52,"value":348},{"type":46,"tag":310,"props":1724,"children":1725},{"style":334},[1726],{"type":52,"value":353},{"type":46,"tag":310,"props":1728,"children":1729},{"class":312,"line":366},[1730],{"type":46,"tag":310,"props":1731,"children":1732},{"emptyLinePlaceholder":360},[1733],{"type":52,"value":363},{"type":46,"tag":310,"props":1735,"children":1736},{"class":312,"line":406},[1737,1741,1745,1749,1753,1757,1761],{"type":46,"tag":310,"props":1738,"children":1739},{"style":370},[1740],{"type":52,"value":373},{"type":46,"tag":310,"props":1742,"children":1743},{"style":323},[1744],{"type":52,"value":378},{"type":46,"tag":310,"props":1746,"children":1747},{"style":334},[1748],{"type":52,"value":383},{"type":46,"tag":310,"props":1750,"children":1751},{"style":334},[1752],{"type":52,"value":388},{"type":46,"tag":310,"props":1754,"children":1755},{"style":391},[1756],{"type":52,"value":394},{"type":46,"tag":310,"props":1758,"children":1759},{"style":323},[1760],{"type":52,"value":399},{"type":46,"tag":310,"props":1762,"children":1763},{"style":334},[1764],{"type":52,"value":353},{"type":46,"tag":310,"props":1766,"children":1767},{"class":312,"line":414},[1768],{"type":46,"tag":310,"props":1769,"children":1770},{"emptyLinePlaceholder":360},[1771],{"type":52,"value":363},{"type":46,"tag":310,"props":1773,"children":1774},{"class":312,"line":469},[1775],{"type":46,"tag":310,"props":1776,"children":1778},{"style":1777},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1779],{"type":52,"value":1780},"\u002F\u002F Read a local markdown file\n",{"type":46,"tag":310,"props":1782,"children":1783},{"class":312,"line":502},[1784,1788,1793,1797,1802,1806,1811,1815,1819,1824,1828,1832,1836,1841,1845,1849],{"type":46,"tag":310,"props":1785,"children":1786},{"style":370},[1787],{"type":52,"value":373},{"type":46,"tag":310,"props":1789,"children":1790},{"style":323},[1791],{"type":52,"value":1792}," content ",{"type":46,"tag":310,"props":1794,"children":1795},{"style":334},[1796],{"type":52,"value":383},{"type":46,"tag":310,"props":1798,"children":1799},{"style":323},[1800],{"type":52,"value":1801}," fs",{"type":46,"tag":310,"props":1803,"children":1804},{"style":334},[1805],{"type":52,"value":443},{"type":46,"tag":310,"props":1807,"children":1808},{"style":391},[1809],{"type":52,"value":1810},"readFileSync",{"type":46,"tag":310,"props":1812,"children":1813},{"style":323},[1814],{"type":52,"value":461},{"type":46,"tag":310,"props":1816,"children":1817},{"style":334},[1818],{"type":52,"value":348},{"type":46,"tag":310,"props":1820,"children":1821},{"style":340},[1822],{"type":52,"value":1823},".\u002Fknowledge\u002Fproduct-faq.md",{"type":46,"tag":310,"props":1825,"children":1826},{"style":334},[1827],{"type":52,"value":348},{"type":46,"tag":310,"props":1829,"children":1830},{"style":334},[1831],{"type":52,"value":674},{"type":46,"tag":310,"props":1833,"children":1834},{"style":334},[1835],{"type":52,"value":337},{"type":46,"tag":310,"props":1837,"children":1838},{"style":340},[1839],{"type":52,"value":1840},"utf-8",{"type":46,"tag":310,"props":1842,"children":1843},{"style":334},[1844],{"type":52,"value":348},{"type":46,"tag":310,"props":1846,"children":1847},{"style":323},[1848],{"type":52,"value":622},{"type":46,"tag":310,"props":1850,"children":1851},{"style":334},[1852],{"type":52,"value":353},{"type":46,"tag":310,"props":1854,"children":1855},{"class":312,"line":525},[1856],{"type":46,"tag":310,"props":1857,"children":1858},{"emptyLinePlaceholder":360},[1859],{"type":52,"value":363},{"type":46,"tag":310,"props":1861,"children":1862},{"class":312,"line":533},[1863,1867,1871,1875,1879,1883,1887,1891,1895,1899,1903],{"type":46,"tag":310,"props":1864,"children":1865},{"style":370},[1866],{"type":52,"value":373},{"type":46,"tag":310,"props":1868,"children":1869},{"style":323},[1870],{"type":52,"value":424},{"type":46,"tag":310,"props":1872,"children":1873},{"style":334},[1874],{"type":52,"value":383},{"type":46,"tag":310,"props":1876,"children":1877},{"style":317},[1878],{"type":52,"value":433},{"type":46,"tag":310,"props":1880,"children":1881},{"style":323},[1882],{"type":52,"value":438},{"type":46,"tag":310,"props":1884,"children":1885},{"style":334},[1886],{"type":52,"value":443},{"type":46,"tag":310,"props":1888,"children":1889},{"style":323},[1890],{"type":52,"value":23},{"type":46,"tag":310,"props":1892,"children":1893},{"style":334},[1894],{"type":52,"value":443},{"type":46,"tag":310,"props":1896,"children":1897},{"style":391},[1898],{"type":52,"value":456},{"type":46,"tag":310,"props":1900,"children":1901},{"style":323},[1902],{"type":52,"value":461},{"type":46,"tag":310,"props":1904,"children":1905},{"style":334},[1906],{"type":52,"value":466},{"type":46,"tag":310,"props":1908,"children":1909},{"class":312,"line":542},[1910,1914,1918,1922,1926,1930],{"type":46,"tag":310,"props":1911,"children":1912},{"style":473},[1913],{"type":52,"value":476},{"type":46,"tag":310,"props":1915,"children":1916},{"style":334},[1917],{"type":52,"value":481},{"type":46,"tag":310,"props":1919,"children":1920},{"style":334},[1921],{"type":52,"value":337},{"type":46,"tag":310,"props":1923,"children":1924},{"style":340},[1925],{"type":52,"value":490},{"type":46,"tag":310,"props":1927,"children":1928},{"style":334},[1929],{"type":52,"value":348},{"type":46,"tag":310,"props":1931,"children":1932},{"style":334},[1933],{"type":52,"value":499},{"type":46,"tag":310,"props":1935,"children":1936},{"class":312,"line":551},[1937,1941],{"type":46,"tag":310,"props":1938,"children":1939},{"style":323},[1940],{"type":52,"value":508},{"type":46,"tag":310,"props":1942,"children":1943},{"style":334},[1944],{"type":52,"value":499},{"type":46,"tag":310,"props":1946,"children":1947},{"class":312,"line":559},[1948,1952,1956],{"type":46,"tag":310,"props":1949,"children":1950},{"style":334},[1951],{"type":52,"value":617},{"type":46,"tag":310,"props":1953,"children":1954},{"style":323},[1955],{"type":52,"value":622},{"type":46,"tag":310,"props":1957,"children":1958},{"style":334},[1959],{"type":52,"value":353},{"type":46,"tag":299,"props":1961,"children":1963},{"className":701,"code":1962,"language":695,"meta":304,"style":304},"from pathlib import Path\nfrom runwayml import RunwayML\n\nclient = RunwayML()\n\ncontent = Path('.\u002Fknowledge\u002Fproduct-faq.md').read_text()\n\ndocument = client.documents.create(\n    name='Product FAQ',\n    content=content,\n)\n",[1964],{"type":46,"tag":71,"props":1965,"children":1966},{"__ignoreMap":304},[1967,1975,1982,1989,1996,2003,2011,2018,2025,2032,2040],{"type":46,"tag":310,"props":1968,"children":1969},{"class":312,"line":313},[1970],{"type":46,"tag":310,"props":1971,"children":1972},{},[1973],{"type":52,"value":1974},"from pathlib import Path\n",{"type":46,"tag":310,"props":1976,"children":1977},{"class":312,"line":356},[1978],{"type":46,"tag":310,"props":1979,"children":1980},{},[1981],{"type":52,"value":714},{"type":46,"tag":310,"props":1983,"children":1984},{"class":312,"line":366},[1985],{"type":46,"tag":310,"props":1986,"children":1987},{"emptyLinePlaceholder":360},[1988],{"type":52,"value":363},{"type":46,"tag":310,"props":1990,"children":1991},{"class":312,"line":406},[1992],{"type":46,"tag":310,"props":1993,"children":1994},{},[1995],{"type":52,"value":729},{"type":46,"tag":310,"props":1997,"children":1998},{"class":312,"line":414},[1999],{"type":46,"tag":310,"props":2000,"children":2001},{"emptyLinePlaceholder":360},[2002],{"type":52,"value":363},{"type":46,"tag":310,"props":2004,"children":2005},{"class":312,"line":469},[2006],{"type":46,"tag":310,"props":2007,"children":2008},{},[2009],{"type":52,"value":2010},"content = Path('.\u002Fknowledge\u002Fproduct-faq.md').read_text()\n",{"type":46,"tag":310,"props":2012,"children":2013},{"class":312,"line":502},[2014],{"type":46,"tag":310,"props":2015,"children":2016},{"emptyLinePlaceholder":360},[2017],{"type":52,"value":363},{"type":46,"tag":310,"props":2019,"children":2020},{"class":312,"line":525},[2021],{"type":46,"tag":310,"props":2022,"children":2023},{},[2024],{"type":52,"value":744},{"type":46,"tag":310,"props":2026,"children":2027},{"class":312,"line":533},[2028],{"type":46,"tag":310,"props":2029,"children":2030},{},[2031],{"type":52,"value":752},{"type":46,"tag":310,"props":2033,"children":2034},{"class":312,"line":542},[2035],{"type":46,"tag":310,"props":2036,"children":2037},{},[2038],{"type":52,"value":2039},"    content=content,\n",{"type":46,"tag":310,"props":2041,"children":2042},{"class":312,"line":551},[2043],{"type":46,"tag":310,"props":2044,"children":2045},{},[2046],{"type":52,"value":833},{"type":46,"tag":292,"props":2048,"children":2050},{"id":2049},"dynamic-knowledge-updates",[2051],{"type":52,"value":2052},"Dynamic Knowledge Updates",{"type":46,"tag":59,"props":2054,"children":2055},{},[2056],{"type":52,"value":2057},"Update documents programmatically — useful for syncing with a CMS or database:",{"type":46,"tag":299,"props":2059,"children":2061},{"className":301,"code":2060,"language":303,"meta":304,"style":304},"\u002F\u002F Example: API endpoint to update character knowledge\napp.post('\u002Fapi\u002Favatar\u002Fupdate-knowledge', async (req, res) => {\n  const { avatarId, documents } = req.body;\n\n  \u002F\u002F Create new documents\n  const docIds = [];\n  for (const doc of documents) {\n    const created = await client.documents.create({\n      name: doc.name,\n      content: doc.content,\n    });\n    docIds.push(created.id);\n  }\n\n  \u002F\u002F Link all documents to the avatar (replaces existing)\n  await client.avatars.update(avatarId, {\n    documentIds: docIds,\n  });\n\n  res.json({ success: true, documentCount: docIds.length });\n});\n",[2062],{"type":46,"tag":71,"props":2063,"children":2064},{"__ignoreMap":304},[2065,2073,2149,2203,2210,2218,2243,2282,2331,2360,2389,2405,2447,2455,2462,2470,2515,2535,2551,2558,2638],{"type":46,"tag":310,"props":2066,"children":2067},{"class":312,"line":313},[2068],{"type":46,"tag":310,"props":2069,"children":2070},{"style":1777},[2071],{"type":52,"value":2072},"\u002F\u002F Example: API endpoint to update character knowledge\n",{"type":46,"tag":310,"props":2074,"children":2075},{"class":312,"line":356},[2076,2081,2085,2090,2094,2098,2103,2107,2111,2116,2121,2127,2131,2136,2140,2145],{"type":46,"tag":310,"props":2077,"children":2078},{"style":323},[2079],{"type":52,"value":2080},"app",{"type":46,"tag":310,"props":2082,"children":2083},{"style":334},[2084],{"type":52,"value":443},{"type":46,"tag":310,"props":2086,"children":2087},{"style":391},[2088],{"type":52,"value":2089},"post",{"type":46,"tag":310,"props":2091,"children":2092},{"style":323},[2093],{"type":52,"value":461},{"type":46,"tag":310,"props":2095,"children":2096},{"style":334},[2097],{"type":52,"value":348},{"type":46,"tag":310,"props":2099,"children":2100},{"style":340},[2101],{"type":52,"value":2102},"\u002Fapi\u002Favatar\u002Fupdate-knowledge",{"type":46,"tag":310,"props":2104,"children":2105},{"style":334},[2106],{"type":52,"value":348},{"type":46,"tag":310,"props":2108,"children":2109},{"style":334},[2110],{"type":52,"value":674},{"type":46,"tag":310,"props":2112,"children":2113},{"style":370},[2114],{"type":52,"value":2115}," async",{"type":46,"tag":310,"props":2117,"children":2118},{"style":334},[2119],{"type":52,"value":2120}," (",{"type":46,"tag":310,"props":2122,"children":2124},{"style":2123},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[2125],{"type":52,"value":2126},"req",{"type":46,"tag":310,"props":2128,"children":2129},{"style":334},[2130],{"type":52,"value":674},{"type":46,"tag":310,"props":2132,"children":2133},{"style":2123},[2134],{"type":52,"value":2135}," res",{"type":46,"tag":310,"props":2137,"children":2138},{"style":334},[2139],{"type":52,"value":622},{"type":46,"tag":310,"props":2141,"children":2142},{"style":370},[2143],{"type":52,"value":2144}," =>",{"type":46,"tag":310,"props":2146,"children":2147},{"style":334},[2148],{"type":52,"value":922},{"type":46,"tag":310,"props":2150,"children":2151},{"class":312,"line":366},[2152,2157,2162,2166,2170,2175,2180,2185,2190,2194,2199],{"type":46,"tag":310,"props":2153,"children":2154},{"style":370},[2155],{"type":52,"value":2156},"  const",{"type":46,"tag":310,"props":2158,"children":2159},{"style":334},[2160],{"type":52,"value":2161}," {",{"type":46,"tag":310,"props":2163,"children":2164},{"style":323},[2165],{"type":52,"value":1537},{"type":46,"tag":310,"props":2167,"children":2168},{"style":334},[2169],{"type":52,"value":674},{"type":46,"tag":310,"props":2171,"children":2172},{"style":323},[2173],{"type":52,"value":2174}," documents",{"type":46,"tag":310,"props":2176,"children":2177},{"style":334},[2178],{"type":52,"value":2179}," }",{"type":46,"tag":310,"props":2181,"children":2182},{"style":334},[2183],{"type":52,"value":2184}," =",{"type":46,"tag":310,"props":2186,"children":2187},{"style":323},[2188],{"type":52,"value":2189}," req",{"type":46,"tag":310,"props":2191,"children":2192},{"style":334},[2193],{"type":52,"value":443},{"type":46,"tag":310,"props":2195,"children":2196},{"style":323},[2197],{"type":52,"value":2198},"body",{"type":46,"tag":310,"props":2200,"children":2201},{"style":334},[2202],{"type":52,"value":353},{"type":46,"tag":310,"props":2204,"children":2205},{"class":312,"line":406},[2206],{"type":46,"tag":310,"props":2207,"children":2208},{"emptyLinePlaceholder":360},[2209],{"type":52,"value":363},{"type":46,"tag":310,"props":2211,"children":2212},{"class":312,"line":414},[2213],{"type":46,"tag":310,"props":2214,"children":2215},{"style":1777},[2216],{"type":52,"value":2217},"  \u002F\u002F Create new documents\n",{"type":46,"tag":310,"props":2219,"children":2220},{"class":312,"line":469},[2221,2225,2230,2234,2239],{"type":46,"tag":310,"props":2222,"children":2223},{"style":370},[2224],{"type":52,"value":2156},{"type":46,"tag":310,"props":2226,"children":2227},{"style":323},[2228],{"type":52,"value":2229}," docIds",{"type":46,"tag":310,"props":2231,"children":2232},{"style":334},[2233],{"type":52,"value":2184},{"type":46,"tag":310,"props":2235,"children":2236},{"style":473},[2237],{"type":52,"value":2238}," []",{"type":46,"tag":310,"props":2240,"children":2241},{"style":334},[2242],{"type":52,"value":353},{"type":46,"tag":310,"props":2244,"children":2245},{"class":312,"line":502},[2246,2251,2255,2259,2264,2269,2273,2278],{"type":46,"tag":310,"props":2247,"children":2248},{"style":317},[2249],{"type":52,"value":2250},"  for",{"type":46,"tag":310,"props":2252,"children":2253},{"style":473},[2254],{"type":52,"value":2120},{"type":46,"tag":310,"props":2256,"children":2257},{"style":370},[2258],{"type":52,"value":373},{"type":46,"tag":310,"props":2260,"children":2261},{"style":323},[2262],{"type":52,"value":2263}," doc",{"type":46,"tag":310,"props":2265,"children":2266},{"style":334},[2267],{"type":52,"value":2268}," of",{"type":46,"tag":310,"props":2270,"children":2271},{"style":323},[2272],{"type":52,"value":2174},{"type":46,"tag":310,"props":2274,"children":2275},{"style":473},[2276],{"type":52,"value":2277},") ",{"type":46,"tag":310,"props":2279,"children":2280},{"style":334},[2281],{"type":52,"value":466},{"type":46,"tag":310,"props":2283,"children":2284},{"class":312,"line":525},[2285,2290,2295,2299,2303,2307,2311,2315,2319,2323,2327],{"type":46,"tag":310,"props":2286,"children":2287},{"style":370},[2288],{"type":52,"value":2289},"    const",{"type":46,"tag":310,"props":2291,"children":2292},{"style":323},[2293],{"type":52,"value":2294}," created",{"type":46,"tag":310,"props":2296,"children":2297},{"style":334},[2298],{"type":52,"value":2184},{"type":46,"tag":310,"props":2300,"children":2301},{"style":317},[2302],{"type":52,"value":433},{"type":46,"tag":310,"props":2304,"children":2305},{"style":323},[2306],{"type":52,"value":438},{"type":46,"tag":310,"props":2308,"children":2309},{"style":334},[2310],{"type":52,"value":443},{"type":46,"tag":310,"props":2312,"children":2313},{"style":323},[2314],{"type":52,"value":23},{"type":46,"tag":310,"props":2316,"children":2317},{"style":334},[2318],{"type":52,"value":443},{"type":46,"tag":310,"props":2320,"children":2321},{"style":391},[2322],{"type":52,"value":456},{"type":46,"tag":310,"props":2324,"children":2325},{"style":473},[2326],{"type":52,"value":461},{"type":46,"tag":310,"props":2328,"children":2329},{"style":334},[2330],{"type":52,"value":466},{"type":46,"tag":310,"props":2332,"children":2333},{"class":312,"line":533},[2334,2339,2343,2347,2351,2356],{"type":46,"tag":310,"props":2335,"children":2336},{"style":473},[2337],{"type":52,"value":2338},"      name",{"type":46,"tag":310,"props":2340,"children":2341},{"style":334},[2342],{"type":52,"value":481},{"type":46,"tag":310,"props":2344,"children":2345},{"style":323},[2346],{"type":52,"value":2263},{"type":46,"tag":310,"props":2348,"children":2349},{"style":334},[2350],{"type":52,"value":443},{"type":46,"tag":310,"props":2352,"children":2353},{"style":323},[2354],{"type":52,"value":2355},"name",{"type":46,"tag":310,"props":2357,"children":2358},{"style":334},[2359],{"type":52,"value":499},{"type":46,"tag":310,"props":2361,"children":2362},{"class":312,"line":542},[2363,2368,2372,2376,2380,2385],{"type":46,"tag":310,"props":2364,"children":2365},{"style":473},[2366],{"type":52,"value":2367},"      content",{"type":46,"tag":310,"props":2369,"children":2370},{"style":334},[2371],{"type":52,"value":481},{"type":46,"tag":310,"props":2373,"children":2374},{"style":323},[2375],{"type":52,"value":2263},{"type":46,"tag":310,"props":2377,"children":2378},{"style":334},[2379],{"type":52,"value":443},{"type":46,"tag":310,"props":2381,"children":2382},{"style":323},[2383],{"type":52,"value":2384},"content",{"type":46,"tag":310,"props":2386,"children":2387},{"style":334},[2388],{"type":52,"value":499},{"type":46,"tag":310,"props":2390,"children":2391},{"class":312,"line":551},[2392,2397,2401],{"type":46,"tag":310,"props":2393,"children":2394},{"style":334},[2395],{"type":52,"value":2396},"    }",{"type":46,"tag":310,"props":2398,"children":2399},{"style":473},[2400],{"type":52,"value":622},{"type":46,"tag":310,"props":2402,"children":2403},{"style":334},[2404],{"type":52,"value":353},{"type":46,"tag":310,"props":2406,"children":2407},{"class":312,"line":559},[2408,2413,2417,2422,2426,2431,2435,2439,2443],{"type":46,"tag":310,"props":2409,"children":2410},{"style":323},[2411],{"type":52,"value":2412},"    docIds",{"type":46,"tag":310,"props":2414,"children":2415},{"style":334},[2416],{"type":52,"value":443},{"type":46,"tag":310,"props":2418,"children":2419},{"style":391},[2420],{"type":52,"value":2421},"push",{"type":46,"tag":310,"props":2423,"children":2424},{"style":473},[2425],{"type":52,"value":461},{"type":46,"tag":310,"props":2427,"children":2428},{"style":323},[2429],{"type":52,"value":2430},"created",{"type":46,"tag":310,"props":2432,"children":2433},{"style":334},[2434],{"type":52,"value":443},{"type":46,"tag":310,"props":2436,"children":2437},{"style":323},[2438],{"type":52,"value":1343},{"type":46,"tag":310,"props":2440,"children":2441},{"style":473},[2442],{"type":52,"value":622},{"type":46,"tag":310,"props":2444,"children":2445},{"style":334},[2446],{"type":52,"value":353},{"type":46,"tag":310,"props":2448,"children":2449},{"class":312,"line":568},[2450],{"type":46,"tag":310,"props":2451,"children":2452},{"style":334},[2453],{"type":52,"value":2454},"  }\n",{"type":46,"tag":310,"props":2456,"children":2457},{"class":312,"line":577},[2458],{"type":46,"tag":310,"props":2459,"children":2460},{"emptyLinePlaceholder":360},[2461],{"type":52,"value":363},{"type":46,"tag":310,"props":2463,"children":2464},{"class":312,"line":31},[2465],{"type":46,"tag":310,"props":2466,"children":2467},{"style":1777},[2468],{"type":52,"value":2469},"  \u002F\u002F Link all documents to the avatar (replaces existing)\n",{"type":46,"tag":310,"props":2471,"children":2472},{"class":312,"line":593},[2473,2478,2482,2486,2490,2494,2498,2502,2507,2511],{"type":46,"tag":310,"props":2474,"children":2475},{"style":317},[2476],{"type":52,"value":2477},"  await",{"type":46,"tag":310,"props":2479,"children":2480},{"style":323},[2481],{"type":52,"value":438},{"type":46,"tag":310,"props":2483,"children":2484},{"style":334},[2485],{"type":52,"value":443},{"type":46,"tag":310,"props":2487,"children":2488},{"style":323},[2489],{"type":52,"value":899},{"type":46,"tag":310,"props":2491,"children":2492},{"style":334},[2493],{"type":52,"value":443},{"type":46,"tag":310,"props":2495,"children":2496},{"style":391},[2497],{"type":52,"value":908},{"type":46,"tag":310,"props":2499,"children":2500},{"style":473},[2501],{"type":52,"value":461},{"type":46,"tag":310,"props":2503,"children":2504},{"style":323},[2505],{"type":52,"value":2506},"avatarId",{"type":46,"tag":310,"props":2508,"children":2509},{"style":334},[2510],{"type":52,"value":674},{"type":46,"tag":310,"props":2512,"children":2513},{"style":334},[2514],{"type":52,"value":922},{"type":46,"tag":310,"props":2516,"children":2517},{"class":312,"line":611},[2518,2523,2527,2531],{"type":46,"tag":310,"props":2519,"children":2520},{"style":473},[2521],{"type":52,"value":2522},"    documentIds",{"type":46,"tag":310,"props":2524,"children":2525},{"style":334},[2526],{"type":52,"value":481},{"type":46,"tag":310,"props":2528,"children":2529},{"style":323},[2530],{"type":52,"value":2229},{"type":46,"tag":310,"props":2532,"children":2533},{"style":334},[2534],{"type":52,"value":499},{"type":46,"tag":310,"props":2536,"children":2537},{"class":312,"line":629},[2538,2543,2547],{"type":46,"tag":310,"props":2539,"children":2540},{"style":334},[2541],{"type":52,"value":2542},"  }",{"type":46,"tag":310,"props":2544,"children":2545},{"style":473},[2546],{"type":52,"value":622},{"type":46,"tag":310,"props":2548,"children":2549},{"style":334},[2550],{"type":52,"value":353},{"type":46,"tag":310,"props":2552,"children":2553},{"class":312,"line":637},[2554],{"type":46,"tag":310,"props":2555,"children":2556},{"emptyLinePlaceholder":360},[2557],{"type":52,"value":363},{"type":46,"tag":310,"props":2559,"children":2561},{"class":312,"line":2560},20,[2562,2567,2571,2576,2580,2585,2590,2594,2600,2604,2609,2613,2617,2621,2626,2630,2634],{"type":46,"tag":310,"props":2563,"children":2564},{"style":323},[2565],{"type":52,"value":2566},"  res",{"type":46,"tag":310,"props":2568,"children":2569},{"style":334},[2570],{"type":52,"value":443},{"type":46,"tag":310,"props":2572,"children":2573},{"style":391},[2574],{"type":52,"value":2575},"json",{"type":46,"tag":310,"props":2577,"children":2578},{"style":473},[2579],{"type":52,"value":461},{"type":46,"tag":310,"props":2581,"children":2582},{"style":334},[2583],{"type":52,"value":2584},"{",{"type":46,"tag":310,"props":2586,"children":2587},{"style":473},[2588],{"type":52,"value":2589}," success",{"type":46,"tag":310,"props":2591,"children":2592},{"style":334},[2593],{"type":52,"value":481},{"type":46,"tag":310,"props":2595,"children":2597},{"style":2596},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[2598],{"type":52,"value":2599}," true",{"type":46,"tag":310,"props":2601,"children":2602},{"style":334},[2603],{"type":52,"value":674},{"type":46,"tag":310,"props":2605,"children":2606},{"style":473},[2607],{"type":52,"value":2608}," documentCount",{"type":46,"tag":310,"props":2610,"children":2611},{"style":334},[2612],{"type":52,"value":481},{"type":46,"tag":310,"props":2614,"children":2615},{"style":323},[2616],{"type":52,"value":2229},{"type":46,"tag":310,"props":2618,"children":2619},{"style":334},[2620],{"type":52,"value":443},{"type":46,"tag":310,"props":2622,"children":2623},{"style":323},[2624],{"type":52,"value":2625},"length",{"type":46,"tag":310,"props":2627,"children":2628},{"style":334},[2629],{"type":52,"value":2179},{"type":46,"tag":310,"props":2631,"children":2632},{"style":473},[2633],{"type":52,"value":622},{"type":46,"tag":310,"props":2635,"children":2636},{"style":334},[2637],{"type":52,"value":353},{"type":46,"tag":310,"props":2639,"children":2641},{"class":312,"line":2640},21,[2642,2646,2650],{"type":46,"tag":310,"props":2643,"children":2644},{"style":334},[2645],{"type":52,"value":617},{"type":46,"tag":310,"props":2647,"children":2648},{"style":323},[2649],{"type":52,"value":622},{"type":46,"tag":310,"props":2651,"children":2652},{"style":334},[2653],{"type":52,"value":353},{"type":46,"tag":119,"props":2655,"children":2657},{"id":2656},"tips",[2658],{"type":52,"value":2659},"Tips",{"type":46,"tag":224,"props":2661,"children":2662},{},[2663,2673,2683,2693,2703],{"type":46,"tag":228,"props":2664,"children":2665},{},[2666,2671],{"type":46,"tag":63,"props":2667,"children":2668},{},[2669],{"type":52,"value":2670},"Use Markdown",{"type":52,"value":2672}," for structured content — headings help the Avatar navigate the knowledge.",{"type":46,"tag":228,"props":2674,"children":2675},{},[2676,2681],{"type":46,"tag":63,"props":2677,"children":2678},{},[2679],{"type":52,"value":2680},"Be concise",{"type":52,"value":2682}," — stay well under the 50,000 token limit for best retrieval quality.",{"type":46,"tag":228,"props":2684,"children":2685},{},[2686,2691],{"type":46,"tag":63,"props":2687,"children":2688},{},[2689],{"type":52,"value":2690},"Organize by topic",{"type":52,"value":2692}," — multiple focused documents work better than one giant document.",{"type":46,"tag":228,"props":2694,"children":2695},{},[2696,2701],{"type":46,"tag":63,"props":2697,"children":2698},{},[2699],{"type":52,"value":2700},"Update regularly",{"type":52,"value":2702}," — keep knowledge current by re-creating documents when content changes.",{"type":46,"tag":228,"props":2704,"children":2705},{},[2706,2708,2717],{"type":52,"value":2707},"Documents can also be managed via the ",{"type":46,"tag":2709,"props":2710,"children":2714},"a",{"href":2711,"rel":2712},"https:\u002F\u002Fdev.runwayml.com\u002F",[2713],"nofollow",[2715],{"type":52,"value":2716},"Developer Portal",{"type":52,"value":2718}," UI.",{"type":46,"tag":2720,"props":2721,"children":2722},"style",{},[2723],{"type":52,"value":2724},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2726,"total":611},[2727,2746,2755,2769,2784,2799,2812],{"slug":2728,"name":2728,"fn":2729,"description":2730,"org":2731,"tags":2732,"stars":27,"repoUrl":28,"updatedAt":2745},"rw-api-reference","look up Runway API reference","Complete reference for Runway's public API: models, endpoints, costs, limits, and types",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2733,2736,2739,2742],{"name":2734,"slug":2735,"type":16},"AI Infrastructure","ai-infrastructure",{"name":2737,"slug":2738,"type":16},"API Development","api-development",{"name":2740,"slug":2741,"type":16},"Reference","reference",{"name":2743,"slug":2744,"type":16},"Video","video","2026-04-08T04:41:58.820783",{"slug":2747,"name":2747,"fn":2748,"description":2749,"org":2750,"tags":2751,"stars":27,"repoUrl":28,"updatedAt":2754},"rw-check-compatibility","verify codebase compatibility with the Runway API","Analyze a user's codebase to verify it can use Runway's public API (server-side requirement)",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2752,2753],{"name":2737,"slug":2738,"type":16},{"name":9,"slug":8,"type":16},"2026-04-08T04:42:01.271257",{"slug":2756,"name":2756,"fn":2757,"description":2758,"org":2759,"tags":2760,"stars":27,"repoUrl":28,"updatedAt":2768},"rw-check-org-details","query Runway API for organization details","Query the Runway API for organization details: rate limits, credit balance, usage tier, and daily generation counts",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2761,2764,2767],{"name":2762,"slug":2763,"type":16},"Operations","operations",{"name":2765,"slug":2766,"type":16},"Reporting","reporting",{"name":9,"slug":8,"type":16},"2026-04-08T04:42:00.054235",{"slug":2770,"name":2770,"fn":2771,"description":2772,"org":2773,"tags":2774,"stars":27,"repoUrl":28,"updatedAt":2783},"rw-fetch-api-reference","retrieve Runway API reference","Retrieve the latest Runway API reference from docs.dev.runwayml.com and use it as the authoritative source before any integration work",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2775,2776,2779,2782],{"name":2737,"slug":2738,"type":16},{"name":2777,"slug":2778,"type":16},"Documentation","documentation",{"name":2780,"slug":2781,"type":16},"Research","research",{"name":9,"slug":8,"type":16},"2026-04-08T04:42:07.604739",{"slug":2785,"name":2785,"fn":2786,"description":2787,"org":2788,"tags":2789,"stars":27,"repoUrl":28,"updatedAt":2798},"rw-generate-audio","generate audio with Runway API","Generate audio using the Runway API via runnable scripts. Supports TTS, sound effects, voice isolation, dubbing, and voice conversion.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2790,2791,2794,2797],{"name":2734,"slug":2735,"type":16},{"name":2792,"slug":2793,"type":16},"Audio","audio",{"name":2795,"slug":2796,"type":16},"Creative","creative",{"name":9,"slug":8,"type":16},"2026-04-17T04:51:59.892185",{"slug":2800,"name":2800,"fn":2801,"description":2802,"org":2803,"tags":2804,"stars":27,"repoUrl":28,"updatedAt":2811},"rw-generate-image","generate images with Runway API","Generate images directly using the Runway API via runnable scripts. Supports text-to-image with optional reference images.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2805,2806,2807,2810],{"name":2734,"slug":2735,"type":16},{"name":2795,"slug":2796,"type":16},{"name":2808,"slug":2809,"type":16},"Image Generation","image-generation",{"name":9,"slug":8,"type":16},"2026-04-17T04:52:01.158325",{"slug":2813,"name":2813,"fn":2814,"description":2815,"org":2816,"tags":2817,"stars":27,"repoUrl":28,"updatedAt":2822},"rw-generate-video","generate videos with Runway API","Generate videos directly using the Runway API via runnable scripts. Supports text-to-video, image-to-video, and video-to-video with seedance2, gen4.5, veo3, and more.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2818,2819,2820,2821],{"name":2734,"slug":2735,"type":16},{"name":2795,"slug":2796,"type":16},{"name":9,"slug":8,"type":16},{"name":2743,"slug":2744,"type":16},"2026-04-17T04:51:58.600919",{"items":2824,"total":629},[2825,2832,2837,2843,2850,2857,2864,2871,2885,2903,2914,2922],{"slug":2728,"name":2728,"fn":2729,"description":2730,"org":2826,"tags":2827,"stars":27,"repoUrl":28,"updatedAt":2745},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2828,2829,2830,2831],{"name":2734,"slug":2735,"type":16},{"name":2737,"slug":2738,"type":16},{"name":2740,"slug":2741,"type":16},{"name":2743,"slug":2744,"type":16},{"slug":2747,"name":2747,"fn":2748,"description":2749,"org":2833,"tags":2834,"stars":27,"repoUrl":28,"updatedAt":2754},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2835,2836],{"name":2737,"slug":2738,"type":16},{"name":9,"slug":8,"type":16},{"slug":2756,"name":2756,"fn":2757,"description":2758,"org":2838,"tags":2839,"stars":27,"repoUrl":28,"updatedAt":2768},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2840,2841,2842],{"name":2762,"slug":2763,"type":16},{"name":2765,"slug":2766,"type":16},{"name":9,"slug":8,"type":16},{"slug":2770,"name":2770,"fn":2771,"description":2772,"org":2844,"tags":2845,"stars":27,"repoUrl":28,"updatedAt":2783},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2846,2847,2848,2849],{"name":2737,"slug":2738,"type":16},{"name":2777,"slug":2778,"type":16},{"name":2780,"slug":2781,"type":16},{"name":9,"slug":8,"type":16},{"slug":2785,"name":2785,"fn":2786,"description":2787,"org":2851,"tags":2852,"stars":27,"repoUrl":28,"updatedAt":2798},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2853,2854,2855,2856],{"name":2734,"slug":2735,"type":16},{"name":2792,"slug":2793,"type":16},{"name":2795,"slug":2796,"type":16},{"name":9,"slug":8,"type":16},{"slug":2800,"name":2800,"fn":2801,"description":2802,"org":2858,"tags":2859,"stars":27,"repoUrl":28,"updatedAt":2811},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2860,2861,2862,2863],{"name":2734,"slug":2735,"type":16},{"name":2795,"slug":2796,"type":16},{"name":2808,"slug":2809,"type":16},{"name":9,"slug":8,"type":16},{"slug":2813,"name":2813,"fn":2814,"description":2815,"org":2865,"tags":2866,"stars":27,"repoUrl":28,"updatedAt":2822},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2867,2868,2869,2870],{"name":2734,"slug":2735,"type":16},{"name":2795,"slug":2796,"type":16},{"name":9,"slug":8,"type":16},{"name":2743,"slug":2744,"type":16},{"slug":2872,"name":2872,"fn":2873,"description":2874,"org":2875,"tags":2876,"stars":27,"repoUrl":28,"updatedAt":2884},"rw-integrate-audio","integrate Runway audio APIs","Help users integrate Runway audio APIs (TTS, sound effects, voice isolation, dubbing)",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2877,2878,2879,2880,2881],{"name":2737,"slug":2738,"type":16},{"name":2792,"slug":2793,"type":16},{"name":2795,"slug":2796,"type":16},{"name":9,"slug":8,"type":16},{"name":2882,"slug":2883,"type":16},"Speech","speech","2026-04-08T04:42:10.081814",{"slug":2886,"name":2886,"fn":2887,"description":2888,"org":2889,"tags":2890,"stars":27,"repoUrl":28,"updatedAt":2902},"rw-integrate-character-embed","embed Runway characters in React apps","Help users embed Runway Character avatar calls in React apps using the @runwayml\u002Favatars-react SDK",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2891,2892,2895,2898,2899],{"name":2737,"slug":2738,"type":16},{"name":2893,"slug":2894,"type":16},"Frontend","frontend",{"name":2896,"slug":2897,"type":16},"React","react",{"name":9,"slug":8,"type":16},{"name":2900,"slug":2901,"type":16},"UI Components","ui-components","2026-04-08T04:42:08.849481",{"slug":2904,"name":2904,"fn":2905,"description":2906,"org":2907,"tags":2908,"stars":27,"repoUrl":28,"updatedAt":2913},"rw-integrate-characters","integrate Runway conversational characters","Help users create Runway Characters (GWM-1 avatars) and integrate real-time conversational sessions into their apps",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2909,2910,2911,2912],{"name":2737,"slug":2738,"type":16},{"name":2792,"slug":2793,"type":16},{"name":2795,"slug":2796,"type":16},{"name":9,"slug":8,"type":16},"2026-04-08T04:42:06.171483",{"slug":4,"name":4,"fn":5,"description":6,"org":2915,"tags":2916,"stars":27,"repoUrl":28,"updatedAt":29},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2917,2918,2919,2920,2921],{"name":25,"slug":26,"type":16},{"name":14,"slug":15,"type":16},{"name":22,"slug":23,"type":16},{"name":18,"slug":19,"type":16},{"name":9,"slug":8,"type":16},{"slug":2923,"name":2923,"fn":2924,"description":2925,"org":2926,"tags":2927,"stars":27,"repoUrl":28,"updatedAt":2932},"rw-integrate-image","integrate Runway image generation APIs","Help users integrate Runway image generation APIs (text-to-image with reference images)",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2928,2929,2930,2931],{"name":2737,"slug":2738,"type":16},{"name":2795,"slug":2796,"type":16},{"name":2808,"slug":2809,"type":16},{"name":9,"slug":8,"type":16},"2026-04-08T04:42:11.322008"]