Skip to content
Back to skills

Replicate

ASecurity

Replicate lets developers run open-source AI models in the cloud through a unified API. Run models for image generation (Flux, Stable Diffusion), video synthesis, voice, and multimodal reasoning.

  • 13 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 21, 2026
ai-agentstypescriptbashapidatabase

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 21, 2026

npx -y skills add ashish7802/awesome-api-skills --skill replicate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Replicate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Replicate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ashish7802-replicate/badge)](https://www.skillsdirectory.com/skills/ashish7802-replicate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Replicate API Skill

## Overview
Replicate lets developers run open-source AI models in the cloud through a unified API. Run models for image generation (Flux, Stable Diffusion), video synthesis, voice, and multimodal reasoning.

## Installation
```bash
npm install replicate
pip install replicate
```

## Authentication & Setup
```typescript
import Replicate from 'replicate';

const replicate = new Replicate({
  auth: process.env.REPLICATE_API_TOKEN,
});
```

## Core API Operations

### 1. Run Image Generation Model (Flux.1 Schnell)
```typescript
const output = await replicate.run(
  'black-forest-labs/flux-schnell',
  {
    input: {
      prompt: 'A futuristic cybernetic library with glowing neon data conduits',
      aspect_ratio: '16:9',
      num_outputs: 1,
    },
  }
);

console.log('Generated image URL:', output);
```

### 2. Asynchronous Prediction with Webhooks
```typescript
const prediction = await replicate.predictions.create({
  model: 'black-forest-labs/flux-dev',
  input: {
    prompt: 'Hyper-realistic macro photography of a mechanical bumblebee',
  },
  webhook: 'https://api.myapp.com/api/webhooks/replicate',
  webhook_events_filter: ['completed'],
});

console.log('Prediction started:', prediction.id);
```

### 3. Stream Model Output
```typescript
for await (const event of replicate.stream('meta/meta-llama-3-70b-instruct', {
  input: {
    prompt: 'Write a comprehensive guide to database indexing.',
  },
})) {
  process.stdout.write(event.toString());
}
```

## AI Pitfalls & Anti-Hallucination Guidelines
- **Temporary Asset URLs**: Output image/video URLs returned by Replicate expire after a period of time. Always download and persist them in your own object store (S3, Cloudflare R2).
- **GPU Cold Boots**: Handle cold start delays gracefully in UI with progress polling.

## Production Verification Checklist
- [ ] Output assets transferred to private persistent object storage
- [ ] Webhook signatures verified on completion callbacks
- [ ] Client timeouts configured to allow for GPU allocation

---
> **Last Verified:** 2026-07-03

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.