[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-runway-rw-integrate-image":3,"mdc--qg4gkr-key":35,"related-org-runway-rw-integrate-image":4520,"related-repo-runway-rw-integrate-image":4681},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":24,"repoUrl":25,"updatedAt":26,"license":27,"forks":28,"topics":29,"repo":30,"sourceUrl":33,"mdContent":34},"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},"runway","Runway","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Frunway.png","runwayml",[13,17,18,21],{"name":14,"slug":15,"type":16},"Creative","creative","tag",{"name":9,"slug":8,"type":16},{"name":19,"slug":20,"type":16},"API Development","api-development",{"name":22,"slug":23,"type":16},"Image Generation","image-generation",57,"https:\u002F\u002Fgithub.com\u002Frunwayml\u002Fskills","2026-04-08T04:42:11.322008",null,15,[],{"repoUrl":25,"stars":24,"forks":28,"topics":31,"description":32},[],"for Runway coding agent skills","https:\u002F\u002Fgithub.com\u002Frunwayml\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Frw-integrate-image","---\nname: rw-integrate-image\ndescription: \"Help users integrate Runway image generation APIs (text-to-image with reference images)\"\nuser-invocable: false\nallowed-tools: Read, Grep, Glob, Edit, Write\n---\n\n# Integrate Image Generation\n\n> **PREREQUISITE:** Run `+rw-check-compatibility` first. Run `+rw-fetch-api-reference` to load the latest API reference before integrating. Requires `+rw-setup-api-key` for API credentials. Requires `+rw-integrate-uploads` when the user has local reference images.\n\nHelp users add Runway image generation to their server-side code.\n\n## Available Models\n\n| Model | Best For | Cost | Speed |\n|-------|----------|------|-------|\n| `gen4_image` | Highest quality | 5 credits (720p), 8 credits (1080p) | Standard |\n| `gen4_image_turbo` | Fast generation | 2 credits | Fast |\n| `gemini_2.5_flash` | Google Gemini model | 5 credits | Standard |\n\n**Model selection guidance:**\n- Default recommendation: **`gen4_image`** — best quality\n- Budget\u002Fspeed: **`gen4_image_turbo`** — cheapest and fastest\n\n## Security\n\n`referenceImages[].uri` is **fetched server-side by the Runway API** — treat it like any outbound fetch:\n\n- **Prefer `runway:\u002F\u002F` URIs** from `+rw-integrate-uploads` — scoped to your account, no arbitrary web content.\n- **If accepting URLs from clients**, validate first: require `https:\u002F\u002F`, allowlist trusted hosts, reject private addresses. See the Express.js example below.\n- **Never forward `req.body.referenceImages`** straight into `textToImage.create`. The SDK snippets below use raw URLs for brevity — they aren't production templates.\n- Treat generated outputs as untrusted when piping into downstream automations — ingested references influence the result.\n\n## Endpoint: `POST \u002Fv1\u002Ftext_to_image`\n\n### Basic Text-to-Image\n\n```javascript\n\u002F\u002F Node.js SDK\nimport RunwayML from '@runwayml\u002Fsdk';\n\nconst client = new RunwayML();\n\nconst task = await client.textToImage.create({\n  model: 'gen4_image',\n  promptText: 'A serene Japanese garden with cherry blossoms and a koi pond',\n  ratio: '1280:720'\n}).waitForTaskOutput();\n\nconst imageUrl = task.output[0];\n```\n\n```python\n# Python SDK\nfrom runwayml import RunwayML\n\nclient = RunwayML()\n\ntask = client.text_to_image.create(\n    model='gen4_image',\n    prompt_text='A serene Japanese garden with cherry blossoms and a koi pond',\n    ratio='1280:720'\n).wait_for_task_output()\n\nimage_url = task.output[0]\n```\n\n### With Reference Images\n\nReference images let you guide the generation with visual references. Use `@Tag` syntax in the prompt to reference specific images.\n\n**Recommended:** upload via `+rw-integrate-uploads` and pass the returned `runway:\u002F\u002F` URI.\n\n```javascript\nimport fs from 'fs';\n\nconst refUpload = await client.uploads.createEphemeral(\n  fs.createReadStream('\u002Fpath\u002Fto\u002Freference.jpg')\n);\n\nconst task = await client.textToImage.create({\n  model: 'gen4_image',\n  promptText: 'A portrait in the style of @Reference',\n  referenceImages: [\n    { uri: refUpload.runwayUri, tag: 'Reference' }\n  ],\n  ratio: '1280:720'\n}).waitForTaskOutput();\n```\n\nExternal URLs also work — only pass origins you control (see Security):\n\n```javascript\nconst task = await client.textToImage.create({\n  model: 'gen4_image',\n  promptText: '@EiffelTower painted in the style of @StarryNight',\n  referenceImages: [\n    { uri: 'https:\u002F\u002Fcdn.yourapp.com\u002Feiffel-tower.jpg', tag: 'EiffelTower' },\n    { uri: 'https:\u002F\u002Fcdn.yourapp.com\u002Fstarry-night.jpg', tag: 'StarryNight' }\n  ],\n  ratio: '1280:720'\n}).waitForTaskOutput();\n```\n\n```python\ntask = client.text_to_image.create(\n    model='gen4_image',\n    prompt_text='@EiffelTower painted in the style of @StarryNight',\n    reference_images=[\n        {\"uri\": \"https:\u002F\u002Fcdn.yourapp.com\u002Feiffel-tower.jpg\", \"tag\": \"EiffelTower\"},\n        {\"uri\": \"https:\u002F\u002Fcdn.yourapp.com\u002Fstarry-night.jpg\", \"tag\": \"StarryNight\"}\n    ],\n    ratio='1280:720'\n).wait_for_task_output()\n```\n\n## Common Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------|\n| `model` | string | Model ID (required) |\n| `promptText` | string | Text description of the image (required) |\n| `ratio` | string | Aspect ratio, e.g. `'1280:720'`, `'720:1280'`, `'1080:1080'` |\n| `referenceImages` | array | Optional. Array of `{ uri, tag }` objects for visual guidance |\n\n## Integration Pattern\n\n1. **Prefer uploads over URLs** — Default to `+rw-integrate-uploads` so inputs are `runway:\u002F\u002F` URIs. External URLs only from origins you control (see Security).\n2. **Write the server-side handler** — Create an API route or server function.\n3. **Handle the output** — Download and store the image, don't serve signed URLs to clients.\n4. **Add error handling** — Wrap in try\u002Fcatch.\n\n### Example: Express.js API Route\n\n```javascript\nimport RunwayML from '@runwayml\u002Fsdk';\nimport express from 'express';\n\nconst client = new RunwayML();\nconst app = express();\napp.use(express.json());\n\n\u002F\u002F `runway:\u002F\u002F` URIs bypass this check; external URLs must match the allowlist.\nconst ALLOWED_MEDIA_HOSTS = new Set(['cdn.yourapp.com', 'uploads.yourapp.com']);\n\nfunction validateReferenceImages(refs) {\n  if (!Array.isArray(refs)) throw new Error('referenceImages must be an array');\n  return refs.map(({ uri, tag }) => {\n    if (typeof uri !== 'string' || typeof tag !== 'string') {\n      throw new Error('each reference needs a uri and tag');\n    }\n    if (uri.startsWith('runway:\u002F\u002F')) return { uri, tag };\n    const u = new URL(uri);\n    if (u.protocol !== 'https:') throw new Error('https required');\n    if (!ALLOWED_MEDIA_HOSTS.has(u.hostname)) throw new Error('untrusted media host');\n    return { uri: u.toString(), tag };\n  });\n}\n\napp.post('\u002Fapi\u002Fgenerate-image', async (req, res) => {\n  try {\n    const { prompt, model = 'gen4_image', ratio = '1280:720', referenceImages } = req.body;\n\n    const task = await client.textToImage.create({\n      model,\n      promptText: prompt,\n      ratio,\n      ...(referenceImages && { referenceImages: validateReferenceImages(referenceImages) })\n    }).waitForTaskOutput();\n\n    res.json({ imageUrl: task.output[0] });\n  } catch (error) {\n    console.error('Image generation failed:', error);\n    res.status(400).json({ error: error.message });\n  }\n});\n```\n\n> For browser uploads: POST files to your server, upload via `+rw-integrate-uploads`, and pass the `runway:\u002F\u002F` URI. Don't accept raw URLs from the browser.\n\n### Example: Next.js API Route\n\n```typescript\n\u002F\u002F app\u002Fapi\u002Fgenerate-image\u002Froute.ts\nimport RunwayML from '@runwayml\u002Fsdk';\nimport { NextRequest, NextResponse } from 'next\u002Fserver';\n\nconst client = new RunwayML();\n\nexport async function POST(request: NextRequest) {\n  const { prompt, referenceImages } = await request.json();\n\n  try {\n    const task = await client.textToImage.create({\n      model: 'gen4_image',\n      promptText: prompt,\n      ratio: '1280:720',\n      ...(referenceImages && { referenceImages })\n    }).waitForTaskOutput();\n\n    return NextResponse.json({ imageUrl: task.output[0] });\n  } catch (error) {\n    return NextResponse.json(\n      { error: error instanceof Error ? error.message : 'Generation failed' },\n      { status: 500 }\n    );\n  }\n}\n```\n\n### Example: FastAPI Route\n\n```python\nfrom fastapi import FastAPI, HTTPException\nfrom pydantic import BaseModel\nfrom runwayml import RunwayML\n\napp = FastAPI()\nclient = RunwayML()\n\nclass ImageRequest(BaseModel):\n    prompt: str\n    model: str = \"gen4_image\"\n    ratio: str = \"1280:720\"\n    reference_images: list[dict] | None = None\n\n@app.post(\"\u002Fapi\u002Fgenerate-image\")\nasync def generate_image(req: ImageRequest):\n    try:\n        params = {\n            \"model\": req.model,\n            \"prompt_text\": req.prompt,\n            \"ratio\": req.ratio,\n        }\n        if req.reference_images:\n            params[\"reference_images\"] = req.reference_images\n\n        task = client.text_to_image.create(**params).wait_for_task_output()\n        return {\"image_url\": task.output[0]}\n    except Exception as e:\n        raise HTTPException(status_code=500, detail=str(e))\n```\n\n## Tips\n\n- **Output URLs expire in 24-48 hours.** Download images to your own storage immediately.\n- **Reference images use `@Tag` syntax** in the prompt — the tag must match the `tag` field in the `referenceImages` array.\n- **For local files**, always upload via `+rw-integrate-uploads` first, then use the `runway:\u002F\u002F` URI.\n- **`gen4_image_turbo`** is the cheapest option at 2 credits per image — good for prototyping.\n",{"data":36,"body":39},{"name":4,"description":6,"user-invocable":37,"allowed-tools":38},false,"Read, Grep, Glob, Edit, Write",{"type":40,"children":41},"root",[42,51,100,105,112,230,238,273,279,297,372,384,391,745,847,853,866,890,1287,1292,1592,1667,1673,1815,1821,1879,1885,3473,3495,3501,4197,4203,4428,4434,4514],{"type":43,"tag":44,"props":45,"children":47},"element","h1",{"id":46},"integrate-image-generation",[48],{"type":49,"value":50},"text","Integrate Image Generation",{"type":43,"tag":52,"props":53,"children":54},"blockquote",{},[55],{"type":43,"tag":56,"props":57,"children":58},"p",{},[59,65,67,74,76,82,84,90,92,98],{"type":43,"tag":60,"props":61,"children":62},"strong",{},[63],{"type":49,"value":64},"PREREQUISITE:",{"type":49,"value":66}," Run ",{"type":43,"tag":68,"props":69,"children":71},"code",{"className":70},[],[72],{"type":49,"value":73},"+rw-check-compatibility",{"type":49,"value":75}," first. Run ",{"type":43,"tag":68,"props":77,"children":79},{"className":78},[],[80],{"type":49,"value":81},"+rw-fetch-api-reference",{"type":49,"value":83}," to load the latest API reference before integrating. Requires ",{"type":43,"tag":68,"props":85,"children":87},{"className":86},[],[88],{"type":49,"value":89},"+rw-setup-api-key",{"type":49,"value":91}," for API credentials. Requires ",{"type":43,"tag":68,"props":93,"children":95},{"className":94},[],[96],{"type":49,"value":97},"+rw-integrate-uploads",{"type":49,"value":99}," when the user has local reference images.",{"type":43,"tag":56,"props":101,"children":102},{},[103],{"type":49,"value":104},"Help users add Runway image generation to their server-side code.",{"type":43,"tag":106,"props":107,"children":109},"h2",{"id":108},"available-models",[110],{"type":49,"value":111},"Available Models",{"type":43,"tag":113,"props":114,"children":115},"table",{},[116,145],{"type":43,"tag":117,"props":118,"children":119},"thead",{},[120],{"type":43,"tag":121,"props":122,"children":123},"tr",{},[124,130,135,140],{"type":43,"tag":125,"props":126,"children":127},"th",{},[128],{"type":49,"value":129},"Model",{"type":43,"tag":125,"props":131,"children":132},{},[133],{"type":49,"value":134},"Best For",{"type":43,"tag":125,"props":136,"children":137},{},[138],{"type":49,"value":139},"Cost",{"type":43,"tag":125,"props":141,"children":142},{},[143],{"type":49,"value":144},"Speed",{"type":43,"tag":146,"props":147,"children":148},"tbody",{},[149,177,204],{"type":43,"tag":121,"props":150,"children":151},{},[152,162,167,172],{"type":43,"tag":153,"props":154,"children":155},"td",{},[156],{"type":43,"tag":68,"props":157,"children":159},{"className":158},[],[160],{"type":49,"value":161},"gen4_image",{"type":43,"tag":153,"props":163,"children":164},{},[165],{"type":49,"value":166},"Highest quality",{"type":43,"tag":153,"props":168,"children":169},{},[170],{"type":49,"value":171},"5 credits (720p), 8 credits (1080p)",{"type":43,"tag":153,"props":173,"children":174},{},[175],{"type":49,"value":176},"Standard",{"type":43,"tag":121,"props":178,"children":179},{},[180,189,194,199],{"type":43,"tag":153,"props":181,"children":182},{},[183],{"type":43,"tag":68,"props":184,"children":186},{"className":185},[],[187],{"type":49,"value":188},"gen4_image_turbo",{"type":43,"tag":153,"props":190,"children":191},{},[192],{"type":49,"value":193},"Fast generation",{"type":43,"tag":153,"props":195,"children":196},{},[197],{"type":49,"value":198},"2 credits",{"type":43,"tag":153,"props":200,"children":201},{},[202],{"type":49,"value":203},"Fast",{"type":43,"tag":121,"props":205,"children":206},{},[207,216,221,226],{"type":43,"tag":153,"props":208,"children":209},{},[210],{"type":43,"tag":68,"props":211,"children":213},{"className":212},[],[214],{"type":49,"value":215},"gemini_2.5_flash",{"type":43,"tag":153,"props":217,"children":218},{},[219],{"type":49,"value":220},"Google Gemini model",{"type":43,"tag":153,"props":222,"children":223},{},[224],{"type":49,"value":225},"5 credits",{"type":43,"tag":153,"props":227,"children":228},{},[229],{"type":49,"value":176},{"type":43,"tag":56,"props":231,"children":232},{},[233],{"type":43,"tag":60,"props":234,"children":235},{},[236],{"type":49,"value":237},"Model selection guidance:",{"type":43,"tag":239,"props":240,"children":241},"ul",{},[242,258],{"type":43,"tag":243,"props":244,"children":245},"li",{},[246,248,256],{"type":49,"value":247},"Default recommendation: ",{"type":43,"tag":60,"props":249,"children":250},{},[251],{"type":43,"tag":68,"props":252,"children":254},{"className":253},[],[255],{"type":49,"value":161},{"type":49,"value":257}," — best quality",{"type":43,"tag":243,"props":259,"children":260},{},[261,263,271],{"type":49,"value":262},"Budget\u002Fspeed: ",{"type":43,"tag":60,"props":264,"children":265},{},[266],{"type":43,"tag":68,"props":267,"children":269},{"className":268},[],[270],{"type":49,"value":188},{"type":49,"value":272}," — cheapest and fastest",{"type":43,"tag":106,"props":274,"children":276},{"id":275},"security",[277],{"type":49,"value":278},"Security",{"type":43,"tag":56,"props":280,"children":281},{},[282,288,290,295],{"type":43,"tag":68,"props":283,"children":285},{"className":284},[],[286],{"type":49,"value":287},"referenceImages[].uri",{"type":49,"value":289}," is ",{"type":43,"tag":60,"props":291,"children":292},{},[293],{"type":49,"value":294},"fetched server-side by the Runway API",{"type":49,"value":296}," — treat it like any outbound fetch:",{"type":43,"tag":239,"props":298,"children":299},{},[300,325,343,367],{"type":43,"tag":243,"props":301,"children":302},{},[303,316,318,323],{"type":43,"tag":60,"props":304,"children":305},{},[306,308,314],{"type":49,"value":307},"Prefer ",{"type":43,"tag":68,"props":309,"children":311},{"className":310},[],[312],{"type":49,"value":313},"runway:\u002F\u002F",{"type":49,"value":315}," URIs",{"type":49,"value":317}," from ",{"type":43,"tag":68,"props":319,"children":321},{"className":320},[],[322],{"type":49,"value":97},{"type":49,"value":324}," — scoped to your account, no arbitrary web content.",{"type":43,"tag":243,"props":326,"children":327},{},[328,333,335,341],{"type":43,"tag":60,"props":329,"children":330},{},[331],{"type":49,"value":332},"If accepting URLs from clients",{"type":49,"value":334},", validate first: require ",{"type":43,"tag":68,"props":336,"children":338},{"className":337},[],[339],{"type":49,"value":340},"https:\u002F\u002F",{"type":49,"value":342},", allowlist trusted hosts, reject private addresses. See the Express.js example below.",{"type":43,"tag":243,"props":344,"children":345},{},[346,357,359,365],{"type":43,"tag":60,"props":347,"children":348},{},[349,351],{"type":49,"value":350},"Never forward ",{"type":43,"tag":68,"props":352,"children":354},{"className":353},[],[355],{"type":49,"value":356},"req.body.referenceImages",{"type":49,"value":358}," straight into ",{"type":43,"tag":68,"props":360,"children":362},{"className":361},[],[363],{"type":49,"value":364},"textToImage.create",{"type":49,"value":366},". The SDK snippets below use raw URLs for brevity — they aren't production templates.",{"type":43,"tag":243,"props":368,"children":369},{},[370],{"type":49,"value":371},"Treat generated outputs as untrusted when piping into downstream automations — ingested references influence the result.",{"type":43,"tag":106,"props":373,"children":375},{"id":374},"endpoint-post-v1text_to_image",[376,378],{"type":49,"value":377},"Endpoint: ",{"type":43,"tag":68,"props":379,"children":381},{"className":380},[],[382],{"type":49,"value":383},"POST \u002Fv1\u002Ftext_to_image",{"type":43,"tag":385,"props":386,"children":388},"h3",{"id":387},"basic-text-to-image",[389],{"type":49,"value":390},"Basic Text-to-Image",{"type":43,"tag":392,"props":393,"children":398},"pre",{"className":394,"code":395,"language":396,"meta":397,"style":397},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Node.js SDK\nimport RunwayML from '@runwayml\u002Fsdk';\n\nconst client = new RunwayML();\n\nconst task = await client.textToImage.create({\n  model: 'gen4_image',\n  promptText: 'A serene Japanese garden with cherry blossoms and a koi pond',\n  ratio: '1280:720'\n}).waitForTaskOutput();\n\nconst imageUrl = task.output[0];\n","javascript","",[399],{"type":43,"tag":68,"props":400,"children":401},{"__ignoreMap":397},[402,414,457,467,507,515,571,603,633,660,691,699],{"type":43,"tag":403,"props":404,"children":407},"span",{"class":405,"line":406},"line",1,[408],{"type":43,"tag":403,"props":409,"children":411},{"style":410},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[412],{"type":49,"value":413},"\u002F\u002F Node.js SDK\n",{"type":43,"tag":403,"props":415,"children":417},{"class":405,"line":416},2,[418,424,430,435,441,447,452],{"type":43,"tag":403,"props":419,"children":421},{"style":420},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[422],{"type":49,"value":423},"import",{"type":43,"tag":403,"props":425,"children":427},{"style":426},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[428],{"type":49,"value":429}," RunwayML ",{"type":43,"tag":403,"props":431,"children":432},{"style":420},[433],{"type":49,"value":434},"from",{"type":43,"tag":403,"props":436,"children":438},{"style":437},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[439],{"type":49,"value":440}," '",{"type":43,"tag":403,"props":442,"children":444},{"style":443},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[445],{"type":49,"value":446},"@runwayml\u002Fsdk",{"type":43,"tag":403,"props":448,"children":449},{"style":437},[450],{"type":49,"value":451},"'",{"type":43,"tag":403,"props":453,"children":454},{"style":437},[455],{"type":49,"value":456},";\n",{"type":43,"tag":403,"props":458,"children":460},{"class":405,"line":459},3,[461],{"type":43,"tag":403,"props":462,"children":464},{"emptyLinePlaceholder":463},true,[465],{"type":49,"value":466},"\n",{"type":43,"tag":403,"props":468,"children":470},{"class":405,"line":469},4,[471,477,482,487,492,498,503],{"type":43,"tag":403,"props":472,"children":474},{"style":473},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[475],{"type":49,"value":476},"const",{"type":43,"tag":403,"props":478,"children":479},{"style":426},[480],{"type":49,"value":481}," client ",{"type":43,"tag":403,"props":483,"children":484},{"style":437},[485],{"type":49,"value":486},"=",{"type":43,"tag":403,"props":488,"children":489},{"style":437},[490],{"type":49,"value":491}," new",{"type":43,"tag":403,"props":493,"children":495},{"style":494},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[496],{"type":49,"value":497}," RunwayML",{"type":43,"tag":403,"props":499,"children":500},{"style":426},[501],{"type":49,"value":502},"()",{"type":43,"tag":403,"props":504,"children":505},{"style":437},[506],{"type":49,"value":456},{"type":43,"tag":403,"props":508,"children":510},{"class":405,"line":509},5,[511],{"type":43,"tag":403,"props":512,"children":513},{"emptyLinePlaceholder":463},[514],{"type":49,"value":466},{"type":43,"tag":403,"props":516,"children":518},{"class":405,"line":517},6,[519,523,528,532,537,542,547,552,556,561,566],{"type":43,"tag":403,"props":520,"children":521},{"style":473},[522],{"type":49,"value":476},{"type":43,"tag":403,"props":524,"children":525},{"style":426},[526],{"type":49,"value":527}," task ",{"type":43,"tag":403,"props":529,"children":530},{"style":437},[531],{"type":49,"value":486},{"type":43,"tag":403,"props":533,"children":534},{"style":420},[535],{"type":49,"value":536}," await",{"type":43,"tag":403,"props":538,"children":539},{"style":426},[540],{"type":49,"value":541}," client",{"type":43,"tag":403,"props":543,"children":544},{"style":437},[545],{"type":49,"value":546},".",{"type":43,"tag":403,"props":548,"children":549},{"style":426},[550],{"type":49,"value":551},"textToImage",{"type":43,"tag":403,"props":553,"children":554},{"style":437},[555],{"type":49,"value":546},{"type":43,"tag":403,"props":557,"children":558},{"style":494},[559],{"type":49,"value":560},"create",{"type":43,"tag":403,"props":562,"children":563},{"style":426},[564],{"type":49,"value":565},"(",{"type":43,"tag":403,"props":567,"children":568},{"style":437},[569],{"type":49,"value":570},"{\n",{"type":43,"tag":403,"props":572,"children":574},{"class":405,"line":573},7,[575,581,586,590,594,598],{"type":43,"tag":403,"props":576,"children":578},{"style":577},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[579],{"type":49,"value":580},"  model",{"type":43,"tag":403,"props":582,"children":583},{"style":437},[584],{"type":49,"value":585},":",{"type":43,"tag":403,"props":587,"children":588},{"style":437},[589],{"type":49,"value":440},{"type":43,"tag":403,"props":591,"children":592},{"style":443},[593],{"type":49,"value":161},{"type":43,"tag":403,"props":595,"children":596},{"style":437},[597],{"type":49,"value":451},{"type":43,"tag":403,"props":599,"children":600},{"style":437},[601],{"type":49,"value":602},",\n",{"type":43,"tag":403,"props":604,"children":606},{"class":405,"line":605},8,[607,612,616,620,625,629],{"type":43,"tag":403,"props":608,"children":609},{"style":577},[610],{"type":49,"value":611},"  promptText",{"type":43,"tag":403,"props":613,"children":614},{"style":437},[615],{"type":49,"value":585},{"type":43,"tag":403,"props":617,"children":618},{"style":437},[619],{"type":49,"value":440},{"type":43,"tag":403,"props":621,"children":622},{"style":443},[623],{"type":49,"value":624},"A serene Japanese garden with cherry blossoms and a koi pond",{"type":43,"tag":403,"props":626,"children":627},{"style":437},[628],{"type":49,"value":451},{"type":43,"tag":403,"props":630,"children":631},{"style":437},[632],{"type":49,"value":602},{"type":43,"tag":403,"props":634,"children":636},{"class":405,"line":635},9,[637,642,646,650,655],{"type":43,"tag":403,"props":638,"children":639},{"style":577},[640],{"type":49,"value":641},"  ratio",{"type":43,"tag":403,"props":643,"children":644},{"style":437},[645],{"type":49,"value":585},{"type":43,"tag":403,"props":647,"children":648},{"style":437},[649],{"type":49,"value":440},{"type":43,"tag":403,"props":651,"children":652},{"style":443},[653],{"type":49,"value":654},"1280:720",{"type":43,"tag":403,"props":656,"children":657},{"style":437},[658],{"type":49,"value":659},"'\n",{"type":43,"tag":403,"props":661,"children":663},{"class":405,"line":662},10,[664,669,674,678,683,687],{"type":43,"tag":403,"props":665,"children":666},{"style":437},[667],{"type":49,"value":668},"}",{"type":43,"tag":403,"props":670,"children":671},{"style":426},[672],{"type":49,"value":673},")",{"type":43,"tag":403,"props":675,"children":676},{"style":437},[677],{"type":49,"value":546},{"type":43,"tag":403,"props":679,"children":680},{"style":494},[681],{"type":49,"value":682},"waitForTaskOutput",{"type":43,"tag":403,"props":684,"children":685},{"style":426},[686],{"type":49,"value":502},{"type":43,"tag":403,"props":688,"children":689},{"style":437},[690],{"type":49,"value":456},{"type":43,"tag":403,"props":692,"children":694},{"class":405,"line":693},11,[695],{"type":43,"tag":403,"props":696,"children":697},{"emptyLinePlaceholder":463},[698],{"type":49,"value":466},{"type":43,"tag":403,"props":700,"children":702},{"class":405,"line":701},12,[703,707,712,716,721,725,730,736,741],{"type":43,"tag":403,"props":704,"children":705},{"style":473},[706],{"type":49,"value":476},{"type":43,"tag":403,"props":708,"children":709},{"style":426},[710],{"type":49,"value":711}," imageUrl ",{"type":43,"tag":403,"props":713,"children":714},{"style":437},[715],{"type":49,"value":486},{"type":43,"tag":403,"props":717,"children":718},{"style":426},[719],{"type":49,"value":720}," task",{"type":43,"tag":403,"props":722,"children":723},{"style":437},[724],{"type":49,"value":546},{"type":43,"tag":403,"props":726,"children":727},{"style":426},[728],{"type":49,"value":729},"output[",{"type":43,"tag":403,"props":731,"children":733},{"style":732},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[734],{"type":49,"value":735},"0",{"type":43,"tag":403,"props":737,"children":738},{"style":426},[739],{"type":49,"value":740},"]",{"type":43,"tag":403,"props":742,"children":743},{"style":437},[744],{"type":49,"value":456},{"type":43,"tag":392,"props":746,"children":750},{"className":747,"code":748,"language":749,"meta":397,"style":397},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Python SDK\nfrom runwayml import RunwayML\n\nclient = RunwayML()\n\ntask = client.text_to_image.create(\n    model='gen4_image',\n    prompt_text='A serene Japanese garden with cherry blossoms and a koi pond',\n    ratio='1280:720'\n).wait_for_task_output()\n\nimage_url = task.output[0]\n","python",[751],{"type":43,"tag":68,"props":752,"children":753},{"__ignoreMap":397},[754,762,770,777,785,792,800,808,816,824,832,839],{"type":43,"tag":403,"props":755,"children":756},{"class":405,"line":406},[757],{"type":43,"tag":403,"props":758,"children":759},{},[760],{"type":49,"value":761},"# Python SDK\n",{"type":43,"tag":403,"props":763,"children":764},{"class":405,"line":416},[765],{"type":43,"tag":403,"props":766,"children":767},{},[768],{"type":49,"value":769},"from runwayml import RunwayML\n",{"type":43,"tag":403,"props":771,"children":772},{"class":405,"line":459},[773],{"type":43,"tag":403,"props":774,"children":775},{"emptyLinePlaceholder":463},[776],{"type":49,"value":466},{"type":43,"tag":403,"props":778,"children":779},{"class":405,"line":469},[780],{"type":43,"tag":403,"props":781,"children":782},{},[783],{"type":49,"value":784},"client = RunwayML()\n",{"type":43,"tag":403,"props":786,"children":787},{"class":405,"line":509},[788],{"type":43,"tag":403,"props":789,"children":790},{"emptyLinePlaceholder":463},[791],{"type":49,"value":466},{"type":43,"tag":403,"props":793,"children":794},{"class":405,"line":517},[795],{"type":43,"tag":403,"props":796,"children":797},{},[798],{"type":49,"value":799},"task = client.text_to_image.create(\n",{"type":43,"tag":403,"props":801,"children":802},{"class":405,"line":573},[803],{"type":43,"tag":403,"props":804,"children":805},{},[806],{"type":49,"value":807},"    model='gen4_image',\n",{"type":43,"tag":403,"props":809,"children":810},{"class":405,"line":605},[811],{"type":43,"tag":403,"props":812,"children":813},{},[814],{"type":49,"value":815},"    prompt_text='A serene Japanese garden with cherry blossoms and a koi pond',\n",{"type":43,"tag":403,"props":817,"children":818},{"class":405,"line":635},[819],{"type":43,"tag":403,"props":820,"children":821},{},[822],{"type":49,"value":823},"    ratio='1280:720'\n",{"type":43,"tag":403,"props":825,"children":826},{"class":405,"line":662},[827],{"type":43,"tag":403,"props":828,"children":829},{},[830],{"type":49,"value":831},").wait_for_task_output()\n",{"type":43,"tag":403,"props":833,"children":834},{"class":405,"line":693},[835],{"type":43,"tag":403,"props":836,"children":837},{"emptyLinePlaceholder":463},[838],{"type":49,"value":466},{"type":43,"tag":403,"props":840,"children":841},{"class":405,"line":701},[842],{"type":43,"tag":403,"props":843,"children":844},{},[845],{"type":49,"value":846},"image_url = task.output[0]\n",{"type":43,"tag":385,"props":848,"children":850},{"id":849},"with-reference-images",[851],{"type":49,"value":852},"With Reference Images",{"type":43,"tag":56,"props":854,"children":855},{},[856,858,864],{"type":49,"value":857},"Reference images let you guide the generation with visual references. Use ",{"type":43,"tag":68,"props":859,"children":861},{"className":860},[],[862],{"type":49,"value":863},"@Tag",{"type":49,"value":865}," syntax in the prompt to reference specific images.",{"type":43,"tag":56,"props":867,"children":868},{},[869,874,876,881,883,888],{"type":43,"tag":60,"props":870,"children":871},{},[872],{"type":49,"value":873},"Recommended:",{"type":49,"value":875}," upload via ",{"type":43,"tag":68,"props":877,"children":879},{"className":878},[],[880],{"type":49,"value":97},{"type":49,"value":882}," and pass the returned ",{"type":43,"tag":68,"props":884,"children":886},{"className":885},[],[887],{"type":49,"value":313},{"type":49,"value":889}," URI.",{"type":43,"tag":392,"props":891,"children":893},{"className":394,"code":892,"language":396,"meta":397,"style":397},"import fs from 'fs';\n\nconst refUpload = await client.uploads.createEphemeral(\n  fs.createReadStream('\u002Fpath\u002Fto\u002Freference.jpg')\n);\n\nconst task = await client.textToImage.create({\n  model: 'gen4_image',\n  promptText: 'A portrait in the style of @Reference',\n  referenceImages: [\n    { uri: refUpload.runwayUri, tag: 'Reference' }\n  ],\n  ratio: '1280:720'\n}).waitForTaskOutput();\n",[894],{"type":43,"tag":68,"props":895,"children":896},{"__ignoreMap":397},[897,930,937,984,1023,1034,1041,1088,1115,1143,1160,1223,1235,1259],{"type":43,"tag":403,"props":898,"children":899},{"class":405,"line":406},[900,904,909,913,917,922,926],{"type":43,"tag":403,"props":901,"children":902},{"style":420},[903],{"type":49,"value":423},{"type":43,"tag":403,"props":905,"children":906},{"style":426},[907],{"type":49,"value":908}," fs ",{"type":43,"tag":403,"props":910,"children":911},{"style":420},[912],{"type":49,"value":434},{"type":43,"tag":403,"props":914,"children":915},{"style":437},[916],{"type":49,"value":440},{"type":43,"tag":403,"props":918,"children":919},{"style":443},[920],{"type":49,"value":921},"fs",{"type":43,"tag":403,"props":923,"children":924},{"style":437},[925],{"type":49,"value":451},{"type":43,"tag":403,"props":927,"children":928},{"style":437},[929],{"type":49,"value":456},{"type":43,"tag":403,"props":931,"children":932},{"class":405,"line":416},[933],{"type":43,"tag":403,"props":934,"children":935},{"emptyLinePlaceholder":463},[936],{"type":49,"value":466},{"type":43,"tag":403,"props":938,"children":939},{"class":405,"line":459},[940,944,949,953,957,961,965,970,974,979],{"type":43,"tag":403,"props":941,"children":942},{"style":473},[943],{"type":49,"value":476},{"type":43,"tag":403,"props":945,"children":946},{"style":426},[947],{"type":49,"value":948}," refUpload ",{"type":43,"tag":403,"props":950,"children":951},{"style":437},[952],{"type":49,"value":486},{"type":43,"tag":403,"props":954,"children":955},{"style":420},[956],{"type":49,"value":536},{"type":43,"tag":403,"props":958,"children":959},{"style":426},[960],{"type":49,"value":541},{"type":43,"tag":403,"props":962,"children":963},{"style":437},[964],{"type":49,"value":546},{"type":43,"tag":403,"props":966,"children":967},{"style":426},[968],{"type":49,"value":969},"uploads",{"type":43,"tag":403,"props":971,"children":972},{"style":437},[973],{"type":49,"value":546},{"type":43,"tag":403,"props":975,"children":976},{"style":494},[977],{"type":49,"value":978},"createEphemeral",{"type":43,"tag":403,"props":980,"children":981},{"style":426},[982],{"type":49,"value":983},"(\n",{"type":43,"tag":403,"props":985,"children":986},{"class":405,"line":469},[987,992,996,1001,1005,1009,1014,1018],{"type":43,"tag":403,"props":988,"children":989},{"style":426},[990],{"type":49,"value":991},"  fs",{"type":43,"tag":403,"props":993,"children":994},{"style":437},[995],{"type":49,"value":546},{"type":43,"tag":403,"props":997,"children":998},{"style":494},[999],{"type":49,"value":1000},"createReadStream",{"type":43,"tag":403,"props":1002,"children":1003},{"style":426},[1004],{"type":49,"value":565},{"type":43,"tag":403,"props":1006,"children":1007},{"style":437},[1008],{"type":49,"value":451},{"type":43,"tag":403,"props":1010,"children":1011},{"style":443},[1012],{"type":49,"value":1013},"\u002Fpath\u002Fto\u002Freference.jpg",{"type":43,"tag":403,"props":1015,"children":1016},{"style":437},[1017],{"type":49,"value":451},{"type":43,"tag":403,"props":1019,"children":1020},{"style":426},[1021],{"type":49,"value":1022},")\n",{"type":43,"tag":403,"props":1024,"children":1025},{"class":405,"line":509},[1026,1030],{"type":43,"tag":403,"props":1027,"children":1028},{"style":426},[1029],{"type":49,"value":673},{"type":43,"tag":403,"props":1031,"children":1032},{"style":437},[1033],{"type":49,"value":456},{"type":43,"tag":403,"props":1035,"children":1036},{"class":405,"line":517},[1037],{"type":43,"tag":403,"props":1038,"children":1039},{"emptyLinePlaceholder":463},[1040],{"type":49,"value":466},{"type":43,"tag":403,"props":1042,"children":1043},{"class":405,"line":573},[1044,1048,1052,1056,1060,1064,1068,1072,1076,1080,1084],{"type":43,"tag":403,"props":1045,"children":1046},{"style":473},[1047],{"type":49,"value":476},{"type":43,"tag":403,"props":1049,"children":1050},{"style":426},[1051],{"type":49,"value":527},{"type":43,"tag":403,"props":1053,"children":1054},{"style":437},[1055],{"type":49,"value":486},{"type":43,"tag":403,"props":1057,"children":1058},{"style":420},[1059],{"type":49,"value":536},{"type":43,"tag":403,"props":1061,"children":1062},{"style":426},[1063],{"type":49,"value":541},{"type":43,"tag":403,"props":1065,"children":1066},{"style":437},[1067],{"type":49,"value":546},{"type":43,"tag":403,"props":1069,"children":1070},{"style":426},[1071],{"type":49,"value":551},{"type":43,"tag":403,"props":1073,"children":1074},{"style":437},[1075],{"type":49,"value":546},{"type":43,"tag":403,"props":1077,"children":1078},{"style":494},[1079],{"type":49,"value":560},{"type":43,"tag":403,"props":1081,"children":1082},{"style":426},[1083],{"type":49,"value":565},{"type":43,"tag":403,"props":1085,"children":1086},{"style":437},[1087],{"type":49,"value":570},{"type":43,"tag":403,"props":1089,"children":1090},{"class":405,"line":605},[1091,1095,1099,1103,1107,1111],{"type":43,"tag":403,"props":1092,"children":1093},{"style":577},[1094],{"type":49,"value":580},{"type":43,"tag":403,"props":1096,"children":1097},{"style":437},[1098],{"type":49,"value":585},{"type":43,"tag":403,"props":1100,"children":1101},{"style":437},[1102],{"type":49,"value":440},{"type":43,"tag":403,"props":1104,"children":1105},{"style":443},[1106],{"type":49,"value":161},{"type":43,"tag":403,"props":1108,"children":1109},{"style":437},[1110],{"type":49,"value":451},{"type":43,"tag":403,"props":1112,"children":1113},{"style":437},[1114],{"type":49,"value":602},{"type":43,"tag":403,"props":1116,"children":1117},{"class":405,"line":635},[1118,1122,1126,1130,1135,1139],{"type":43,"tag":403,"props":1119,"children":1120},{"style":577},[1121],{"type":49,"value":611},{"type":43,"tag":403,"props":1123,"children":1124},{"style":437},[1125],{"type":49,"value":585},{"type":43,"tag":403,"props":1127,"children":1128},{"style":437},[1129],{"type":49,"value":440},{"type":43,"tag":403,"props":1131,"children":1132},{"style":443},[1133],{"type":49,"value":1134},"A portrait in the style of @Reference",{"type":43,"tag":403,"props":1136,"children":1137},{"style":437},[1138],{"type":49,"value":451},{"type":43,"tag":403,"props":1140,"children":1141},{"style":437},[1142],{"type":49,"value":602},{"type":43,"tag":403,"props":1144,"children":1145},{"class":405,"line":662},[1146,1151,1155],{"type":43,"tag":403,"props":1147,"children":1148},{"style":577},[1149],{"type":49,"value":1150},"  referenceImages",{"type":43,"tag":403,"props":1152,"children":1153},{"style":437},[1154],{"type":49,"value":585},{"type":43,"tag":403,"props":1156,"children":1157},{"style":426},[1158],{"type":49,"value":1159}," [\n",{"type":43,"tag":403,"props":1161,"children":1162},{"class":405,"line":693},[1163,1168,1173,1177,1182,1186,1191,1196,1201,1205,1209,1214,1218],{"type":43,"tag":403,"props":1164,"children":1165},{"style":437},[1166],{"type":49,"value":1167},"    {",{"type":43,"tag":403,"props":1169,"children":1170},{"style":577},[1171],{"type":49,"value":1172}," uri",{"type":43,"tag":403,"props":1174,"children":1175},{"style":437},[1176],{"type":49,"value":585},{"type":43,"tag":403,"props":1178,"children":1179},{"style":426},[1180],{"type":49,"value":1181}," refUpload",{"type":43,"tag":403,"props":1183,"children":1184},{"style":437},[1185],{"type":49,"value":546},{"type":43,"tag":403,"props":1187,"children":1188},{"style":426},[1189],{"type":49,"value":1190},"runwayUri",{"type":43,"tag":403,"props":1192,"children":1193},{"style":437},[1194],{"type":49,"value":1195},",",{"type":43,"tag":403,"props":1197,"children":1198},{"style":577},[1199],{"type":49,"value":1200}," tag",{"type":43,"tag":403,"props":1202,"children":1203},{"style":437},[1204],{"type":49,"value":585},{"type":43,"tag":403,"props":1206,"children":1207},{"style":437},[1208],{"type":49,"value":440},{"type":43,"tag":403,"props":1210,"children":1211},{"style":443},[1212],{"type":49,"value":1213},"Reference",{"type":43,"tag":403,"props":1215,"children":1216},{"style":437},[1217],{"type":49,"value":451},{"type":43,"tag":403,"props":1219,"children":1220},{"style":437},[1221],{"type":49,"value":1222}," }\n",{"type":43,"tag":403,"props":1224,"children":1225},{"class":405,"line":701},[1226,1231],{"type":43,"tag":403,"props":1227,"children":1228},{"style":426},[1229],{"type":49,"value":1230},"  ]",{"type":43,"tag":403,"props":1232,"children":1233},{"style":437},[1234],{"type":49,"value":602},{"type":43,"tag":403,"props":1236,"children":1238},{"class":405,"line":1237},13,[1239,1243,1247,1251,1255],{"type":43,"tag":403,"props":1240,"children":1241},{"style":577},[1242],{"type":49,"value":641},{"type":43,"tag":403,"props":1244,"children":1245},{"style":437},[1246],{"type":49,"value":585},{"type":43,"tag":403,"props":1248,"children":1249},{"style":437},[1250],{"type":49,"value":440},{"type":43,"tag":403,"props":1252,"children":1253},{"style":443},[1254],{"type":49,"value":654},{"type":43,"tag":403,"props":1256,"children":1257},{"style":437},[1258],{"type":49,"value":659},{"type":43,"tag":403,"props":1260,"children":1262},{"class":405,"line":1261},14,[1263,1267,1271,1275,1279,1283],{"type":43,"tag":403,"props":1264,"children":1265},{"style":437},[1266],{"type":49,"value":668},{"type":43,"tag":403,"props":1268,"children":1269},{"style":426},[1270],{"type":49,"value":673},{"type":43,"tag":403,"props":1272,"children":1273},{"style":437},[1274],{"type":49,"value":546},{"type":43,"tag":403,"props":1276,"children":1277},{"style":494},[1278],{"type":49,"value":682},{"type":43,"tag":403,"props":1280,"children":1281},{"style":426},[1282],{"type":49,"value":502},{"type":43,"tag":403,"props":1284,"children":1285},{"style":437},[1286],{"type":49,"value":456},{"type":43,"tag":56,"props":1288,"children":1289},{},[1290],{"type":49,"value":1291},"External URLs also work — only pass origins you control (see Security):",{"type":43,"tag":392,"props":1293,"children":1295},{"className":394,"code":1294,"language":396,"meta":397,"style":397},"const task = await client.textToImage.create({\n  model: 'gen4_image',\n  promptText: '@EiffelTower painted in the style of @StarryNight',\n  referenceImages: [\n    { uri: 'https:\u002F\u002Fcdn.yourapp.com\u002Feiffel-tower.jpg', tag: 'EiffelTower' },\n    { uri: 'https:\u002F\u002Fcdn.yourapp.com\u002Fstarry-night.jpg', tag: 'StarryNight' }\n  ],\n  ratio: '1280:720'\n}).waitForTaskOutput();\n",[1296],{"type":43,"tag":68,"props":1297,"children":1298},{"__ignoreMap":397},[1299,1346,1373,1401,1416,1474,1531,1542,1565],{"type":43,"tag":403,"props":1300,"children":1301},{"class":405,"line":406},[1302,1306,1310,1314,1318,1322,1326,1330,1334,1338,1342],{"type":43,"tag":403,"props":1303,"children":1304},{"style":473},[1305],{"type":49,"value":476},{"type":43,"tag":403,"props":1307,"children":1308},{"style":426},[1309],{"type":49,"value":527},{"type":43,"tag":403,"props":1311,"children":1312},{"style":437},[1313],{"type":49,"value":486},{"type":43,"tag":403,"props":1315,"children":1316},{"style":420},[1317],{"type":49,"value":536},{"type":43,"tag":403,"props":1319,"children":1320},{"style":426},[1321],{"type":49,"value":541},{"type":43,"tag":403,"props":1323,"children":1324},{"style":437},[1325],{"type":49,"value":546},{"type":43,"tag":403,"props":1327,"children":1328},{"style":426},[1329],{"type":49,"value":551},{"type":43,"tag":403,"props":1331,"children":1332},{"style":437},[1333],{"type":49,"value":546},{"type":43,"tag":403,"props":1335,"children":1336},{"style":494},[1337],{"type":49,"value":560},{"type":43,"tag":403,"props":1339,"children":1340},{"style":426},[1341],{"type":49,"value":565},{"type":43,"tag":403,"props":1343,"children":1344},{"style":437},[1345],{"type":49,"value":570},{"type":43,"tag":403,"props":1347,"children":1348},{"class":405,"line":416},[1349,1353,1357,1361,1365,1369],{"type":43,"tag":403,"props":1350,"children":1351},{"style":577},[1352],{"type":49,"value":580},{"type":43,"tag":403,"props":1354,"children":1355},{"style":437},[1356],{"type":49,"value":585},{"type":43,"tag":403,"props":1358,"children":1359},{"style":437},[1360],{"type":49,"value":440},{"type":43,"tag":403,"props":1362,"children":1363},{"style":443},[1364],{"type":49,"value":161},{"type":43,"tag":403,"props":1366,"children":1367},{"style":437},[1368],{"type":49,"value":451},{"type":43,"tag":403,"props":1370,"children":1371},{"style":437},[1372],{"type":49,"value":602},{"type":43,"tag":403,"props":1374,"children":1375},{"class":405,"line":459},[1376,1380,1384,1388,1393,1397],{"type":43,"tag":403,"props":1377,"children":1378},{"style":577},[1379],{"type":49,"value":611},{"type":43,"tag":403,"props":1381,"children":1382},{"style":437},[1383],{"type":49,"value":585},{"type":43,"tag":403,"props":1385,"children":1386},{"style":437},[1387],{"type":49,"value":440},{"type":43,"tag":403,"props":1389,"children":1390},{"style":443},[1391],{"type":49,"value":1392},"@EiffelTower painted in the style of @StarryNight",{"type":43,"tag":403,"props":1394,"children":1395},{"style":437},[1396],{"type":49,"value":451},{"type":43,"tag":403,"props":1398,"children":1399},{"style":437},[1400],{"type":49,"value":602},{"type":43,"tag":403,"props":1402,"children":1403},{"class":405,"line":469},[1404,1408,1412],{"type":43,"tag":403,"props":1405,"children":1406},{"style":577},[1407],{"type":49,"value":1150},{"type":43,"tag":403,"props":1409,"children":1410},{"style":437},[1411],{"type":49,"value":585},{"type":43,"tag":403,"props":1413,"children":1414},{"style":426},[1415],{"type":49,"value":1159},{"type":43,"tag":403,"props":1417,"children":1418},{"class":405,"line":509},[1419,1423,1427,1431,1435,1440,1444,1448,1452,1456,1460,1465,1469],{"type":43,"tag":403,"props":1420,"children":1421},{"style":437},[1422],{"type":49,"value":1167},{"type":43,"tag":403,"props":1424,"children":1425},{"style":577},[1426],{"type":49,"value":1172},{"type":43,"tag":403,"props":1428,"children":1429},{"style":437},[1430],{"type":49,"value":585},{"type":43,"tag":403,"props":1432,"children":1433},{"style":437},[1434],{"type":49,"value":440},{"type":43,"tag":403,"props":1436,"children":1437},{"style":443},[1438],{"type":49,"value":1439},"https:\u002F\u002Fcdn.yourapp.com\u002Feiffel-tower.jpg",{"type":43,"tag":403,"props":1441,"children":1442},{"style":437},[1443],{"type":49,"value":451},{"type":43,"tag":403,"props":1445,"children":1446},{"style":437},[1447],{"type":49,"value":1195},{"type":43,"tag":403,"props":1449,"children":1450},{"style":577},[1451],{"type":49,"value":1200},{"type":43,"tag":403,"props":1453,"children":1454},{"style":437},[1455],{"type":49,"value":585},{"type":43,"tag":403,"props":1457,"children":1458},{"style":437},[1459],{"type":49,"value":440},{"type":43,"tag":403,"props":1461,"children":1462},{"style":443},[1463],{"type":49,"value":1464},"EiffelTower",{"type":43,"tag":403,"props":1466,"children":1467},{"style":437},[1468],{"type":49,"value":451},{"type":43,"tag":403,"props":1470,"children":1471},{"style":437},[1472],{"type":49,"value":1473}," },\n",{"type":43,"tag":403,"props":1475,"children":1476},{"class":405,"line":517},[1477,1481,1485,1489,1493,1498,1502,1506,1510,1514,1518,1523,1527],{"type":43,"tag":403,"props":1478,"children":1479},{"style":437},[1480],{"type":49,"value":1167},{"type":43,"tag":403,"props":1482,"children":1483},{"style":577},[1484],{"type":49,"value":1172},{"type":43,"tag":403,"props":1486,"children":1487},{"style":437},[1488],{"type":49,"value":585},{"type":43,"tag":403,"props":1490,"children":1491},{"style":437},[1492],{"type":49,"value":440},{"type":43,"tag":403,"props":1494,"children":1495},{"style":443},[1496],{"type":49,"value":1497},"https:\u002F\u002Fcdn.yourapp.com\u002Fstarry-night.jpg",{"type":43,"tag":403,"props":1499,"children":1500},{"style":437},[1501],{"type":49,"value":451},{"type":43,"tag":403,"props":1503,"children":1504},{"style":437},[1505],{"type":49,"value":1195},{"type":43,"tag":403,"props":1507,"children":1508},{"style":577},[1509],{"type":49,"value":1200},{"type":43,"tag":403,"props":1511,"children":1512},{"style":437},[1513],{"type":49,"value":585},{"type":43,"tag":403,"props":1515,"children":1516},{"style":437},[1517],{"type":49,"value":440},{"type":43,"tag":403,"props":1519,"children":1520},{"style":443},[1521],{"type":49,"value":1522},"StarryNight",{"type":43,"tag":403,"props":1524,"children":1525},{"style":437},[1526],{"type":49,"value":451},{"type":43,"tag":403,"props":1528,"children":1529},{"style":437},[1530],{"type":49,"value":1222},{"type":43,"tag":403,"props":1532,"children":1533},{"class":405,"line":573},[1534,1538],{"type":43,"tag":403,"props":1535,"children":1536},{"style":426},[1537],{"type":49,"value":1230},{"type":43,"tag":403,"props":1539,"children":1540},{"style":437},[1541],{"type":49,"value":602},{"type":43,"tag":403,"props":1543,"children":1544},{"class":405,"line":605},[1545,1549,1553,1557,1561],{"type":43,"tag":403,"props":1546,"children":1547},{"style":577},[1548],{"type":49,"value":641},{"type":43,"tag":403,"props":1550,"children":1551},{"style":437},[1552],{"type":49,"value":585},{"type":43,"tag":403,"props":1554,"children":1555},{"style":437},[1556],{"type":49,"value":440},{"type":43,"tag":403,"props":1558,"children":1559},{"style":443},[1560],{"type":49,"value":654},{"type":43,"tag":403,"props":1562,"children":1563},{"style":437},[1564],{"type":49,"value":659},{"type":43,"tag":403,"props":1566,"children":1567},{"class":405,"line":635},[1568,1572,1576,1580,1584,1588],{"type":43,"tag":403,"props":1569,"children":1570},{"style":437},[1571],{"type":49,"value":668},{"type":43,"tag":403,"props":1573,"children":1574},{"style":426},[1575],{"type":49,"value":673},{"type":43,"tag":403,"props":1577,"children":1578},{"style":437},[1579],{"type":49,"value":546},{"type":43,"tag":403,"props":1581,"children":1582},{"style":494},[1583],{"type":49,"value":682},{"type":43,"tag":403,"props":1585,"children":1586},{"style":426},[1587],{"type":49,"value":502},{"type":43,"tag":403,"props":1589,"children":1590},{"style":437},[1591],{"type":49,"value":456},{"type":43,"tag":392,"props":1593,"children":1595},{"className":747,"code":1594,"language":749,"meta":397,"style":397},"task = client.text_to_image.create(\n    model='gen4_image',\n    prompt_text='@EiffelTower painted in the style of @StarryNight',\n    reference_images=[\n        {\"uri\": \"https:\u002F\u002Fcdn.yourapp.com\u002Feiffel-tower.jpg\", \"tag\": \"EiffelTower\"},\n        {\"uri\": \"https:\u002F\u002Fcdn.yourapp.com\u002Fstarry-night.jpg\", \"tag\": \"StarryNight\"}\n    ],\n    ratio='1280:720'\n).wait_for_task_output()\n",[1596],{"type":43,"tag":68,"props":1597,"children":1598},{"__ignoreMap":397},[1599,1606,1613,1621,1629,1637,1645,1653,1660],{"type":43,"tag":403,"props":1600,"children":1601},{"class":405,"line":406},[1602],{"type":43,"tag":403,"props":1603,"children":1604},{},[1605],{"type":49,"value":799},{"type":43,"tag":403,"props":1607,"children":1608},{"class":405,"line":416},[1609],{"type":43,"tag":403,"props":1610,"children":1611},{},[1612],{"type":49,"value":807},{"type":43,"tag":403,"props":1614,"children":1615},{"class":405,"line":459},[1616],{"type":43,"tag":403,"props":1617,"children":1618},{},[1619],{"type":49,"value":1620},"    prompt_text='@EiffelTower painted in the style of @StarryNight',\n",{"type":43,"tag":403,"props":1622,"children":1623},{"class":405,"line":469},[1624],{"type":43,"tag":403,"props":1625,"children":1626},{},[1627],{"type":49,"value":1628},"    reference_images=[\n",{"type":43,"tag":403,"props":1630,"children":1631},{"class":405,"line":509},[1632],{"type":43,"tag":403,"props":1633,"children":1634},{},[1635],{"type":49,"value":1636},"        {\"uri\": \"https:\u002F\u002Fcdn.yourapp.com\u002Feiffel-tower.jpg\", \"tag\": \"EiffelTower\"},\n",{"type":43,"tag":403,"props":1638,"children":1639},{"class":405,"line":517},[1640],{"type":43,"tag":403,"props":1641,"children":1642},{},[1643],{"type":49,"value":1644},"        {\"uri\": \"https:\u002F\u002Fcdn.yourapp.com\u002Fstarry-night.jpg\", \"tag\": \"StarryNight\"}\n",{"type":43,"tag":403,"props":1646,"children":1647},{"class":405,"line":573},[1648],{"type":43,"tag":403,"props":1649,"children":1650},{},[1651],{"type":49,"value":1652},"    ],\n",{"type":43,"tag":403,"props":1654,"children":1655},{"class":405,"line":605},[1656],{"type":43,"tag":403,"props":1657,"children":1658},{},[1659],{"type":49,"value":823},{"type":43,"tag":403,"props":1661,"children":1662},{"class":405,"line":635},[1663],{"type":43,"tag":403,"props":1664,"children":1665},{},[1666],{"type":49,"value":831},{"type":43,"tag":106,"props":1668,"children":1670},{"id":1669},"common-parameters",[1671],{"type":49,"value":1672},"Common Parameters",{"type":43,"tag":113,"props":1674,"children":1675},{},[1676,1697],{"type":43,"tag":117,"props":1677,"children":1678},{},[1679],{"type":43,"tag":121,"props":1680,"children":1681},{},[1682,1687,1692],{"type":43,"tag":125,"props":1683,"children":1684},{},[1685],{"type":49,"value":1686},"Parameter",{"type":43,"tag":125,"props":1688,"children":1689},{},[1690],{"type":49,"value":1691},"Type",{"type":43,"tag":125,"props":1693,"children":1694},{},[1695],{"type":49,"value":1696},"Description",{"type":43,"tag":146,"props":1698,"children":1699},{},[1700,1722,1743,1785],{"type":43,"tag":121,"props":1701,"children":1702},{},[1703,1712,1717],{"type":43,"tag":153,"props":1704,"children":1705},{},[1706],{"type":43,"tag":68,"props":1707,"children":1709},{"className":1708},[],[1710],{"type":49,"value":1711},"model",{"type":43,"tag":153,"props":1713,"children":1714},{},[1715],{"type":49,"value":1716},"string",{"type":43,"tag":153,"props":1718,"children":1719},{},[1720],{"type":49,"value":1721},"Model ID (required)",{"type":43,"tag":121,"props":1723,"children":1724},{},[1725,1734,1738],{"type":43,"tag":153,"props":1726,"children":1727},{},[1728],{"type":43,"tag":68,"props":1729,"children":1731},{"className":1730},[],[1732],{"type":49,"value":1733},"promptText",{"type":43,"tag":153,"props":1735,"children":1736},{},[1737],{"type":49,"value":1716},{"type":43,"tag":153,"props":1739,"children":1740},{},[1741],{"type":49,"value":1742},"Text description of the image (required)",{"type":43,"tag":121,"props":1744,"children":1745},{},[1746,1755,1759],{"type":43,"tag":153,"props":1747,"children":1748},{},[1749],{"type":43,"tag":68,"props":1750,"children":1752},{"className":1751},[],[1753],{"type":49,"value":1754},"ratio",{"type":43,"tag":153,"props":1756,"children":1757},{},[1758],{"type":49,"value":1716},{"type":43,"tag":153,"props":1760,"children":1761},{},[1762,1764,1770,1772,1778,1779],{"type":49,"value":1763},"Aspect ratio, e.g. ",{"type":43,"tag":68,"props":1765,"children":1767},{"className":1766},[],[1768],{"type":49,"value":1769},"'1280:720'",{"type":49,"value":1771},", ",{"type":43,"tag":68,"props":1773,"children":1775},{"className":1774},[],[1776],{"type":49,"value":1777},"'720:1280'",{"type":49,"value":1771},{"type":43,"tag":68,"props":1780,"children":1782},{"className":1781},[],[1783],{"type":49,"value":1784},"'1080:1080'",{"type":43,"tag":121,"props":1786,"children":1787},{},[1788,1797,1802],{"type":43,"tag":153,"props":1789,"children":1790},{},[1791],{"type":43,"tag":68,"props":1792,"children":1794},{"className":1793},[],[1795],{"type":49,"value":1796},"referenceImages",{"type":43,"tag":153,"props":1798,"children":1799},{},[1800],{"type":49,"value":1801},"array",{"type":43,"tag":153,"props":1803,"children":1804},{},[1805,1807,1813],{"type":49,"value":1806},"Optional. Array of ",{"type":43,"tag":68,"props":1808,"children":1810},{"className":1809},[],[1811],{"type":49,"value":1812},"{ uri, tag }",{"type":49,"value":1814}," objects for visual guidance",{"type":43,"tag":106,"props":1816,"children":1818},{"id":1817},"integration-pattern",[1819],{"type":49,"value":1820},"Integration Pattern",{"type":43,"tag":1822,"props":1823,"children":1824},"ol",{},[1825,1849,1859,1869],{"type":43,"tag":243,"props":1826,"children":1827},{},[1828,1833,1835,1840,1842,1847],{"type":43,"tag":60,"props":1829,"children":1830},{},[1831],{"type":49,"value":1832},"Prefer uploads over URLs",{"type":49,"value":1834}," — Default to ",{"type":43,"tag":68,"props":1836,"children":1838},{"className":1837},[],[1839],{"type":49,"value":97},{"type":49,"value":1841}," so inputs are ",{"type":43,"tag":68,"props":1843,"children":1845},{"className":1844},[],[1846],{"type":49,"value":313},{"type":49,"value":1848}," URIs. External URLs only from origins you control (see Security).",{"type":43,"tag":243,"props":1850,"children":1851},{},[1852,1857],{"type":43,"tag":60,"props":1853,"children":1854},{},[1855],{"type":49,"value":1856},"Write the server-side handler",{"type":49,"value":1858}," — Create an API route or server function.",{"type":43,"tag":243,"props":1860,"children":1861},{},[1862,1867],{"type":43,"tag":60,"props":1863,"children":1864},{},[1865],{"type":49,"value":1866},"Handle the output",{"type":49,"value":1868}," — Download and store the image, don't serve signed URLs to clients.",{"type":43,"tag":243,"props":1870,"children":1871},{},[1872,1877],{"type":43,"tag":60,"props":1873,"children":1874},{},[1875],{"type":49,"value":1876},"Add error handling",{"type":49,"value":1878}," — Wrap in try\u002Fcatch.",{"type":43,"tag":385,"props":1880,"children":1882},{"id":1881},"example-expressjs-api-route",[1883],{"type":49,"value":1884},"Example: Express.js API Route",{"type":43,"tag":392,"props":1886,"children":1888},{"className":394,"code":1887,"language":396,"meta":397,"style":397},"import RunwayML from '@runwayml\u002Fsdk';\nimport express from 'express';\n\nconst client = new RunwayML();\nconst app = express();\napp.use(express.json());\n\n\u002F\u002F `runway:\u002F\u002F` URIs bypass this check; external URLs must match the allowlist.\nconst ALLOWED_MEDIA_HOSTS = new Set(['cdn.yourapp.com', 'uploads.yourapp.com']);\n\nfunction validateReferenceImages(refs) {\n  if (!Array.isArray(refs)) throw new Error('referenceImages must be an array');\n  return refs.map(({ uri, tag }) => {\n    if (typeof uri !== 'string' || typeof tag !== 'string') {\n      throw new Error('each reference needs a uri and tag');\n    }\n    if (uri.startsWith('runway:\u002F\u002F')) return { uri, tag };\n    const u = new URL(uri);\n    if (u.protocol !== 'https:') throw new Error('https required');\n    if (!ALLOWED_MEDIA_HOSTS.has(u.hostname)) throw new Error('untrusted media host');\n    return { uri: u.toString(), tag };\n  });\n}\n\napp.post('\u002Fapi\u002Fgenerate-image', async (req, res) => {\n  try {\n    const { prompt, model = 'gen4_image', ratio = '1280:720', referenceImages } = req.body;\n\n    const task = await client.textToImage.create({\n      model,\n      promptText: prompt,\n      ratio,\n      ...(referenceImages && { referenceImages: validateReferenceImages(referenceImages) })\n    }).waitForTaskOutput();\n\n    res.json({ imageUrl: task.output[0] });\n  } catch (error) {\n    console.error('Image generation failed:', error);\n    res.status(400).json({ error: error.message });\n  }\n});\n",[1889],{"type":43,"tag":68,"props":1890,"children":1891},{"__ignoreMap":397},[1892,1923,1956,1963,1994,2023,2063,2070,2078,2147,2154,2186,2270,2327,2404,2445,2454,2527,2571,2655,2743,2793,2810,2819,2827,2900,2913,3016,3024,3072,3085,3106,3119,3177,3206,3214,3288,3318,3369,3448,3457],{"type":43,"tag":403,"props":1893,"children":1894},{"class":405,"line":406},[1895,1899,1903,1907,1911,1915,1919],{"type":43,"tag":403,"props":1896,"children":1897},{"style":420},[1898],{"type":49,"value":423},{"type":43,"tag":403,"props":1900,"children":1901},{"style":426},[1902],{"type":49,"value":429},{"type":43,"tag":403,"props":1904,"children":1905},{"style":420},[1906],{"type":49,"value":434},{"type":43,"tag":403,"props":1908,"children":1909},{"style":437},[1910],{"type":49,"value":440},{"type":43,"tag":403,"props":1912,"children":1913},{"style":443},[1914],{"type":49,"value":446},{"type":43,"tag":403,"props":1916,"children":1917},{"style":437},[1918],{"type":49,"value":451},{"type":43,"tag":403,"props":1920,"children":1921},{"style":437},[1922],{"type":49,"value":456},{"type":43,"tag":403,"props":1924,"children":1925},{"class":405,"line":416},[1926,1930,1935,1939,1943,1948,1952],{"type":43,"tag":403,"props":1927,"children":1928},{"style":420},[1929],{"type":49,"value":423},{"type":43,"tag":403,"props":1931,"children":1932},{"style":426},[1933],{"type":49,"value":1934}," express ",{"type":43,"tag":403,"props":1936,"children":1937},{"style":420},[1938],{"type":49,"value":434},{"type":43,"tag":403,"props":1940,"children":1941},{"style":437},[1942],{"type":49,"value":440},{"type":43,"tag":403,"props":1944,"children":1945},{"style":443},[1946],{"type":49,"value":1947},"express",{"type":43,"tag":403,"props":1949,"children":1950},{"style":437},[1951],{"type":49,"value":451},{"type":43,"tag":403,"props":1953,"children":1954},{"style":437},[1955],{"type":49,"value":456},{"type":43,"tag":403,"props":1957,"children":1958},{"class":405,"line":459},[1959],{"type":43,"tag":403,"props":1960,"children":1961},{"emptyLinePlaceholder":463},[1962],{"type":49,"value":466},{"type":43,"tag":403,"props":1964,"children":1965},{"class":405,"line":469},[1966,1970,1974,1978,1982,1986,1990],{"type":43,"tag":403,"props":1967,"children":1968},{"style":473},[1969],{"type":49,"value":476},{"type":43,"tag":403,"props":1971,"children":1972},{"style":426},[1973],{"type":49,"value":481},{"type":43,"tag":403,"props":1975,"children":1976},{"style":437},[1977],{"type":49,"value":486},{"type":43,"tag":403,"props":1979,"children":1980},{"style":437},[1981],{"type":49,"value":491},{"type":43,"tag":403,"props":1983,"children":1984},{"style":494},[1985],{"type":49,"value":497},{"type":43,"tag":403,"props":1987,"children":1988},{"style":426},[1989],{"type":49,"value":502},{"type":43,"tag":403,"props":1991,"children":1992},{"style":437},[1993],{"type":49,"value":456},{"type":43,"tag":403,"props":1995,"children":1996},{"class":405,"line":509},[1997,2001,2006,2010,2015,2019],{"type":43,"tag":403,"props":1998,"children":1999},{"style":473},[2000],{"type":49,"value":476},{"type":43,"tag":403,"props":2002,"children":2003},{"style":426},[2004],{"type":49,"value":2005}," app ",{"type":43,"tag":403,"props":2007,"children":2008},{"style":437},[2009],{"type":49,"value":486},{"type":43,"tag":403,"props":2011,"children":2012},{"style":494},[2013],{"type":49,"value":2014}," express",{"type":43,"tag":403,"props":2016,"children":2017},{"style":426},[2018],{"type":49,"value":502},{"type":43,"tag":403,"props":2020,"children":2021},{"style":437},[2022],{"type":49,"value":456},{"type":43,"tag":403,"props":2024,"children":2025},{"class":405,"line":517},[2026,2031,2035,2040,2045,2049,2054,2059],{"type":43,"tag":403,"props":2027,"children":2028},{"style":426},[2029],{"type":49,"value":2030},"app",{"type":43,"tag":403,"props":2032,"children":2033},{"style":437},[2034],{"type":49,"value":546},{"type":43,"tag":403,"props":2036,"children":2037},{"style":494},[2038],{"type":49,"value":2039},"use",{"type":43,"tag":403,"props":2041,"children":2042},{"style":426},[2043],{"type":49,"value":2044},"(express",{"type":43,"tag":403,"props":2046,"children":2047},{"style":437},[2048],{"type":49,"value":546},{"type":43,"tag":403,"props":2050,"children":2051},{"style":494},[2052],{"type":49,"value":2053},"json",{"type":43,"tag":403,"props":2055,"children":2056},{"style":426},[2057],{"type":49,"value":2058},"())",{"type":43,"tag":403,"props":2060,"children":2061},{"style":437},[2062],{"type":49,"value":456},{"type":43,"tag":403,"props":2064,"children":2065},{"class":405,"line":573},[2066],{"type":43,"tag":403,"props":2067,"children":2068},{"emptyLinePlaceholder":463},[2069],{"type":49,"value":466},{"type":43,"tag":403,"props":2071,"children":2072},{"class":405,"line":605},[2073],{"type":43,"tag":403,"props":2074,"children":2075},{"style":410},[2076],{"type":49,"value":2077},"\u002F\u002F `runway:\u002F\u002F` URIs bypass this check; external URLs must match the allowlist.\n",{"type":43,"tag":403,"props":2079,"children":2080},{"class":405,"line":635},[2081,2085,2090,2094,2098,2103,2108,2112,2117,2121,2125,2129,2134,2138,2143],{"type":43,"tag":403,"props":2082,"children":2083},{"style":473},[2084],{"type":49,"value":476},{"type":43,"tag":403,"props":2086,"children":2087},{"style":426},[2088],{"type":49,"value":2089}," ALLOWED_MEDIA_HOSTS ",{"type":43,"tag":403,"props":2091,"children":2092},{"style":437},[2093],{"type":49,"value":486},{"type":43,"tag":403,"props":2095,"children":2096},{"style":437},[2097],{"type":49,"value":491},{"type":43,"tag":403,"props":2099,"children":2100},{"style":494},[2101],{"type":49,"value":2102}," Set",{"type":43,"tag":403,"props":2104,"children":2105},{"style":426},[2106],{"type":49,"value":2107},"([",{"type":43,"tag":403,"props":2109,"children":2110},{"style":437},[2111],{"type":49,"value":451},{"type":43,"tag":403,"props":2113,"children":2114},{"style":443},[2115],{"type":49,"value":2116},"cdn.yourapp.com",{"type":43,"tag":403,"props":2118,"children":2119},{"style":437},[2120],{"type":49,"value":451},{"type":43,"tag":403,"props":2122,"children":2123},{"style":437},[2124],{"type":49,"value":1195},{"type":43,"tag":403,"props":2126,"children":2127},{"style":437},[2128],{"type":49,"value":440},{"type":43,"tag":403,"props":2130,"children":2131},{"style":443},[2132],{"type":49,"value":2133},"uploads.yourapp.com",{"type":43,"tag":403,"props":2135,"children":2136},{"style":437},[2137],{"type":49,"value":451},{"type":43,"tag":403,"props":2139,"children":2140},{"style":426},[2141],{"type":49,"value":2142},"])",{"type":43,"tag":403,"props":2144,"children":2145},{"style":437},[2146],{"type":49,"value":456},{"type":43,"tag":403,"props":2148,"children":2149},{"class":405,"line":662},[2150],{"type":43,"tag":403,"props":2151,"children":2152},{"emptyLinePlaceholder":463},[2153],{"type":49,"value":466},{"type":43,"tag":403,"props":2155,"children":2156},{"class":405,"line":693},[2157,2162,2167,2171,2177,2181],{"type":43,"tag":403,"props":2158,"children":2159},{"style":473},[2160],{"type":49,"value":2161},"function",{"type":43,"tag":403,"props":2163,"children":2164},{"style":494},[2165],{"type":49,"value":2166}," validateReferenceImages",{"type":43,"tag":403,"props":2168,"children":2169},{"style":437},[2170],{"type":49,"value":565},{"type":43,"tag":403,"props":2172,"children":2174},{"style":2173},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[2175],{"type":49,"value":2176},"refs",{"type":43,"tag":403,"props":2178,"children":2179},{"style":437},[2180],{"type":49,"value":673},{"type":43,"tag":403,"props":2182,"children":2183},{"style":437},[2184],{"type":49,"value":2185}," {\n",{"type":43,"tag":403,"props":2187,"children":2188},{"class":405,"line":701},[2189,2194,2199,2204,2209,2213,2218,2222,2226,2231,2236,2240,2245,2249,2253,2258,2262,2266],{"type":43,"tag":403,"props":2190,"children":2191},{"style":420},[2192],{"type":49,"value":2193},"  if",{"type":43,"tag":403,"props":2195,"children":2196},{"style":577},[2197],{"type":49,"value":2198}," (",{"type":43,"tag":403,"props":2200,"children":2201},{"style":437},[2202],{"type":49,"value":2203},"!",{"type":43,"tag":403,"props":2205,"children":2206},{"style":426},[2207],{"type":49,"value":2208},"Array",{"type":43,"tag":403,"props":2210,"children":2211},{"style":437},[2212],{"type":49,"value":546},{"type":43,"tag":403,"props":2214,"children":2215},{"style":494},[2216],{"type":49,"value":2217},"isArray",{"type":43,"tag":403,"props":2219,"children":2220},{"style":577},[2221],{"type":49,"value":565},{"type":43,"tag":403,"props":2223,"children":2224},{"style":426},[2225],{"type":49,"value":2176},{"type":43,"tag":403,"props":2227,"children":2228},{"style":577},[2229],{"type":49,"value":2230},")) ",{"type":43,"tag":403,"props":2232,"children":2233},{"style":420},[2234],{"type":49,"value":2235},"throw",{"type":43,"tag":403,"props":2237,"children":2238},{"style":437},[2239],{"type":49,"value":491},{"type":43,"tag":403,"props":2241,"children":2242},{"style":494},[2243],{"type":49,"value":2244}," Error",{"type":43,"tag":403,"props":2246,"children":2247},{"style":577},[2248],{"type":49,"value":565},{"type":43,"tag":403,"props":2250,"children":2251},{"style":437},[2252],{"type":49,"value":451},{"type":43,"tag":403,"props":2254,"children":2255},{"style":443},[2256],{"type":49,"value":2257},"referenceImages must be an array",{"type":43,"tag":403,"props":2259,"children":2260},{"style":437},[2261],{"type":49,"value":451},{"type":43,"tag":403,"props":2263,"children":2264},{"style":577},[2265],{"type":49,"value":673},{"type":43,"tag":403,"props":2267,"children":2268},{"style":437},[2269],{"type":49,"value":456},{"type":43,"tag":403,"props":2271,"children":2272},{"class":405,"line":1237},[2273,2278,2283,2287,2292,2296,2301,2305,2309,2313,2318,2323],{"type":43,"tag":403,"props":2274,"children":2275},{"style":420},[2276],{"type":49,"value":2277},"  return",{"type":43,"tag":403,"props":2279,"children":2280},{"style":426},[2281],{"type":49,"value":2282}," refs",{"type":43,"tag":403,"props":2284,"children":2285},{"style":437},[2286],{"type":49,"value":546},{"type":43,"tag":403,"props":2288,"children":2289},{"style":494},[2290],{"type":49,"value":2291},"map",{"type":43,"tag":403,"props":2293,"children":2294},{"style":577},[2295],{"type":49,"value":565},{"type":43,"tag":403,"props":2297,"children":2298},{"style":437},[2299],{"type":49,"value":2300},"({",{"type":43,"tag":403,"props":2302,"children":2303},{"style":2173},[2304],{"type":49,"value":1172},{"type":43,"tag":403,"props":2306,"children":2307},{"style":437},[2308],{"type":49,"value":1195},{"type":43,"tag":403,"props":2310,"children":2311},{"style":2173},[2312],{"type":49,"value":1200},{"type":43,"tag":403,"props":2314,"children":2315},{"style":437},[2316],{"type":49,"value":2317}," })",{"type":43,"tag":403,"props":2319,"children":2320},{"style":473},[2321],{"type":49,"value":2322}," =>",{"type":43,"tag":403,"props":2324,"children":2325},{"style":437},[2326],{"type":49,"value":2185},{"type":43,"tag":403,"props":2328,"children":2329},{"class":405,"line":1261},[2330,2335,2339,2344,2348,2353,2357,2361,2365,2370,2375,2379,2383,2387,2391,2395,2400],{"type":43,"tag":403,"props":2331,"children":2332},{"style":420},[2333],{"type":49,"value":2334},"    if",{"type":43,"tag":403,"props":2336,"children":2337},{"style":577},[2338],{"type":49,"value":2198},{"type":43,"tag":403,"props":2340,"children":2341},{"style":437},[2342],{"type":49,"value":2343},"typeof",{"type":43,"tag":403,"props":2345,"children":2346},{"style":426},[2347],{"type":49,"value":1172},{"type":43,"tag":403,"props":2349,"children":2350},{"style":437},[2351],{"type":49,"value":2352}," !==",{"type":43,"tag":403,"props":2354,"children":2355},{"style":437},[2356],{"type":49,"value":440},{"type":43,"tag":403,"props":2358,"children":2359},{"style":443},[2360],{"type":49,"value":1716},{"type":43,"tag":403,"props":2362,"children":2363},{"style":437},[2364],{"type":49,"value":451},{"type":43,"tag":403,"props":2366,"children":2367},{"style":437},[2368],{"type":49,"value":2369}," ||",{"type":43,"tag":403,"props":2371,"children":2372},{"style":437},[2373],{"type":49,"value":2374}," typeof",{"type":43,"tag":403,"props":2376,"children":2377},{"style":426},[2378],{"type":49,"value":1200},{"type":43,"tag":403,"props":2380,"children":2381},{"style":437},[2382],{"type":49,"value":2352},{"type":43,"tag":403,"props":2384,"children":2385},{"style":437},[2386],{"type":49,"value":440},{"type":43,"tag":403,"props":2388,"children":2389},{"style":443},[2390],{"type":49,"value":1716},{"type":43,"tag":403,"props":2392,"children":2393},{"style":437},[2394],{"type":49,"value":451},{"type":43,"tag":403,"props":2396,"children":2397},{"style":577},[2398],{"type":49,"value":2399},") ",{"type":43,"tag":403,"props":2401,"children":2402},{"style":437},[2403],{"type":49,"value":570},{"type":43,"tag":403,"props":2405,"children":2406},{"class":405,"line":28},[2407,2412,2416,2420,2424,2428,2433,2437,2441],{"type":43,"tag":403,"props":2408,"children":2409},{"style":420},[2410],{"type":49,"value":2411},"      throw",{"type":43,"tag":403,"props":2413,"children":2414},{"style":437},[2415],{"type":49,"value":491},{"type":43,"tag":403,"props":2417,"children":2418},{"style":494},[2419],{"type":49,"value":2244},{"type":43,"tag":403,"props":2421,"children":2422},{"style":577},[2423],{"type":49,"value":565},{"type":43,"tag":403,"props":2425,"children":2426},{"style":437},[2427],{"type":49,"value":451},{"type":43,"tag":403,"props":2429,"children":2430},{"style":443},[2431],{"type":49,"value":2432},"each reference needs a uri and tag",{"type":43,"tag":403,"props":2434,"children":2435},{"style":437},[2436],{"type":49,"value":451},{"type":43,"tag":403,"props":2438,"children":2439},{"style":577},[2440],{"type":49,"value":673},{"type":43,"tag":403,"props":2442,"children":2443},{"style":437},[2444],{"type":49,"value":456},{"type":43,"tag":403,"props":2446,"children":2448},{"class":405,"line":2447},16,[2449],{"type":43,"tag":403,"props":2450,"children":2451},{"style":437},[2452],{"type":49,"value":2453},"    }\n",{"type":43,"tag":403,"props":2455,"children":2457},{"class":405,"line":2456},17,[2458,2462,2466,2471,2475,2480,2484,2488,2492,2496,2500,2505,2510,2514,2518,2522],{"type":43,"tag":403,"props":2459,"children":2460},{"style":420},[2461],{"type":49,"value":2334},{"type":43,"tag":403,"props":2463,"children":2464},{"style":577},[2465],{"type":49,"value":2198},{"type":43,"tag":403,"props":2467,"children":2468},{"style":426},[2469],{"type":49,"value":2470},"uri",{"type":43,"tag":403,"props":2472,"children":2473},{"style":437},[2474],{"type":49,"value":546},{"type":43,"tag":403,"props":2476,"children":2477},{"style":494},[2478],{"type":49,"value":2479},"startsWith",{"type":43,"tag":403,"props":2481,"children":2482},{"style":577},[2483],{"type":49,"value":565},{"type":43,"tag":403,"props":2485,"children":2486},{"style":437},[2487],{"type":49,"value":451},{"type":43,"tag":403,"props":2489,"children":2490},{"style":443},[2491],{"type":49,"value":313},{"type":43,"tag":403,"props":2493,"children":2494},{"style":437},[2495],{"type":49,"value":451},{"type":43,"tag":403,"props":2497,"children":2498},{"style":577},[2499],{"type":49,"value":2230},{"type":43,"tag":403,"props":2501,"children":2502},{"style":420},[2503],{"type":49,"value":2504},"return",{"type":43,"tag":403,"props":2506,"children":2507},{"style":437},[2508],{"type":49,"value":2509}," {",{"type":43,"tag":403,"props":2511,"children":2512},{"style":426},[2513],{"type":49,"value":1172},{"type":43,"tag":403,"props":2515,"children":2516},{"style":437},[2517],{"type":49,"value":1195},{"type":43,"tag":403,"props":2519,"children":2520},{"style":426},[2521],{"type":49,"value":1200},{"type":43,"tag":403,"props":2523,"children":2524},{"style":437},[2525],{"type":49,"value":2526}," };\n",{"type":43,"tag":403,"props":2528,"children":2530},{"class":405,"line":2529},18,[2531,2536,2541,2546,2550,2555,2559,2563,2567],{"type":43,"tag":403,"props":2532,"children":2533},{"style":473},[2534],{"type":49,"value":2535},"    const",{"type":43,"tag":403,"props":2537,"children":2538},{"style":426},[2539],{"type":49,"value":2540}," u",{"type":43,"tag":403,"props":2542,"children":2543},{"style":437},[2544],{"type":49,"value":2545}," =",{"type":43,"tag":403,"props":2547,"children":2548},{"style":437},[2549],{"type":49,"value":491},{"type":43,"tag":403,"props":2551,"children":2552},{"style":494},[2553],{"type":49,"value":2554}," URL",{"type":43,"tag":403,"props":2556,"children":2557},{"style":577},[2558],{"type":49,"value":565},{"type":43,"tag":403,"props":2560,"children":2561},{"style":426},[2562],{"type":49,"value":2470},{"type":43,"tag":403,"props":2564,"children":2565},{"style":577},[2566],{"type":49,"value":673},{"type":43,"tag":403,"props":2568,"children":2569},{"style":437},[2570],{"type":49,"value":456},{"type":43,"tag":403,"props":2572,"children":2574},{"class":405,"line":2573},19,[2575,2579,2583,2588,2592,2597,2601,2605,2610,2614,2618,2622,2626,2630,2634,2638,2643,2647,2651],{"type":43,"tag":403,"props":2576,"children":2577},{"style":420},[2578],{"type":49,"value":2334},{"type":43,"tag":403,"props":2580,"children":2581},{"style":577},[2582],{"type":49,"value":2198},{"type":43,"tag":403,"props":2584,"children":2585},{"style":426},[2586],{"type":49,"value":2587},"u",{"type":43,"tag":403,"props":2589,"children":2590},{"style":437},[2591],{"type":49,"value":546},{"type":43,"tag":403,"props":2593,"children":2594},{"style":426},[2595],{"type":49,"value":2596},"protocol",{"type":43,"tag":403,"props":2598,"children":2599},{"style":437},[2600],{"type":49,"value":2352},{"type":43,"tag":403,"props":2602,"children":2603},{"style":437},[2604],{"type":49,"value":440},{"type":43,"tag":403,"props":2606,"children":2607},{"style":443},[2608],{"type":49,"value":2609},"https:",{"type":43,"tag":403,"props":2611,"children":2612},{"style":437},[2613],{"type":49,"value":451},{"type":43,"tag":403,"props":2615,"children":2616},{"style":577},[2617],{"type":49,"value":2399},{"type":43,"tag":403,"props":2619,"children":2620},{"style":420},[2621],{"type":49,"value":2235},{"type":43,"tag":403,"props":2623,"children":2624},{"style":437},[2625],{"type":49,"value":491},{"type":43,"tag":403,"props":2627,"children":2628},{"style":494},[2629],{"type":49,"value":2244},{"type":43,"tag":403,"props":2631,"children":2632},{"style":577},[2633],{"type":49,"value":565},{"type":43,"tag":403,"props":2635,"children":2636},{"style":437},[2637],{"type":49,"value":451},{"type":43,"tag":403,"props":2639,"children":2640},{"style":443},[2641],{"type":49,"value":2642},"https required",{"type":43,"tag":403,"props":2644,"children":2645},{"style":437},[2646],{"type":49,"value":451},{"type":43,"tag":403,"props":2648,"children":2649},{"style":577},[2650],{"type":49,"value":673},{"type":43,"tag":403,"props":2652,"children":2653},{"style":437},[2654],{"type":49,"value":456},{"type":43,"tag":403,"props":2656,"children":2658},{"class":405,"line":2657},20,[2659,2663,2667,2671,2676,2680,2685,2689,2693,2697,2702,2706,2710,2714,2718,2722,2726,2731,2735,2739],{"type":43,"tag":403,"props":2660,"children":2661},{"style":420},[2662],{"type":49,"value":2334},{"type":43,"tag":403,"props":2664,"children":2665},{"style":577},[2666],{"type":49,"value":2198},{"type":43,"tag":403,"props":2668,"children":2669},{"style":437},[2670],{"type":49,"value":2203},{"type":43,"tag":403,"props":2672,"children":2673},{"style":426},[2674],{"type":49,"value":2675},"ALLOWED_MEDIA_HOSTS",{"type":43,"tag":403,"props":2677,"children":2678},{"style":437},[2679],{"type":49,"value":546},{"type":43,"tag":403,"props":2681,"children":2682},{"style":494},[2683],{"type":49,"value":2684},"has",{"type":43,"tag":403,"props":2686,"children":2687},{"style":577},[2688],{"type":49,"value":565},{"type":43,"tag":403,"props":2690,"children":2691},{"style":426},[2692],{"type":49,"value":2587},{"type":43,"tag":403,"props":2694,"children":2695},{"style":437},[2696],{"type":49,"value":546},{"type":43,"tag":403,"props":2698,"children":2699},{"style":426},[2700],{"type":49,"value":2701},"hostname",{"type":43,"tag":403,"props":2703,"children":2704},{"style":577},[2705],{"type":49,"value":2230},{"type":43,"tag":403,"props":2707,"children":2708},{"style":420},[2709],{"type":49,"value":2235},{"type":43,"tag":403,"props":2711,"children":2712},{"style":437},[2713],{"type":49,"value":491},{"type":43,"tag":403,"props":2715,"children":2716},{"style":494},[2717],{"type":49,"value":2244},{"type":43,"tag":403,"props":2719,"children":2720},{"style":577},[2721],{"type":49,"value":565},{"type":43,"tag":403,"props":2723,"children":2724},{"style":437},[2725],{"type":49,"value":451},{"type":43,"tag":403,"props":2727,"children":2728},{"style":443},[2729],{"type":49,"value":2730},"untrusted media host",{"type":43,"tag":403,"props":2732,"children":2733},{"style":437},[2734],{"type":49,"value":451},{"type":43,"tag":403,"props":2736,"children":2737},{"style":577},[2738],{"type":49,"value":673},{"type":43,"tag":403,"props":2740,"children":2741},{"style":437},[2742],{"type":49,"value":456},{"type":43,"tag":403,"props":2744,"children":2746},{"class":405,"line":2745},21,[2747,2752,2756,2760,2764,2768,2772,2777,2781,2785,2789],{"type":43,"tag":403,"props":2748,"children":2749},{"style":420},[2750],{"type":49,"value":2751},"    return",{"type":43,"tag":403,"props":2753,"children":2754},{"style":437},[2755],{"type":49,"value":2509},{"type":43,"tag":403,"props":2757,"children":2758},{"style":577},[2759],{"type":49,"value":1172},{"type":43,"tag":403,"props":2761,"children":2762},{"style":437},[2763],{"type":49,"value":585},{"type":43,"tag":403,"props":2765,"children":2766},{"style":426},[2767],{"type":49,"value":2540},{"type":43,"tag":403,"props":2769,"children":2770},{"style":437},[2771],{"type":49,"value":546},{"type":43,"tag":403,"props":2773,"children":2774},{"style":494},[2775],{"type":49,"value":2776},"toString",{"type":43,"tag":403,"props":2778,"children":2779},{"style":577},[2780],{"type":49,"value":502},{"type":43,"tag":403,"props":2782,"children":2783},{"style":437},[2784],{"type":49,"value":1195},{"type":43,"tag":403,"props":2786,"children":2787},{"style":426},[2788],{"type":49,"value":1200},{"type":43,"tag":403,"props":2790,"children":2791},{"style":437},[2792],{"type":49,"value":2526},{"type":43,"tag":403,"props":2794,"children":2796},{"class":405,"line":2795},22,[2797,2802,2806],{"type":43,"tag":403,"props":2798,"children":2799},{"style":437},[2800],{"type":49,"value":2801},"  }",{"type":43,"tag":403,"props":2803,"children":2804},{"style":577},[2805],{"type":49,"value":673},{"type":43,"tag":403,"props":2807,"children":2808},{"style":437},[2809],{"type":49,"value":456},{"type":43,"tag":403,"props":2811,"children":2813},{"class":405,"line":2812},23,[2814],{"type":43,"tag":403,"props":2815,"children":2816},{"style":437},[2817],{"type":49,"value":2818},"}\n",{"type":43,"tag":403,"props":2820,"children":2822},{"class":405,"line":2821},24,[2823],{"type":43,"tag":403,"props":2824,"children":2825},{"emptyLinePlaceholder":463},[2826],{"type":49,"value":466},{"type":43,"tag":403,"props":2828,"children":2830},{"class":405,"line":2829},25,[2831,2835,2839,2844,2848,2852,2857,2861,2865,2870,2874,2879,2883,2888,2892,2896],{"type":43,"tag":403,"props":2832,"children":2833},{"style":426},[2834],{"type":49,"value":2030},{"type":43,"tag":403,"props":2836,"children":2837},{"style":437},[2838],{"type":49,"value":546},{"type":43,"tag":403,"props":2840,"children":2841},{"style":494},[2842],{"type":49,"value":2843},"post",{"type":43,"tag":403,"props":2845,"children":2846},{"style":426},[2847],{"type":49,"value":565},{"type":43,"tag":403,"props":2849,"children":2850},{"style":437},[2851],{"type":49,"value":451},{"type":43,"tag":403,"props":2853,"children":2854},{"style":443},[2855],{"type":49,"value":2856},"\u002Fapi\u002Fgenerate-image",{"type":43,"tag":403,"props":2858,"children":2859},{"style":437},[2860],{"type":49,"value":451},{"type":43,"tag":403,"props":2862,"children":2863},{"style":437},[2864],{"type":49,"value":1195},{"type":43,"tag":403,"props":2866,"children":2867},{"style":473},[2868],{"type":49,"value":2869}," async",{"type":43,"tag":403,"props":2871,"children":2872},{"style":437},[2873],{"type":49,"value":2198},{"type":43,"tag":403,"props":2875,"children":2876},{"style":2173},[2877],{"type":49,"value":2878},"req",{"type":43,"tag":403,"props":2880,"children":2881},{"style":437},[2882],{"type":49,"value":1195},{"type":43,"tag":403,"props":2884,"children":2885},{"style":2173},[2886],{"type":49,"value":2887}," res",{"type":43,"tag":403,"props":2889,"children":2890},{"style":437},[2891],{"type":49,"value":673},{"type":43,"tag":403,"props":2893,"children":2894},{"style":473},[2895],{"type":49,"value":2322},{"type":43,"tag":403,"props":2897,"children":2898},{"style":437},[2899],{"type":49,"value":2185},{"type":43,"tag":403,"props":2901,"children":2903},{"class":405,"line":2902},26,[2904,2909],{"type":43,"tag":403,"props":2905,"children":2906},{"style":420},[2907],{"type":49,"value":2908},"  try",{"type":43,"tag":403,"props":2910,"children":2911},{"style":437},[2912],{"type":49,"value":2185},{"type":43,"tag":403,"props":2914,"children":2916},{"class":405,"line":2915},27,[2917,2921,2925,2930,2934,2939,2943,2947,2951,2955,2959,2964,2968,2972,2976,2980,2984,2989,2994,2998,3003,3007,3012],{"type":43,"tag":403,"props":2918,"children":2919},{"style":473},[2920],{"type":49,"value":2535},{"type":43,"tag":403,"props":2922,"children":2923},{"style":437},[2924],{"type":49,"value":2509},{"type":43,"tag":403,"props":2926,"children":2927},{"style":426},[2928],{"type":49,"value":2929}," prompt",{"type":43,"tag":403,"props":2931,"children":2932},{"style":437},[2933],{"type":49,"value":1195},{"type":43,"tag":403,"props":2935,"children":2936},{"style":426},[2937],{"type":49,"value":2938}," model",{"type":43,"tag":403,"props":2940,"children":2941},{"style":437},[2942],{"type":49,"value":2545},{"type":43,"tag":403,"props":2944,"children":2945},{"style":437},[2946],{"type":49,"value":440},{"type":43,"tag":403,"props":2948,"children":2949},{"style":443},[2950],{"type":49,"value":161},{"type":43,"tag":403,"props":2952,"children":2953},{"style":437},[2954],{"type":49,"value":451},{"type":43,"tag":403,"props":2956,"children":2957},{"style":437},[2958],{"type":49,"value":1195},{"type":43,"tag":403,"props":2960,"children":2961},{"style":426},[2962],{"type":49,"value":2963}," ratio",{"type":43,"tag":403,"props":2965,"children":2966},{"style":437},[2967],{"type":49,"value":2545},{"type":43,"tag":403,"props":2969,"children":2970},{"style":437},[2971],{"type":49,"value":440},{"type":43,"tag":403,"props":2973,"children":2974},{"style":443},[2975],{"type":49,"value":654},{"type":43,"tag":403,"props":2977,"children":2978},{"style":437},[2979],{"type":49,"value":451},{"type":43,"tag":403,"props":2981,"children":2982},{"style":437},[2983],{"type":49,"value":1195},{"type":43,"tag":403,"props":2985,"children":2986},{"style":426},[2987],{"type":49,"value":2988}," referenceImages",{"type":43,"tag":403,"props":2990,"children":2991},{"style":437},[2992],{"type":49,"value":2993}," }",{"type":43,"tag":403,"props":2995,"children":2996},{"style":437},[2997],{"type":49,"value":2545},{"type":43,"tag":403,"props":2999,"children":3000},{"style":426},[3001],{"type":49,"value":3002}," req",{"type":43,"tag":403,"props":3004,"children":3005},{"style":437},[3006],{"type":49,"value":546},{"type":43,"tag":403,"props":3008,"children":3009},{"style":426},[3010],{"type":49,"value":3011},"body",{"type":43,"tag":403,"props":3013,"children":3014},{"style":437},[3015],{"type":49,"value":456},{"type":43,"tag":403,"props":3017,"children":3019},{"class":405,"line":3018},28,[3020],{"type":43,"tag":403,"props":3021,"children":3022},{"emptyLinePlaceholder":463},[3023],{"type":49,"value":466},{"type":43,"tag":403,"props":3025,"children":3027},{"class":405,"line":3026},29,[3028,3032,3036,3040,3044,3048,3052,3056,3060,3064,3068],{"type":43,"tag":403,"props":3029,"children":3030},{"style":473},[3031],{"type":49,"value":2535},{"type":43,"tag":403,"props":3033,"children":3034},{"style":426},[3035],{"type":49,"value":720},{"type":43,"tag":403,"props":3037,"children":3038},{"style":437},[3039],{"type":49,"value":2545},{"type":43,"tag":403,"props":3041,"children":3042},{"style":420},[3043],{"type":49,"value":536},{"type":43,"tag":403,"props":3045,"children":3046},{"style":426},[3047],{"type":49,"value":541},{"type":43,"tag":403,"props":3049,"children":3050},{"style":437},[3051],{"type":49,"value":546},{"type":43,"tag":403,"props":3053,"children":3054},{"style":426},[3055],{"type":49,"value":551},{"type":43,"tag":403,"props":3057,"children":3058},{"style":437},[3059],{"type":49,"value":546},{"type":43,"tag":403,"props":3061,"children":3062},{"style":494},[3063],{"type":49,"value":560},{"type":43,"tag":403,"props":3065,"children":3066},{"style":577},[3067],{"type":49,"value":565},{"type":43,"tag":403,"props":3069,"children":3070},{"style":437},[3071],{"type":49,"value":570},{"type":43,"tag":403,"props":3073,"children":3075},{"class":405,"line":3074},30,[3076,3081],{"type":43,"tag":403,"props":3077,"children":3078},{"style":426},[3079],{"type":49,"value":3080},"      model",{"type":43,"tag":403,"props":3082,"children":3083},{"style":437},[3084],{"type":49,"value":602},{"type":43,"tag":403,"props":3086,"children":3088},{"class":405,"line":3087},31,[3089,3094,3098,3102],{"type":43,"tag":403,"props":3090,"children":3091},{"style":577},[3092],{"type":49,"value":3093},"      promptText",{"type":43,"tag":403,"props":3095,"children":3096},{"style":437},[3097],{"type":49,"value":585},{"type":43,"tag":403,"props":3099,"children":3100},{"style":426},[3101],{"type":49,"value":2929},{"type":43,"tag":403,"props":3103,"children":3104},{"style":437},[3105],{"type":49,"value":602},{"type":43,"tag":403,"props":3107,"children":3109},{"class":405,"line":3108},32,[3110,3115],{"type":43,"tag":403,"props":3111,"children":3112},{"style":426},[3113],{"type":49,"value":3114},"      ratio",{"type":43,"tag":403,"props":3116,"children":3117},{"style":437},[3118],{"type":49,"value":602},{"type":43,"tag":403,"props":3120,"children":3122},{"class":405,"line":3121},33,[3123,3128,3132,3136,3141,3145,3149,3153,3157,3161,3165,3169,3173],{"type":43,"tag":403,"props":3124,"children":3125},{"style":437},[3126],{"type":49,"value":3127},"      ...",{"type":43,"tag":403,"props":3129,"children":3130},{"style":577},[3131],{"type":49,"value":565},{"type":43,"tag":403,"props":3133,"children":3134},{"style":426},[3135],{"type":49,"value":1796},{"type":43,"tag":403,"props":3137,"children":3138},{"style":437},[3139],{"type":49,"value":3140}," &&",{"type":43,"tag":403,"props":3142,"children":3143},{"style":437},[3144],{"type":49,"value":2509},{"type":43,"tag":403,"props":3146,"children":3147},{"style":577},[3148],{"type":49,"value":2988},{"type":43,"tag":403,"props":3150,"children":3151},{"style":437},[3152],{"type":49,"value":585},{"type":43,"tag":403,"props":3154,"children":3155},{"style":494},[3156],{"type":49,"value":2166},{"type":43,"tag":403,"props":3158,"children":3159},{"style":577},[3160],{"type":49,"value":565},{"type":43,"tag":403,"props":3162,"children":3163},{"style":426},[3164],{"type":49,"value":1796},{"type":43,"tag":403,"props":3166,"children":3167},{"style":577},[3168],{"type":49,"value":2399},{"type":43,"tag":403,"props":3170,"children":3171},{"style":437},[3172],{"type":49,"value":668},{"type":43,"tag":403,"props":3174,"children":3175},{"style":577},[3176],{"type":49,"value":1022},{"type":43,"tag":403,"props":3178,"children":3180},{"class":405,"line":3179},34,[3181,3186,3190,3194,3198,3202],{"type":43,"tag":403,"props":3182,"children":3183},{"style":437},[3184],{"type":49,"value":3185},"    }",{"type":43,"tag":403,"props":3187,"children":3188},{"style":577},[3189],{"type":49,"value":673},{"type":43,"tag":403,"props":3191,"children":3192},{"style":437},[3193],{"type":49,"value":546},{"type":43,"tag":403,"props":3195,"children":3196},{"style":494},[3197],{"type":49,"value":682},{"type":43,"tag":403,"props":3199,"children":3200},{"style":577},[3201],{"type":49,"value":502},{"type":43,"tag":403,"props":3203,"children":3204},{"style":437},[3205],{"type":49,"value":456},{"type":43,"tag":403,"props":3207,"children":3209},{"class":405,"line":3208},35,[3210],{"type":43,"tag":403,"props":3211,"children":3212},{"emptyLinePlaceholder":463},[3213],{"type":49,"value":466},{"type":43,"tag":403,"props":3215,"children":3217},{"class":405,"line":3216},36,[3218,3223,3227,3231,3235,3240,3245,3249,3253,3257,3262,3267,3271,3276,3280,3284],{"type":43,"tag":403,"props":3219,"children":3220},{"style":426},[3221],{"type":49,"value":3222},"    res",{"type":43,"tag":403,"props":3224,"children":3225},{"style":437},[3226],{"type":49,"value":546},{"type":43,"tag":403,"props":3228,"children":3229},{"style":494},[3230],{"type":49,"value":2053},{"type":43,"tag":403,"props":3232,"children":3233},{"style":577},[3234],{"type":49,"value":565},{"type":43,"tag":403,"props":3236,"children":3237},{"style":437},[3238],{"type":49,"value":3239},"{",{"type":43,"tag":403,"props":3241,"children":3242},{"style":577},[3243],{"type":49,"value":3244}," imageUrl",{"type":43,"tag":403,"props":3246,"children":3247},{"style":437},[3248],{"type":49,"value":585},{"type":43,"tag":403,"props":3250,"children":3251},{"style":426},[3252],{"type":49,"value":720},{"type":43,"tag":403,"props":3254,"children":3255},{"style":437},[3256],{"type":49,"value":546},{"type":43,"tag":403,"props":3258,"children":3259},{"style":426},[3260],{"type":49,"value":3261},"output",{"type":43,"tag":403,"props":3263,"children":3264},{"style":577},[3265],{"type":49,"value":3266},"[",{"type":43,"tag":403,"props":3268,"children":3269},{"style":732},[3270],{"type":49,"value":735},{"type":43,"tag":403,"props":3272,"children":3273},{"style":577},[3274],{"type":49,"value":3275},"] ",{"type":43,"tag":403,"props":3277,"children":3278},{"style":437},[3279],{"type":49,"value":668},{"type":43,"tag":403,"props":3281,"children":3282},{"style":577},[3283],{"type":49,"value":673},{"type":43,"tag":403,"props":3285,"children":3286},{"style":437},[3287],{"type":49,"value":456},{"type":43,"tag":403,"props":3289,"children":3291},{"class":405,"line":3290},37,[3292,3296,3301,3305,3310,3314],{"type":43,"tag":403,"props":3293,"children":3294},{"style":437},[3295],{"type":49,"value":2801},{"type":43,"tag":403,"props":3297,"children":3298},{"style":420},[3299],{"type":49,"value":3300}," catch",{"type":43,"tag":403,"props":3302,"children":3303},{"style":577},[3304],{"type":49,"value":2198},{"type":43,"tag":403,"props":3306,"children":3307},{"style":426},[3308],{"type":49,"value":3309},"error",{"type":43,"tag":403,"props":3311,"children":3312},{"style":577},[3313],{"type":49,"value":2399},{"type":43,"tag":403,"props":3315,"children":3316},{"style":437},[3317],{"type":49,"value":570},{"type":43,"tag":403,"props":3319,"children":3321},{"class":405,"line":3320},38,[3322,3327,3331,3335,3339,3343,3348,3352,3356,3361,3365],{"type":43,"tag":403,"props":3323,"children":3324},{"style":426},[3325],{"type":49,"value":3326},"    console",{"type":43,"tag":403,"props":3328,"children":3329},{"style":437},[3330],{"type":49,"value":546},{"type":43,"tag":403,"props":3332,"children":3333},{"style":494},[3334],{"type":49,"value":3309},{"type":43,"tag":403,"props":3336,"children":3337},{"style":577},[3338],{"type":49,"value":565},{"type":43,"tag":403,"props":3340,"children":3341},{"style":437},[3342],{"type":49,"value":451},{"type":43,"tag":403,"props":3344,"children":3345},{"style":443},[3346],{"type":49,"value":3347},"Image generation failed:",{"type":43,"tag":403,"props":3349,"children":3350},{"style":437},[3351],{"type":49,"value":451},{"type":43,"tag":403,"props":3353,"children":3354},{"style":437},[3355],{"type":49,"value":1195},{"type":43,"tag":403,"props":3357,"children":3358},{"style":426},[3359],{"type":49,"value":3360}," error",{"type":43,"tag":403,"props":3362,"children":3363},{"style":577},[3364],{"type":49,"value":673},{"type":43,"tag":403,"props":3366,"children":3367},{"style":437},[3368],{"type":49,"value":456},{"type":43,"tag":403,"props":3370,"children":3372},{"class":405,"line":3371},39,[3373,3377,3381,3386,3390,3395,3399,3403,3407,3411,3415,3419,3423,3427,3431,3436,3440,3444],{"type":43,"tag":403,"props":3374,"children":3375},{"style":426},[3376],{"type":49,"value":3222},{"type":43,"tag":403,"props":3378,"children":3379},{"style":437},[3380],{"type":49,"value":546},{"type":43,"tag":403,"props":3382,"children":3383},{"style":494},[3384],{"type":49,"value":3385},"status",{"type":43,"tag":403,"props":3387,"children":3388},{"style":577},[3389],{"type":49,"value":565},{"type":43,"tag":403,"props":3391,"children":3392},{"style":732},[3393],{"type":49,"value":3394},"400",{"type":43,"tag":403,"props":3396,"children":3397},{"style":577},[3398],{"type":49,"value":673},{"type":43,"tag":403,"props":3400,"children":3401},{"style":437},[3402],{"type":49,"value":546},{"type":43,"tag":403,"props":3404,"children":3405},{"style":494},[3406],{"type":49,"value":2053},{"type":43,"tag":403,"props":3408,"children":3409},{"style":577},[3410],{"type":49,"value":565},{"type":43,"tag":403,"props":3412,"children":3413},{"style":437},[3414],{"type":49,"value":3239},{"type":43,"tag":403,"props":3416,"children":3417},{"style":577},[3418],{"type":49,"value":3360},{"type":43,"tag":403,"props":3420,"children":3421},{"style":437},[3422],{"type":49,"value":585},{"type":43,"tag":403,"props":3424,"children":3425},{"style":426},[3426],{"type":49,"value":3360},{"type":43,"tag":403,"props":3428,"children":3429},{"style":437},[3430],{"type":49,"value":546},{"type":43,"tag":403,"props":3432,"children":3433},{"style":426},[3434],{"type":49,"value":3435},"message",{"type":43,"tag":403,"props":3437,"children":3438},{"style":437},[3439],{"type":49,"value":2993},{"type":43,"tag":403,"props":3441,"children":3442},{"style":577},[3443],{"type":49,"value":673},{"type":43,"tag":403,"props":3445,"children":3446},{"style":437},[3447],{"type":49,"value":456},{"type":43,"tag":403,"props":3449,"children":3451},{"class":405,"line":3450},40,[3452],{"type":43,"tag":403,"props":3453,"children":3454},{"style":437},[3455],{"type":49,"value":3456},"  }\n",{"type":43,"tag":403,"props":3458,"children":3460},{"class":405,"line":3459},41,[3461,3465,3469],{"type":43,"tag":403,"props":3462,"children":3463},{"style":437},[3464],{"type":49,"value":668},{"type":43,"tag":403,"props":3466,"children":3467},{"style":426},[3468],{"type":49,"value":673},{"type":43,"tag":403,"props":3470,"children":3471},{"style":437},[3472],{"type":49,"value":456},{"type":43,"tag":52,"props":3474,"children":3475},{},[3476],{"type":43,"tag":56,"props":3477,"children":3478},{},[3479,3481,3486,3488,3493],{"type":49,"value":3480},"For browser uploads: POST files to your server, upload via ",{"type":43,"tag":68,"props":3482,"children":3484},{"className":3483},[],[3485],{"type":49,"value":97},{"type":49,"value":3487},", and pass the ",{"type":43,"tag":68,"props":3489,"children":3491},{"className":3490},[],[3492],{"type":49,"value":313},{"type":49,"value":3494}," URI. Don't accept raw URLs from the browser.",{"type":43,"tag":385,"props":3496,"children":3498},{"id":3497},"example-nextjs-api-route",[3499],{"type":49,"value":3500},"Example: Next.js API Route",{"type":43,"tag":392,"props":3502,"children":3506},{"className":3503,"code":3504,"language":3505,"meta":397,"style":397},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F app\u002Fapi\u002Fgenerate-image\u002Froute.ts\nimport RunwayML from '@runwayml\u002Fsdk';\nimport { NextRequest, NextResponse } from 'next\u002Fserver';\n\nconst client = new RunwayML();\n\nexport async function POST(request: NextRequest) {\n  const { prompt, referenceImages } = await request.json();\n\n  try {\n    const task = await client.textToImage.create({\n      model: 'gen4_image',\n      promptText: prompt,\n      ratio: '1280:720',\n      ...(referenceImages && { referenceImages })\n    }).waitForTaskOutput();\n\n    return NextResponse.json({ imageUrl: task.output[0] });\n  } catch (error) {\n    return NextResponse.json(\n      { error: error instanceof Error ? error.message : 'Generation failed' },\n      { status: 500 }\n    );\n  }\n}\n","typescript",[3507],{"type":43,"tag":68,"props":3508,"children":3509},{"__ignoreMap":397},[3510,3518,3549,3600,3607,3638,3645,3693,3750,3757,3768,3815,3842,3861,3888,3923,3950,3957,4028,4055,4078,4146,4171,4183,4190],{"type":43,"tag":403,"props":3511,"children":3512},{"class":405,"line":406},[3513],{"type":43,"tag":403,"props":3514,"children":3515},{"style":410},[3516],{"type":49,"value":3517},"\u002F\u002F app\u002Fapi\u002Fgenerate-image\u002Froute.ts\n",{"type":43,"tag":403,"props":3519,"children":3520},{"class":405,"line":416},[3521,3525,3529,3533,3537,3541,3545],{"type":43,"tag":403,"props":3522,"children":3523},{"style":420},[3524],{"type":49,"value":423},{"type":43,"tag":403,"props":3526,"children":3527},{"style":426},[3528],{"type":49,"value":429},{"type":43,"tag":403,"props":3530,"children":3531},{"style":420},[3532],{"type":49,"value":434},{"type":43,"tag":403,"props":3534,"children":3535},{"style":437},[3536],{"type":49,"value":440},{"type":43,"tag":403,"props":3538,"children":3539},{"style":443},[3540],{"type":49,"value":446},{"type":43,"tag":403,"props":3542,"children":3543},{"style":437},[3544],{"type":49,"value":451},{"type":43,"tag":403,"props":3546,"children":3547},{"style":437},[3548],{"type":49,"value":456},{"type":43,"tag":403,"props":3550,"children":3551},{"class":405,"line":459},[3552,3556,3560,3565,3569,3574,3578,3583,3587,3592,3596],{"type":43,"tag":403,"props":3553,"children":3554},{"style":420},[3555],{"type":49,"value":423},{"type":43,"tag":403,"props":3557,"children":3558},{"style":437},[3559],{"type":49,"value":2509},{"type":43,"tag":403,"props":3561,"children":3562},{"style":426},[3563],{"type":49,"value":3564}," NextRequest",{"type":43,"tag":403,"props":3566,"children":3567},{"style":437},[3568],{"type":49,"value":1195},{"type":43,"tag":403,"props":3570,"children":3571},{"style":426},[3572],{"type":49,"value":3573}," NextResponse",{"type":43,"tag":403,"props":3575,"children":3576},{"style":437},[3577],{"type":49,"value":2993},{"type":43,"tag":403,"props":3579,"children":3580},{"style":420},[3581],{"type":49,"value":3582}," from",{"type":43,"tag":403,"props":3584,"children":3585},{"style":437},[3586],{"type":49,"value":440},{"type":43,"tag":403,"props":3588,"children":3589},{"style":443},[3590],{"type":49,"value":3591},"next\u002Fserver",{"type":43,"tag":403,"props":3593,"children":3594},{"style":437},[3595],{"type":49,"value":451},{"type":43,"tag":403,"props":3597,"children":3598},{"style":437},[3599],{"type":49,"value":456},{"type":43,"tag":403,"props":3601,"children":3602},{"class":405,"line":469},[3603],{"type":43,"tag":403,"props":3604,"children":3605},{"emptyLinePlaceholder":463},[3606],{"type":49,"value":466},{"type":43,"tag":403,"props":3608,"children":3609},{"class":405,"line":509},[3610,3614,3618,3622,3626,3630,3634],{"type":43,"tag":403,"props":3611,"children":3612},{"style":473},[3613],{"type":49,"value":476},{"type":43,"tag":403,"props":3615,"children":3616},{"style":426},[3617],{"type":49,"value":481},{"type":43,"tag":403,"props":3619,"children":3620},{"style":437},[3621],{"type":49,"value":486},{"type":43,"tag":403,"props":3623,"children":3624},{"style":437},[3625],{"type":49,"value":491},{"type":43,"tag":403,"props":3627,"children":3628},{"style":494},[3629],{"type":49,"value":497},{"type":43,"tag":403,"props":3631,"children":3632},{"style":426},[3633],{"type":49,"value":502},{"type":43,"tag":403,"props":3635,"children":3636},{"style":437},[3637],{"type":49,"value":456},{"type":43,"tag":403,"props":3639,"children":3640},{"class":405,"line":517},[3641],{"type":43,"tag":403,"props":3642,"children":3643},{"emptyLinePlaceholder":463},[3644],{"type":49,"value":466},{"type":43,"tag":403,"props":3646,"children":3647},{"class":405,"line":573},[3648,3653,3657,3662,3667,3671,3676,3680,3685,3689],{"type":43,"tag":403,"props":3649,"children":3650},{"style":420},[3651],{"type":49,"value":3652},"export",{"type":43,"tag":403,"props":3654,"children":3655},{"style":473},[3656],{"type":49,"value":2869},{"type":43,"tag":403,"props":3658,"children":3659},{"style":473},[3660],{"type":49,"value":3661}," function",{"type":43,"tag":403,"props":3663,"children":3664},{"style":494},[3665],{"type":49,"value":3666}," POST",{"type":43,"tag":403,"props":3668,"children":3669},{"style":437},[3670],{"type":49,"value":565},{"type":43,"tag":403,"props":3672,"children":3673},{"style":2173},[3674],{"type":49,"value":3675},"request",{"type":43,"tag":403,"props":3677,"children":3678},{"style":437},[3679],{"type":49,"value":585},{"type":43,"tag":403,"props":3681,"children":3683},{"style":3682},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[3684],{"type":49,"value":3564},{"type":43,"tag":403,"props":3686,"children":3687},{"style":437},[3688],{"type":49,"value":673},{"type":43,"tag":403,"props":3690,"children":3691},{"style":437},[3692],{"type":49,"value":2185},{"type":43,"tag":403,"props":3694,"children":3695},{"class":405,"line":605},[3696,3701,3705,3709,3713,3717,3721,3725,3729,3734,3738,3742,3746],{"type":43,"tag":403,"props":3697,"children":3698},{"style":473},[3699],{"type":49,"value":3700},"  const",{"type":43,"tag":403,"props":3702,"children":3703},{"style":437},[3704],{"type":49,"value":2509},{"type":43,"tag":403,"props":3706,"children":3707},{"style":426},[3708],{"type":49,"value":2929},{"type":43,"tag":403,"props":3710,"children":3711},{"style":437},[3712],{"type":49,"value":1195},{"type":43,"tag":403,"props":3714,"children":3715},{"style":426},[3716],{"type":49,"value":2988},{"type":43,"tag":403,"props":3718,"children":3719},{"style":437},[3720],{"type":49,"value":2993},{"type":43,"tag":403,"props":3722,"children":3723},{"style":437},[3724],{"type":49,"value":2545},{"type":43,"tag":403,"props":3726,"children":3727},{"style":420},[3728],{"type":49,"value":536},{"type":43,"tag":403,"props":3730,"children":3731},{"style":426},[3732],{"type":49,"value":3733}," request",{"type":43,"tag":403,"props":3735,"children":3736},{"style":437},[3737],{"type":49,"value":546},{"type":43,"tag":403,"props":3739,"children":3740},{"style":494},[3741],{"type":49,"value":2053},{"type":43,"tag":403,"props":3743,"children":3744},{"style":577},[3745],{"type":49,"value":502},{"type":43,"tag":403,"props":3747,"children":3748},{"style":437},[3749],{"type":49,"value":456},{"type":43,"tag":403,"props":3751,"children":3752},{"class":405,"line":635},[3753],{"type":43,"tag":403,"props":3754,"children":3755},{"emptyLinePlaceholder":463},[3756],{"type":49,"value":466},{"type":43,"tag":403,"props":3758,"children":3759},{"class":405,"line":662},[3760,3764],{"type":43,"tag":403,"props":3761,"children":3762},{"style":420},[3763],{"type":49,"value":2908},{"type":43,"tag":403,"props":3765,"children":3766},{"style":437},[3767],{"type":49,"value":2185},{"type":43,"tag":403,"props":3769,"children":3770},{"class":405,"line":693},[3771,3775,3779,3783,3787,3791,3795,3799,3803,3807,3811],{"type":43,"tag":403,"props":3772,"children":3773},{"style":473},[3774],{"type":49,"value":2535},{"type":43,"tag":403,"props":3776,"children":3777},{"style":426},[3778],{"type":49,"value":720},{"type":43,"tag":403,"props":3780,"children":3781},{"style":437},[3782],{"type":49,"value":2545},{"type":43,"tag":403,"props":3784,"children":3785},{"style":420},[3786],{"type":49,"value":536},{"type":43,"tag":403,"props":3788,"children":3789},{"style":426},[3790],{"type":49,"value":541},{"type":43,"tag":403,"props":3792,"children":3793},{"style":437},[3794],{"type":49,"value":546},{"type":43,"tag":403,"props":3796,"children":3797},{"style":426},[3798],{"type":49,"value":551},{"type":43,"tag":403,"props":3800,"children":3801},{"style":437},[3802],{"type":49,"value":546},{"type":43,"tag":403,"props":3804,"children":3805},{"style":494},[3806],{"type":49,"value":560},{"type":43,"tag":403,"props":3808,"children":3809},{"style":577},[3810],{"type":49,"value":565},{"type":43,"tag":403,"props":3812,"children":3813},{"style":437},[3814],{"type":49,"value":570},{"type":43,"tag":403,"props":3816,"children":3817},{"class":405,"line":701},[3818,3822,3826,3830,3834,3838],{"type":43,"tag":403,"props":3819,"children":3820},{"style":577},[3821],{"type":49,"value":3080},{"type":43,"tag":403,"props":3823,"children":3824},{"style":437},[3825],{"type":49,"value":585},{"type":43,"tag":403,"props":3827,"children":3828},{"style":437},[3829],{"type":49,"value":440},{"type":43,"tag":403,"props":3831,"children":3832},{"style":443},[3833],{"type":49,"value":161},{"type":43,"tag":403,"props":3835,"children":3836},{"style":437},[3837],{"type":49,"value":451},{"type":43,"tag":403,"props":3839,"children":3840},{"style":437},[3841],{"type":49,"value":602},{"type":43,"tag":403,"props":3843,"children":3844},{"class":405,"line":1237},[3845,3849,3853,3857],{"type":43,"tag":403,"props":3846,"children":3847},{"style":577},[3848],{"type":49,"value":3093},{"type":43,"tag":403,"props":3850,"children":3851},{"style":437},[3852],{"type":49,"value":585},{"type":43,"tag":403,"props":3854,"children":3855},{"style":426},[3856],{"type":49,"value":2929},{"type":43,"tag":403,"props":3858,"children":3859},{"style":437},[3860],{"type":49,"value":602},{"type":43,"tag":403,"props":3862,"children":3863},{"class":405,"line":1261},[3864,3868,3872,3876,3880,3884],{"type":43,"tag":403,"props":3865,"children":3866},{"style":577},[3867],{"type":49,"value":3114},{"type":43,"tag":403,"props":3869,"children":3870},{"style":437},[3871],{"type":49,"value":585},{"type":43,"tag":403,"props":3873,"children":3874},{"style":437},[3875],{"type":49,"value":440},{"type":43,"tag":403,"props":3877,"children":3878},{"style":443},[3879],{"type":49,"value":654},{"type":43,"tag":403,"props":3881,"children":3882},{"style":437},[3883],{"type":49,"value":451},{"type":43,"tag":403,"props":3885,"children":3886},{"style":437},[3887],{"type":49,"value":602},{"type":43,"tag":403,"props":3889,"children":3890},{"class":405,"line":28},[3891,3895,3899,3903,3907,3911,3915,3919],{"type":43,"tag":403,"props":3892,"children":3893},{"style":437},[3894],{"type":49,"value":3127},{"type":43,"tag":403,"props":3896,"children":3897},{"style":577},[3898],{"type":49,"value":565},{"type":43,"tag":403,"props":3900,"children":3901},{"style":426},[3902],{"type":49,"value":1796},{"type":43,"tag":403,"props":3904,"children":3905},{"style":437},[3906],{"type":49,"value":3140},{"type":43,"tag":403,"props":3908,"children":3909},{"style":437},[3910],{"type":49,"value":2509},{"type":43,"tag":403,"props":3912,"children":3913},{"style":426},[3914],{"type":49,"value":2988},{"type":43,"tag":403,"props":3916,"children":3917},{"style":437},[3918],{"type":49,"value":2993},{"type":43,"tag":403,"props":3920,"children":3921},{"style":577},[3922],{"type":49,"value":1022},{"type":43,"tag":403,"props":3924,"children":3925},{"class":405,"line":2447},[3926,3930,3934,3938,3942,3946],{"type":43,"tag":403,"props":3927,"children":3928},{"style":437},[3929],{"type":49,"value":3185},{"type":43,"tag":403,"props":3931,"children":3932},{"style":577},[3933],{"type":49,"value":673},{"type":43,"tag":403,"props":3935,"children":3936},{"style":437},[3937],{"type":49,"value":546},{"type":43,"tag":403,"props":3939,"children":3940},{"style":494},[3941],{"type":49,"value":682},{"type":43,"tag":403,"props":3943,"children":3944},{"style":577},[3945],{"type":49,"value":502},{"type":43,"tag":403,"props":3947,"children":3948},{"style":437},[3949],{"type":49,"value":456},{"type":43,"tag":403,"props":3951,"children":3952},{"class":405,"line":2456},[3953],{"type":43,"tag":403,"props":3954,"children":3955},{"emptyLinePlaceholder":463},[3956],{"type":49,"value":466},{"type":43,"tag":403,"props":3958,"children":3959},{"class":405,"line":2529},[3960,3964,3968,3972,3976,3980,3984,3988,3992,3996,4000,4004,4008,4012,4016,4020,4024],{"type":43,"tag":403,"props":3961,"children":3962},{"style":420},[3963],{"type":49,"value":2751},{"type":43,"tag":403,"props":3965,"children":3966},{"style":426},[3967],{"type":49,"value":3573},{"type":43,"tag":403,"props":3969,"children":3970},{"style":437},[3971],{"type":49,"value":546},{"type":43,"tag":403,"props":3973,"children":3974},{"style":494},[3975],{"type":49,"value":2053},{"type":43,"tag":403,"props":3977,"children":3978},{"style":577},[3979],{"type":49,"value":565},{"type":43,"tag":403,"props":3981,"children":3982},{"style":437},[3983],{"type":49,"value":3239},{"type":43,"tag":403,"props":3985,"children":3986},{"style":577},[3987],{"type":49,"value":3244},{"type":43,"tag":403,"props":3989,"children":3990},{"style":437},[3991],{"type":49,"value":585},{"type":43,"tag":403,"props":3993,"children":3994},{"style":426},[3995],{"type":49,"value":720},{"type":43,"tag":403,"props":3997,"children":3998},{"style":437},[3999],{"type":49,"value":546},{"type":43,"tag":403,"props":4001,"children":4002},{"style":426},[4003],{"type":49,"value":3261},{"type":43,"tag":403,"props":4005,"children":4006},{"style":577},[4007],{"type":49,"value":3266},{"type":43,"tag":403,"props":4009,"children":4010},{"style":732},[4011],{"type":49,"value":735},{"type":43,"tag":403,"props":4013,"children":4014},{"style":577},[4015],{"type":49,"value":3275},{"type":43,"tag":403,"props":4017,"children":4018},{"style":437},[4019],{"type":49,"value":668},{"type":43,"tag":403,"props":4021,"children":4022},{"style":577},[4023],{"type":49,"value":673},{"type":43,"tag":403,"props":4025,"children":4026},{"style":437},[4027],{"type":49,"value":456},{"type":43,"tag":403,"props":4029,"children":4030},{"class":405,"line":2573},[4031,4035,4039,4043,4047,4051],{"type":43,"tag":403,"props":4032,"children":4033},{"style":437},[4034],{"type":49,"value":2801},{"type":43,"tag":403,"props":4036,"children":4037},{"style":420},[4038],{"type":49,"value":3300},{"type":43,"tag":403,"props":4040,"children":4041},{"style":577},[4042],{"type":49,"value":2198},{"type":43,"tag":403,"props":4044,"children":4045},{"style":426},[4046],{"type":49,"value":3309},{"type":43,"tag":403,"props":4048,"children":4049},{"style":577},[4050],{"type":49,"value":2399},{"type":43,"tag":403,"props":4052,"children":4053},{"style":437},[4054],{"type":49,"value":570},{"type":43,"tag":403,"props":4056,"children":4057},{"class":405,"line":2657},[4058,4062,4066,4070,4074],{"type":43,"tag":403,"props":4059,"children":4060},{"style":420},[4061],{"type":49,"value":2751},{"type":43,"tag":403,"props":4063,"children":4064},{"style":426},[4065],{"type":49,"value":3573},{"type":43,"tag":403,"props":4067,"children":4068},{"style":437},[4069],{"type":49,"value":546},{"type":43,"tag":403,"props":4071,"children":4072},{"style":494},[4073],{"type":49,"value":2053},{"type":43,"tag":403,"props":4075,"children":4076},{"style":577},[4077],{"type":49,"value":983},{"type":43,"tag":403,"props":4079,"children":4080},{"class":405,"line":2745},[4081,4086,4090,4094,4098,4103,4107,4112,4116,4120,4124,4129,4133,4138,4142],{"type":43,"tag":403,"props":4082,"children":4083},{"style":437},[4084],{"type":49,"value":4085},"      {",{"type":43,"tag":403,"props":4087,"children":4088},{"style":577},[4089],{"type":49,"value":3360},{"type":43,"tag":403,"props":4091,"children":4092},{"style":437},[4093],{"type":49,"value":585},{"type":43,"tag":403,"props":4095,"children":4096},{"style":426},[4097],{"type":49,"value":3360},{"type":43,"tag":403,"props":4099,"children":4100},{"style":437},[4101],{"type":49,"value":4102}," instanceof",{"type":43,"tag":403,"props":4104,"children":4105},{"style":3682},[4106],{"type":49,"value":2244},{"type":43,"tag":403,"props":4108,"children":4109},{"style":437},[4110],{"type":49,"value":4111}," ?",{"type":43,"tag":403,"props":4113,"children":4114},{"style":426},[4115],{"type":49,"value":3360},{"type":43,"tag":403,"props":4117,"children":4118},{"style":437},[4119],{"type":49,"value":546},{"type":43,"tag":403,"props":4121,"children":4122},{"style":426},[4123],{"type":49,"value":3435},{"type":43,"tag":403,"props":4125,"children":4126},{"style":437},[4127],{"type":49,"value":4128}," :",{"type":43,"tag":403,"props":4130,"children":4131},{"style":437},[4132],{"type":49,"value":440},{"type":43,"tag":403,"props":4134,"children":4135},{"style":443},[4136],{"type":49,"value":4137},"Generation failed",{"type":43,"tag":403,"props":4139,"children":4140},{"style":437},[4141],{"type":49,"value":451},{"type":43,"tag":403,"props":4143,"children":4144},{"style":437},[4145],{"type":49,"value":1473},{"type":43,"tag":403,"props":4147,"children":4148},{"class":405,"line":2795},[4149,4153,4158,4162,4167],{"type":43,"tag":403,"props":4150,"children":4151},{"style":437},[4152],{"type":49,"value":4085},{"type":43,"tag":403,"props":4154,"children":4155},{"style":577},[4156],{"type":49,"value":4157}," status",{"type":43,"tag":403,"props":4159,"children":4160},{"style":437},[4161],{"type":49,"value":585},{"type":43,"tag":403,"props":4163,"children":4164},{"style":732},[4165],{"type":49,"value":4166}," 500",{"type":43,"tag":403,"props":4168,"children":4169},{"style":437},[4170],{"type":49,"value":1222},{"type":43,"tag":403,"props":4172,"children":4173},{"class":405,"line":2812},[4174,4179],{"type":43,"tag":403,"props":4175,"children":4176},{"style":577},[4177],{"type":49,"value":4178},"    )",{"type":43,"tag":403,"props":4180,"children":4181},{"style":437},[4182],{"type":49,"value":456},{"type":43,"tag":403,"props":4184,"children":4185},{"class":405,"line":2821},[4186],{"type":43,"tag":403,"props":4187,"children":4188},{"style":437},[4189],{"type":49,"value":3456},{"type":43,"tag":403,"props":4191,"children":4192},{"class":405,"line":2829},[4193],{"type":43,"tag":403,"props":4194,"children":4195},{"style":437},[4196],{"type":49,"value":2818},{"type":43,"tag":385,"props":4198,"children":4200},{"id":4199},"example-fastapi-route",[4201],{"type":49,"value":4202},"Example: FastAPI Route",{"type":43,"tag":392,"props":4204,"children":4206},{"className":747,"code":4205,"language":749,"meta":397,"style":397},"from fastapi import FastAPI, HTTPException\nfrom pydantic import BaseModel\nfrom runwayml import RunwayML\n\napp = FastAPI()\nclient = RunwayML()\n\nclass ImageRequest(BaseModel):\n    prompt: str\n    model: str = \"gen4_image\"\n    ratio: str = \"1280:720\"\n    reference_images: list[dict] | None = None\n\n@app.post(\"\u002Fapi\u002Fgenerate-image\")\nasync def generate_image(req: ImageRequest):\n    try:\n        params = {\n            \"model\": req.model,\n            \"prompt_text\": req.prompt,\n            \"ratio\": req.ratio,\n        }\n        if req.reference_images:\n            params[\"reference_images\"] = req.reference_images\n\n        task = client.text_to_image.create(**params).wait_for_task_output()\n        return {\"image_url\": task.output[0]}\n    except Exception as e:\n        raise HTTPException(status_code=500, detail=str(e))\n",[4207],{"type":43,"tag":68,"props":4208,"children":4209},{"__ignoreMap":397},[4210,4218,4226,4233,4240,4248,4255,4262,4270,4278,4286,4294,4302,4309,4317,4325,4333,4341,4349,4357,4365,4373,4381,4389,4396,4404,4412,4420],{"type":43,"tag":403,"props":4211,"children":4212},{"class":405,"line":406},[4213],{"type":43,"tag":403,"props":4214,"children":4215},{},[4216],{"type":49,"value":4217},"from fastapi import FastAPI, HTTPException\n",{"type":43,"tag":403,"props":4219,"children":4220},{"class":405,"line":416},[4221],{"type":43,"tag":403,"props":4222,"children":4223},{},[4224],{"type":49,"value":4225},"from pydantic import BaseModel\n",{"type":43,"tag":403,"props":4227,"children":4228},{"class":405,"line":459},[4229],{"type":43,"tag":403,"props":4230,"children":4231},{},[4232],{"type":49,"value":769},{"type":43,"tag":403,"props":4234,"children":4235},{"class":405,"line":469},[4236],{"type":43,"tag":403,"props":4237,"children":4238},{"emptyLinePlaceholder":463},[4239],{"type":49,"value":466},{"type":43,"tag":403,"props":4241,"children":4242},{"class":405,"line":509},[4243],{"type":43,"tag":403,"props":4244,"children":4245},{},[4246],{"type":49,"value":4247},"app = FastAPI()\n",{"type":43,"tag":403,"props":4249,"children":4250},{"class":405,"line":517},[4251],{"type":43,"tag":403,"props":4252,"children":4253},{},[4254],{"type":49,"value":784},{"type":43,"tag":403,"props":4256,"children":4257},{"class":405,"line":573},[4258],{"type":43,"tag":403,"props":4259,"children":4260},{"emptyLinePlaceholder":463},[4261],{"type":49,"value":466},{"type":43,"tag":403,"props":4263,"children":4264},{"class":405,"line":605},[4265],{"type":43,"tag":403,"props":4266,"children":4267},{},[4268],{"type":49,"value":4269},"class ImageRequest(BaseModel):\n",{"type":43,"tag":403,"props":4271,"children":4272},{"class":405,"line":635},[4273],{"type":43,"tag":403,"props":4274,"children":4275},{},[4276],{"type":49,"value":4277},"    prompt: str\n",{"type":43,"tag":403,"props":4279,"children":4280},{"class":405,"line":662},[4281],{"type":43,"tag":403,"props":4282,"children":4283},{},[4284],{"type":49,"value":4285},"    model: str = \"gen4_image\"\n",{"type":43,"tag":403,"props":4287,"children":4288},{"class":405,"line":693},[4289],{"type":43,"tag":403,"props":4290,"children":4291},{},[4292],{"type":49,"value":4293},"    ratio: str = \"1280:720\"\n",{"type":43,"tag":403,"props":4295,"children":4296},{"class":405,"line":701},[4297],{"type":43,"tag":403,"props":4298,"children":4299},{},[4300],{"type":49,"value":4301},"    reference_images: list[dict] | None = None\n",{"type":43,"tag":403,"props":4303,"children":4304},{"class":405,"line":1237},[4305],{"type":43,"tag":403,"props":4306,"children":4307},{"emptyLinePlaceholder":463},[4308],{"type":49,"value":466},{"type":43,"tag":403,"props":4310,"children":4311},{"class":405,"line":1261},[4312],{"type":43,"tag":403,"props":4313,"children":4314},{},[4315],{"type":49,"value":4316},"@app.post(\"\u002Fapi\u002Fgenerate-image\")\n",{"type":43,"tag":403,"props":4318,"children":4319},{"class":405,"line":28},[4320],{"type":43,"tag":403,"props":4321,"children":4322},{},[4323],{"type":49,"value":4324},"async def generate_image(req: ImageRequest):\n",{"type":43,"tag":403,"props":4326,"children":4327},{"class":405,"line":2447},[4328],{"type":43,"tag":403,"props":4329,"children":4330},{},[4331],{"type":49,"value":4332},"    try:\n",{"type":43,"tag":403,"props":4334,"children":4335},{"class":405,"line":2456},[4336],{"type":43,"tag":403,"props":4337,"children":4338},{},[4339],{"type":49,"value":4340},"        params = {\n",{"type":43,"tag":403,"props":4342,"children":4343},{"class":405,"line":2529},[4344],{"type":43,"tag":403,"props":4345,"children":4346},{},[4347],{"type":49,"value":4348},"            \"model\": req.model,\n",{"type":43,"tag":403,"props":4350,"children":4351},{"class":405,"line":2573},[4352],{"type":43,"tag":403,"props":4353,"children":4354},{},[4355],{"type":49,"value":4356},"            \"prompt_text\": req.prompt,\n",{"type":43,"tag":403,"props":4358,"children":4359},{"class":405,"line":2657},[4360],{"type":43,"tag":403,"props":4361,"children":4362},{},[4363],{"type":49,"value":4364},"            \"ratio\": req.ratio,\n",{"type":43,"tag":403,"props":4366,"children":4367},{"class":405,"line":2745},[4368],{"type":43,"tag":403,"props":4369,"children":4370},{},[4371],{"type":49,"value":4372},"        }\n",{"type":43,"tag":403,"props":4374,"children":4375},{"class":405,"line":2795},[4376],{"type":43,"tag":403,"props":4377,"children":4378},{},[4379],{"type":49,"value":4380},"        if req.reference_images:\n",{"type":43,"tag":403,"props":4382,"children":4383},{"class":405,"line":2812},[4384],{"type":43,"tag":403,"props":4385,"children":4386},{},[4387],{"type":49,"value":4388},"            params[\"reference_images\"] = req.reference_images\n",{"type":43,"tag":403,"props":4390,"children":4391},{"class":405,"line":2821},[4392],{"type":43,"tag":403,"props":4393,"children":4394},{"emptyLinePlaceholder":463},[4395],{"type":49,"value":466},{"type":43,"tag":403,"props":4397,"children":4398},{"class":405,"line":2829},[4399],{"type":43,"tag":403,"props":4400,"children":4401},{},[4402],{"type":49,"value":4403},"        task = client.text_to_image.create(**params).wait_for_task_output()\n",{"type":43,"tag":403,"props":4405,"children":4406},{"class":405,"line":2902},[4407],{"type":43,"tag":403,"props":4408,"children":4409},{},[4410],{"type":49,"value":4411},"        return {\"image_url\": task.output[0]}\n",{"type":43,"tag":403,"props":4413,"children":4414},{"class":405,"line":2915},[4415],{"type":43,"tag":403,"props":4416,"children":4417},{},[4418],{"type":49,"value":4419},"    except Exception as e:\n",{"type":43,"tag":403,"props":4421,"children":4422},{"class":405,"line":3018},[4423],{"type":43,"tag":403,"props":4424,"children":4425},{},[4426],{"type":49,"value":4427},"        raise HTTPException(status_code=500, detail=str(e))\n",{"type":43,"tag":106,"props":4429,"children":4431},{"id":4430},"tips",[4432],{"type":49,"value":4433},"Tips",{"type":43,"tag":239,"props":4435,"children":4436},{},[4437,4447,4478,4501],{"type":43,"tag":243,"props":4438,"children":4439},{},[4440,4445],{"type":43,"tag":60,"props":4441,"children":4442},{},[4443],{"type":49,"value":4444},"Output URLs expire in 24-48 hours.",{"type":49,"value":4446}," Download images to your own storage immediately.",{"type":43,"tag":243,"props":4448,"children":4449},{},[4450,4462,4464,4469,4471,4476],{"type":43,"tag":60,"props":4451,"children":4452},{},[4453,4455,4460],{"type":49,"value":4454},"Reference images use ",{"type":43,"tag":68,"props":4456,"children":4458},{"className":4457},[],[4459],{"type":49,"value":863},{"type":49,"value":4461}," syntax",{"type":49,"value":4463}," in the prompt — the tag must match the ",{"type":43,"tag":68,"props":4465,"children":4467},{"className":4466},[],[4468],{"type":49,"value":16},{"type":49,"value":4470}," field in the ",{"type":43,"tag":68,"props":4472,"children":4474},{"className":4473},[],[4475],{"type":49,"value":1796},{"type":49,"value":4477}," array.",{"type":43,"tag":243,"props":4479,"children":4480},{},[4481,4486,4488,4493,4495,4500],{"type":43,"tag":60,"props":4482,"children":4483},{},[4484],{"type":49,"value":4485},"For local files",{"type":49,"value":4487},", always upload via ",{"type":43,"tag":68,"props":4489,"children":4491},{"className":4490},[],[4492],{"type":49,"value":97},{"type":49,"value":4494}," first, then use the ",{"type":43,"tag":68,"props":4496,"children":4498},{"className":4497},[],[4499],{"type":49,"value":313},{"type":49,"value":889},{"type":43,"tag":243,"props":4502,"children":4503},{},[4504,4512],{"type":43,"tag":60,"props":4505,"children":4506},{},[4507],{"type":43,"tag":68,"props":4508,"children":4510},{"className":4509},[],[4511],{"type":49,"value":188},{"type":49,"value":4513}," is the cheapest option at 2 credits per image — good for prototyping.",{"type":43,"tag":4515,"props":4516,"children":4517},"style",{},[4518],{"type":49,"value":4519},"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":4521,"total":2529},[4522,4538,4547,4561,4576,4589,4600,4611,4625,4643,4654,4674],{"slug":4523,"name":4523,"fn":4524,"description":4525,"org":4526,"tags":4527,"stars":24,"repoUrl":25,"updatedAt":4537},"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},[4528,4531,4532,4534],{"name":4529,"slug":4530,"type":16},"AI Infrastructure","ai-infrastructure",{"name":19,"slug":20,"type":16},{"name":1213,"slug":4533,"type":16},"reference",{"name":4535,"slug":4536,"type":16},"Video","video","2026-04-08T04:41:58.820783",{"slug":4539,"name":4539,"fn":4540,"description":4541,"org":4542,"tags":4543,"stars":24,"repoUrl":25,"updatedAt":4546},"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},[4544,4545],{"name":19,"slug":20,"type":16},{"name":9,"slug":8,"type":16},"2026-04-08T04:42:01.271257",{"slug":4548,"name":4548,"fn":4549,"description":4550,"org":4551,"tags":4552,"stars":24,"repoUrl":25,"updatedAt":4560},"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},[4553,4556,4559],{"name":4554,"slug":4555,"type":16},"Operations","operations",{"name":4557,"slug":4558,"type":16},"Reporting","reporting",{"name":9,"slug":8,"type":16},"2026-04-08T04:42:00.054235",{"slug":4562,"name":4562,"fn":4563,"description":4564,"org":4565,"tags":4566,"stars":24,"repoUrl":25,"updatedAt":4575},"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},[4567,4568,4571,4574],{"name":19,"slug":20,"type":16},{"name":4569,"slug":4570,"type":16},"Documentation","documentation",{"name":4572,"slug":4573,"type":16},"Research","research",{"name":9,"slug":8,"type":16},"2026-04-08T04:42:07.604739",{"slug":4577,"name":4577,"fn":4578,"description":4579,"org":4580,"tags":4581,"stars":24,"repoUrl":25,"updatedAt":4588},"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},[4582,4583,4586,4587],{"name":4529,"slug":4530,"type":16},{"name":4584,"slug":4585,"type":16},"Audio","audio",{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},"2026-04-17T04:51:59.892185",{"slug":4590,"name":4590,"fn":4591,"description":4592,"org":4593,"tags":4594,"stars":24,"repoUrl":25,"updatedAt":4599},"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},[4595,4596,4597,4598],{"name":4529,"slug":4530,"type":16},{"name":14,"slug":15,"type":16},{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16},"2026-04-17T04:52:01.158325",{"slug":4601,"name":4601,"fn":4602,"description":4603,"org":4604,"tags":4605,"stars":24,"repoUrl":25,"updatedAt":4610},"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},[4606,4607,4608,4609],{"name":4529,"slug":4530,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":4535,"slug":4536,"type":16},"2026-04-17T04:51:58.600919",{"slug":4612,"name":4612,"fn":4613,"description":4614,"org":4615,"tags":4616,"stars":24,"repoUrl":25,"updatedAt":4624},"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},[4617,4618,4619,4620,4621],{"name":19,"slug":20,"type":16},{"name":4584,"slug":4585,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":4622,"slug":4623,"type":16},"Speech","speech","2026-04-08T04:42:10.081814",{"slug":4626,"name":4626,"fn":4627,"description":4628,"org":4629,"tags":4630,"stars":24,"repoUrl":25,"updatedAt":4642},"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},[4631,4632,4635,4638,4639],{"name":19,"slug":20,"type":16},{"name":4633,"slug":4634,"type":16},"Frontend","frontend",{"name":4636,"slug":4637,"type":16},"React","react",{"name":9,"slug":8,"type":16},{"name":4640,"slug":4641,"type":16},"UI Components","ui-components","2026-04-08T04:42:08.849481",{"slug":4644,"name":4644,"fn":4645,"description":4646,"org":4647,"tags":4648,"stars":24,"repoUrl":25,"updatedAt":4653},"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},[4649,4650,4651,4652],{"name":19,"slug":20,"type":16},{"name":4584,"slug":4585,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},"2026-04-08T04:42:06.171483",{"slug":4655,"name":4655,"fn":4656,"description":4657,"org":4658,"tags":4659,"stars":24,"repoUrl":25,"updatedAt":4673},"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},[4660,4663,4666,4669,4672],{"name":4661,"slug":4662,"type":16},"Agents","agents",{"name":4664,"slug":4665,"type":16},"AI Context","ai-context",{"name":4667,"slug":4668,"type":16},"Documents","documents",{"name":4670,"slug":4671,"type":16},"Knowledge Management","knowledge-management",{"name":9,"slug":8,"type":16},"2026-04-08T04:42:04.95186",{"slug":4,"name":4,"fn":5,"description":6,"org":4675,"tags":4676,"stars":24,"repoUrl":25,"updatedAt":26},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4677,4678,4679,4680],{"name":19,"slug":20,"type":16},{"name":14,"slug":15,"type":16},{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16},{"items":4682,"total":2456},[4683,4690,4695,4701,4708,4715,4722],{"slug":4523,"name":4523,"fn":4524,"description":4525,"org":4684,"tags":4685,"stars":24,"repoUrl":25,"updatedAt":4537},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4686,4687,4688,4689],{"name":4529,"slug":4530,"type":16},{"name":19,"slug":20,"type":16},{"name":1213,"slug":4533,"type":16},{"name":4535,"slug":4536,"type":16},{"slug":4539,"name":4539,"fn":4540,"description":4541,"org":4691,"tags":4692,"stars":24,"repoUrl":25,"updatedAt":4546},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4693,4694],{"name":19,"slug":20,"type":16},{"name":9,"slug":8,"type":16},{"slug":4548,"name":4548,"fn":4549,"description":4550,"org":4696,"tags":4697,"stars":24,"repoUrl":25,"updatedAt":4560},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4698,4699,4700],{"name":4554,"slug":4555,"type":16},{"name":4557,"slug":4558,"type":16},{"name":9,"slug":8,"type":16},{"slug":4562,"name":4562,"fn":4563,"description":4564,"org":4702,"tags":4703,"stars":24,"repoUrl":25,"updatedAt":4575},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4704,4705,4706,4707],{"name":19,"slug":20,"type":16},{"name":4569,"slug":4570,"type":16},{"name":4572,"slug":4573,"type":16},{"name":9,"slug":8,"type":16},{"slug":4577,"name":4577,"fn":4578,"description":4579,"org":4709,"tags":4710,"stars":24,"repoUrl":25,"updatedAt":4588},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4711,4712,4713,4714],{"name":4529,"slug":4530,"type":16},{"name":4584,"slug":4585,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"slug":4590,"name":4590,"fn":4591,"description":4592,"org":4716,"tags":4717,"stars":24,"repoUrl":25,"updatedAt":4599},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4718,4719,4720,4721],{"name":4529,"slug":4530,"type":16},{"name":14,"slug":15,"type":16},{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16},{"slug":4601,"name":4601,"fn":4602,"description":4603,"org":4723,"tags":4724,"stars":24,"repoUrl":25,"updatedAt":4610},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4725,4726,4727,4728],{"name":4529,"slug":4530,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":4535,"slug":4536,"type":16}]