OpenCode agent for running AI models on Replicate
| LICENSE | ||
| README.md | ||
| replicate.md | ||
OpenCode Replicate Agent
An OpenCode agent for running AI models on Replicate.
Installation
Copy replicate.md to your OpenCode agents directory:
# Global installation (available in all projects)
cp replicate.md ~/.config/opencode/agents/
# Or project-specific installation
mkdir -p .opencode/agents
cp replicate.md .opencode/agents/
Setup
Set your Replicate API token:
export REPLICATE_API_TOKEN="r8_your_token_here"
Get your token at https://replicate.com/account/api-tokens
Usage
In OpenCode, invoke the Replicate agent:
@replicate generate an image of a cat wearing a wizard hat
Or let OpenCode automatically use it when you mention running models:
run flux to generate a landscape photo
What it can do
- Image generation - Flux, SDXL, and more
- Video generation - Luma Ray, Minimax, Kling
- Audio/Speech - Text-to-speech, speech-to-text
- Language models - Llama, Mistral, and others
- Custom models - Any public model on Replicate
Popular models
| Model | Use case |
|---|---|
black-forest-labs/flux-1.1-pro |
High-quality images |
black-forest-labs/flux-schnell |
Fast images |
luma/ray |
Video generation |
jaaari/kokoro-82m |
Text-to-speech |
openai/whisper |
Speech-to-text |
License
MIT