# Rw Integrate Uploads

> Help users upload local files to Runway for use as inputs to generation models

- **Type:** Skill
- **Install:** `agentstack add skill-runwayml-skills-rw-integrate-uploads`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [runwayml](https://agentstack.voostack.com/s/runwayml)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [runwayml](https://github.com/runwayml)
- **Source:** https://github.com/runwayml/skills/tree/main/skills/rw-integrate-uploads

## Install

```sh
agentstack add skill-runwayml-skills-rw-integrate-uploads
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Integrate Uploads

> **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.

Help users upload local files (images, videos, audio) to Runway's ephemeral storage for use as inputs to generation models.

## When to Use Uploads

Use the Uploads API when:
- The user has a **local file** (not a public URL) they want to use as input
- The file exceeds **data URI size limits** (5 MB for images, 16 MB for video/audio)
- The file's URL doesn't meet Runway's **URL requirements** (HTTPS, proper headers, no redirects)

**You do NOT need uploads when:**
- The asset is already at a public HTTPS URL with proper headers
- The asset is small enough for a data URI ( {
  try {
    // Upload the user's file to Runway
    const runwayUpload = await client.uploads.createEphemeral(req.file.buffer);

    // Use the uploaded file for video generation
    const task = await client.imageToVideo.create({
      model: 'gen4.5',
      promptImage: runwayUpload.runwayUri,
      promptText: req.body.prompt || 'Animate this image',
      ratio: '1280:720',
      duration: 5
    }).waitForTaskOutput();

    res.json({ videoUrl: task.output[0] });
  } catch (error) {
    console.error('Generation failed:', error);
    res.status(500).json({ error: error.message });
  }
});
```

### Next.js — Upload + Generate

```typescript
// app/api/image-to-video/route.ts
import RunwayML from '@runwayml/sdk';
import { NextRequest, NextResponse } from 'next/server';

const client = new RunwayML();

export async function POST(request: NextRequest) {
  const formData = await request.formData();
  const imageFile = formData.get('image') as File;
  const prompt = formData.get('prompt') as string;

  try {
    // Upload file to Runway
    const upload = await client.uploads.createEphemeral(imageFile);

    // Generate video from the uploaded image
    const task = await client.imageToVideo.create({
      model: 'gen4.5',
      promptImage: upload.runwayUri,
      promptText: prompt || 'Animate this image',
      ratio: '1280:720',
      duration: 5
    }).waitForTaskOutput();

    return NextResponse.json({ videoUrl: task.output[0] });
  } catch (error) {
    return NextResponse.json(
      { error: error instanceof Error ? error.message : 'Failed' },
      { status: 500 }
    );
  }
}
```

### FastAPI — Upload + Generate

```python
from fastapi import FastAPI, UploadFile, Form, HTTPException
from runwayml import RunwayML

app = FastAPI()
client = RunwayML()

@app.post("/api/image-to-video")
async def image_to_video(image: UploadFile, prompt: str = Form("Animate this image")):
    try:
        # Upload to Runway
        content = await image.read()
        upload = client.uploads.create_ephemeral((image.filename, content))

        # Generate video
        task = client.image_to_video.create(
            model="gen4.5",
            prompt_image=upload.runway_uri,
            prompt_text=prompt,
            ratio="1280:720",
            duration=5
        ).wait_for_task_output()

        return {"video_url": task.output[0]}
    except Exception as e:
        raise HTTPException(status_code=500, detail=str(e))
```

## Tips

- **Always upload local files** before passing them to generation endpoints. Don't try to pass local file paths — they won't work.
- **`runway://` URIs expire after 24 hours.** If you need to re-use an asset, upload it again.
- **The SDK handles the presigned URL flow automatically** — prefer the SDK over manual REST calls.
- **For models requiring image/video input** (image-to-video, video-to-video, character performance), upload the asset first, then pass the `runway://` URI.
- **Maximum 200 MB per file** via uploads — larger than URL (16 MB) or data URI (5 MB) limits.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [runwayml](https://github.com/runwayml)
- **Source:** [runwayml/skills](https://github.com/runwayml/skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** yes
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-runwayml-skills-rw-integrate-uploads
- Seller: https://agentstack.voostack.com/s/runwayml
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
