API Doc-CometAPI
English
  • English
  • Русский
HomeDashBoardModel Marketplace
HomeDashBoardModel Marketplace
Discord_Support
English
  • English
  • Русский
  1. Replicate(image)
  • 🚀 Overview
    • Quick Start
    • Important Guidelines
    • Release Notes
    • Quickly request CometAPI via ApiDog
    • Models
  • 💬 Text Models
    • Chat
    • Responses
    • Anthropic Messages
    • Gemini Generating Content
    • Embeddings
  • 🖼️ Image Models
    • OpenAI
      • gpt-4o-image generates image
      • Images
      • Image Editing (gpt-image-1)
    • Midjourney
      • Midjourney Quick Start: Complete Image Generation Workflow in One Go
      • Task Fetching API
        • List by Condition
        • Fetch Single Task (most recommended)
      • Submit Editor
      • Imagine
      • Submit Video
      • Action (UPSCALE; VARIATION; REROLL; ZOOM, etc.)
      • Blend (image -> image)
      • Describe (image -> text)
      • Modal (Area Redesign & Zoom)
    • Replicate(image)
      • Create Predictions - General
        POST
      • replicate query
        GET
    • seededit/seedream
      • bytedance-Image Editing (seededit)
      • bytedance-image-generation(seedream)
    • bria
      • Generate Image
      • Generate Vector Graphics - Base (Beta)
      • Image Editing
      • Query Status
    • Gemini
      • Guide to calling gemini-2.5-flash-image (Nano Banana)
      • Gemini generates image
    • Hunyuan3D
      POST
  • 📺 Video Models
    • sora-2
      • official
        • Create video
        • Remix video
        • Retrieve video
        • Retrieve video content
      • self-developed
        • Retrieve video
        • Create video
    • veo3
      • veo3-chat format
      • Submit video generation task
      • Query video generation status
    • kling (video)
      • callback_url
      • Multimodal Video Editing
        • Initialize Video for Editing
        • Add Video Selection
        • Delete Video Selection
        • Clear Video Selection
        • Preview Selected Video Area
        • Create Task
      • Image Generation Video
      • Generating images
      • Expanded
      • Text Generation Video
      • Multi-Image To Video
      • Multi-Image to Image
      • Video Extension
      • virtual try-on
      • [Counterpart] Face Recognition
      • [Counterpart] Creating Tasks
      • Kling Image Recognize
      • Kling TTS
      • Kling Avatar
      • lip sync
      • effects
      • Video to audio
      • Text to audio
      • Individual queries
    • runway(video)
      • official format
        • runway images raw video
        • Generate a video from a video
        • Generate an image from text
        • Upscale a video
        • Control a character
        • runway to get task details
      • Reverse Format
        • generate(text)
        • generate(Reference images)
        • Video to Video Style Redraw
        • Act-one Expression Migration
        • feed-get task
    • bytedance
      • bytedance-video
      • bytedance-video get
    • MiniMax Conch(video)
      • MiniMax Conch Official Documentation
      • MiniMax Conch Generation
      • MiniMax Conch Query
      • MiniMax Conch Download
  • 🎵 Music Models
    • Suno
      • Setting suno Version
      • Suno API Scenario Application Guide
      • Generate lyrics
      • Generate music clip
      • Upload clip
      • Submit concatenation
      • Full Track Audio Separation
      • Single Track Audio Separation
      • Create New Persona
      • add style tags
      • Single task query
      • Generate mp4 mv video
      • Timing: lyrics, audio timeline
      • Get wav format file
      • Get midi
      • Batch query tasks
  • 🔊 Audio Models
    • Realtime
    • Create speech
    • Create transcription
    • Create translation
  • 🧩 Integration Guides
    • LiteLLM
    • Dify
    • Make
    • n8n
    • Lobe-Chat
    • COZE
    • Zapier
    • Activepieces
    • LlamaIndex
    • Continue
    • FlowiseAI
    • Chatbox
    • CherryStudio
    • AnythingLLM
    • LangChain
    • BuildShip
    • gptme
    • Immersive Translation
    • Cline
    • Eudic Translation
    • ChatHub
    • OpenAI Translator
    • ChatAll Translation
    • Pot Translation
    • Zotero
    • NEXT CHAT (ChatGPT Next Web)
    • Obsidian's Text Generator Plugin
    • librechat
    • utools-ChatGPT Friend
    • avante.nvim
    • Open WebUI
    • GPT Academic Optimization (gpt_academic)
    • OpenManus
    • IntelliJ Translation Plugin
    • FastGPT
    • n8n Local Deployment
  • ⚠️ Errors
    • Error Codes & Handling
  • 📝 Code Examples
    • Text-to-Image Generation
    • Image-to-image generation URL upload
    • Regular Post Text Conversation
    • OpenAI Official Library Usage Example
    • Streamed Output
    • Json Fixed Format Output Code Display
    • Embedding code example
    • o1-preview Model Code Example
    • LangChain Usage Example (Successful Test Date: 2024-11-25)
    • Openai dall-e-3 & flux series drawing model
    • gpt, claude, gemini multimodal network image parsing example
    • Multimodal PDF File Parsing Examples for GPT, Claude, and Gemini
    • Code example
  • 🏄🏼‍♀️ Best Practices
    • Midjourney Best Practices
    • Retry Logic Documentation for CometAPI and OpenAI Official API
    • Runway Best Practices
    • Claude Code Installation and Usage Guide
    • Gemini CLI Installation and Usage Guide
    • Codex Usage Guide
    • CometAPI Account Balance Query API Usage Instructions
  • 💳 Pricing & Billing
    • About Pricing
  • 🤝🏼 Support
    • Help Center
    • Interface Stability
    • Privacy policy
    • Terms of service
    • Common Misconceptions
    • Confusion about use
  1. Replicate(image)

Create Predictions - General

POST
https://api.cometapi.com/replicate/v1/models/{models}/predictions
Replicate
Maintainer:Not configured

Overview#

The Replicate Predictions API provides access to generate high-quality images using various FLUX models from Black Forest Labs through the standard Replicate format. This API supports a comprehensive range of FLUX model variants, each optimized for different use cases from rapid prototyping to professional-grade image generation. Users can seamlessly switch between different models by simply changing the model name in the URL path, making it flexible for various creative and commercial applications. The API offers extensive customization options including aspect ratio control, output format selection, quality settings, and advanced generation parameters to fine-tune the image creation process.
Due to significant differences in the parameter lists of various models, please refer to Replicate’s official documentation for more information.

If you want to retrieve the generated result again later, you can use the id returned by this API to obtain the relevant content through the query interface.

Supported Models#

black-forest-labs/flux-kontext-max
black-forest-labs/flux-kontext-pro
black-forest-labs/flux-schnell
black-forest-labs/flux-pro
black-forest-labs/flux-dev
black-forest-labs/flux-1.1-pro-ultra
black-forest-labs/flux-1.1-pro

Reference Documentation#

API Reference: Replicate Predictions API Documentation
CometAPI Documentation: https://apidoc.cometapi.com/replicate-create-predictions

Common Issues#

⚠️ Image Reference Support#

Issue: Image reference functionality is not available for all FLUX models
Solution: Only the flux-kontext model family (flux-kontext-max and flux-kontext-pro) supports the input_image parameter for referencing existing images. Other FLUX models do not support this feature and will generate images based solely on text prompts.

Request

Path Params

Header Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
成功
Body

Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://api.cometapi.com/replicate/v1/models/black-forest-labs/flux-pro/predictions' \
--header 'Authorization: Bearer {{api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
        "prompt": "black forest gateau cake spelling out the words \"FLUX SCHNELL\", tasty, food photography, dynamic shot",
        "input_image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
        "input_image_2": "https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png",
        "input_image_3": "https://filesystem.site/cdn/20250414/chxiLc2O45zoLT8BCrQ6WQlTvGDDnK.png",
        "input_image_4": "https://filesystem.site/cdn/20250414/chxiLc2O45zoLT8BCrQ6WQlTvGDDnK.png",
        "output_format": "jpg",
        "aspect_ratio": "16:9"
    }
}'
Response Response Example
black-forest-labs/flux-kontext-max
{
    "id": "k31cbm70fdrm80ctg73s0zcwgc",
    "model": "black-forest-labs/flux-kontext-max",
    "version": "hidden",
    "input": {
        "aspect_ratio": "16:9",
        "input_image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
        "input_image_2": "https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png",
        "input_image_3": "https://filesystem.site/cdn/20250414/chxiLc2O45zoLT8BCrQ6WQlTvGDDnK.png",
        "input_image_4": "https://filesystem.site/cdn/20250414/chxiLc2O45zoLT8BCrQ6WQlTvGDDnK.png",
        "output_format": "jpg",
        "prompt": "black forest gateau cake spelling out the words \"FLUX SCHNELL\", tasty, food photography, dynamic shot"
    },
    "logs": "",
    "output": null,
    "data_removed": false,
    "error": null,
    "source": "api",
    "status": "starting",
    "created_at": "2025-11-14T09:52:31.355Z",
    "urls": {
        "cancel": "https://api.replicate.com/v1/predictions/k31cbm70fdrm80ctg73s0zcwgc/cancel",
        "get": "https://api.replicate.com/v1/predictions/k31cbm70fdrm80ctg73s0zcwgc",
        "stream": "https://stream.replicate.com/v1/files/bcwr-xbztqryuzofyta6vb5yrmcarksz7rsfopeykdcloxinsrjqad5aq",
        "web": "https://replicate.com/p/k31cbm70fdrm80ctg73s0zcwgc"
    }
}
Modified at 2025-11-14 10:19:07
Previous
Modal (Area Redesign & Zoom)
Next
replicate query
Built with