What can you do with it?
The/replicate
command enables you to run various AI models through the Replicate platform. You can generate images, edit images, convert text to speech, remove backgrounds, and more!
How to use it?
Basic Command Structure
Parameters
Required:authorId
- The author ID of the model (e.g., google, minimax, 851-labs)modelId
- The model ID (e.g., gemini-2.5-flash-image, nano-banana, speech-02-turbo, background-remover)input
- Input parameters specific to the model
version
- Specific model version to usefile_links_expire_in_days
- How long generated files remain accessible (1-7 days, defaults to 7)file_links_expire_in_minutes
- How long generated files remain accessible in minutes (takes precedence over days)
Response Format
The command returns:file_links_expire_in_days
parameter.
Examples
Basic Image Generation
Text-to-Speech
Background Removal
Text-Based Image Editing
Notes
Supported Content Types:- Images: Generate, edit, and transform images
- Audio: Generate speech and audio processing
- Video: NOT SUPPORTED
Model Parameters
Text-to-Speech (minimax/speech-02-turbo)
- text (required): Text to convert to speech (max 5000 chars). Use
<#x#>
for pause control (0.01-99.99s) - pitch: Speech pitch (-12 to 12, default: 0)
- speed: Speech speed (0.5 to 2, default: 1)
- volume: Speech volume (0 to 10, default: 1)
- bitrate: Bitrate (32000, 64000, 128000, 256000, default: 128000)
- channel: Audio channels (“mono”, “stereo”, default: “mono”)
- emotion: Speech emotion (“auto”, “neutral”, “happy”, “sad”, “angry”, “fearful”, “disgusted”, “surprised”, default: “auto”)
- voice_id: Voice ID (default: “Wise_Woman”). Options: Wise_Woman, Friendly_Person, Inspirational_girl, Deep_Voice_Man, Calm_Woman, Casual_Guy, Lively_Girl, Patient_Man, Young_Knight, Determined_Man, Lovely_Girl, Decent_Boy, Imposing_Manner, Elegant_Man, Abbess, Sweet_Girl_2, Exuberant_Girl
- sample_rate: Sample rate (8000, 16000, 22050, 24000, 32000, 44100, default: 32000)
- language_boost: Language enhancement (“None”, “Automatic”, “Chinese”, “Chinese,Yue”, “English”, “Arabic”, “Russian”, “Spanish”, “French”, “Portuguese”, “German”, “Turkish”, “Dutch”, “Ukrainian”, “Vietnamese”, “Indonesian”, “Japanese”, “Italian”, “Korean”, “Thai”, “Polish”, “Romanian”, “Greek”, “Czech”, “Finnish”, “Hindi”, default: “None”)
- english_normalization: Enable English text normalization for better number reading (boolean, default: false, slightly increases latency)
Image Generation (google/gemini-2.5-flash-image)
- prompt (required): Prompt for generated image
- output_format: Format of output images (“jpg”, “png”, default: “png”)
Background Removal (851-labs/background-remover)
- image (required): Input image (URI format)
- threshold: Threshold for hard segmentation (0.0-1.0, default: 0). If 0.0, uses soft alpha
- reverse: If true, remove the foreground instead of the background (boolean, default: false)
- background_type: Background type (default: “rgba”). Options: ‘rgba’, ‘map’, ‘green’, ‘white’, [R,G,B] array, ‘blur’, ‘overlay’, or path to an image
- format: Output format (default: “png”). Examples: png, jpg
Text-Based Image Editing (google/nano-banana)
- prompt (required): Text description of what you want to generate, or instruction on how to edit the given image
- image_input: Optional: Array of image URLs to use as reference
- output_format: Output format (“jpg”, “png”, default: “png”)