ChainHub API Guide
  1. Replicate Aggregation Platform
  • How to use ChainHub
  • Overview
    • Quick Start
    • Important Guidelines
    • Examples
    • Pricing
    • Error Codes
  • Chat
    • Chat
    • ChatGPT Interface
      • ChatGPT Audio
        • Audio to text conversion gpt-4o-transcribe
        • Creating voice gpt-4o-mini-tts
        • Create Translation (Not Supported)
      • ChatGPT Embeddings
        • Create an embed
      • ChatGPT Auto-Completion
        • Creation complete
      • Chat (Responses)
        • Create function call Copy
      • GPTs Related
        • GPTs Dialogue
    • Google Gemini API
      • Gemini Chat
      • Chat Compatible Format
        • Gemini-2.5-flash-all
        • Chat interface
        • Image recognition interface
      • Native Format
        • Embeddings
        • Create text - flow
        • Text generation + thinking-flow
        • Image generation
        • Image generation gemini-2.5-flash-image: Controlling aspect ratio
        • Image generation gemini-3-pro-image-preview controls aspect ratio and sharpness.
        • Image editing
        • google search
        • TTS Text-to-speech
        • Text generation gemini-3-pro-preview:generateContent
        • Imagen Generate image
    • Anthropic Claude Interface
      • Anthropic Claude
      • Chat Compatible Format
        • Create Chat Completion (Streaming)
        • Create Extended Thinking Chat
        • Create Chat Vision (Non-Streaming)
        • Create Chat Vision (Streaming)
        • Create Chat Completion (Non-Streaming)
      • Native Format
        • Create function calls (streaming)
        • Create chat autocomplete (streaming)
        • Create formatted output
        • Create a Thinking Chat
        • Internet search
        • PDF support
  • Image Models
    • Qwen Series
      • qwen-image-edit-2509
      • qwen-image-max
      • z-image-turbo
    • Tencent AIGC
      • Create Task
      • Get the request result
    • Midjourney
      • Upload Image
      • Submit Imagine Task
      • Query task status by task ID
      • Search for tasks based on the ID list
      • Get the seed for the task image
      • Execute Action
      • Submit Blend task
      • Submit Describe task
      • Submit Model
    • Ideogram
      • Generate 3.0 (Text and Image) Generate
      • Generate 3.0 (Image Editing) Edit
      • Generate 3.0 (Image Remix) Remix
      • Generate 3.0 (Image Reframe) Reframe
      • Generate 3.0 (Replace Background) Replace Background
      • ideogram (Text to Image)
      • Remix (Image Remix)
      • Upscale (Upscale)
      • Describe (Describe)
    • Fal.AI Platform
      • /fal-ai/nano-banana Text-to-Image
      • /fal-ai/nano-banana/edit Image Editing
      • Get the request result
    • FLUX Series
      • OpenAI Compatible Format
        • Flux Image Editing (OpenAI dall-e-3 format)
        • Flux creation (OpenAI dall-e-3 format)
      • Replicate Official Format
        • Query task
    • GPT Image Series
      • Create gpt-image-1
      • Edit gpt-image-1
      • mask gpt-image-1
      • Create gpt-image-1.5
      • Edit gpt-image-1.5
      • Mask gpt-image-1.5
  • Video Models
    • grok Video Generation
      • Video Unified Format
        • Create video
        • Query task
    • luma Video Generation
      • Official API Format
        • Submit video generation task
        • Extend video
      • Query a single task
        • Query a single task
      • Batch retrieval tasks
        • Batch retrieval tasks
    • Runway Video Generation
      • Submit video generation task
      • Query video task (free)
    • Sora Video Generation
      • OpenAI Official Video Format
        • openai Create video (with Character)
        • openai Query task
        • openai Download video
        • openai Edit video
        • Create videos with images using OpenAI.
        • Create a video with images using OpenAI in private mode.
        • Create videos using storyboards
      • Chat Format
        • Create video
        • Continuous modification to generate video
        • Create a video with images
      • Unified Video Format
        • Query task
        • Create a video with images using sora-2
        • Create video sora-2
        • Creating videos with sora-2-pro
        • Create a video (with a character)
      • Create character
    • Minimax Hailuo Video Generation
      • First and last frame video
      • Video task status query
    • Tencent AIGC Video Generation
      • Get request result
      • Create task
    • Doubao Video Generation
      • seedance-1-5-pro
      • Query video generation task list - search multiple task IDs
      • Query a single task
      • Wensheng Video Example
      • Image-based video - first frame
      • seedance-lite-first and last frames
      • Image-based video - base64 encoded
      • Seedance-Lite Reference Image
      • Query video generation task list - default
      • Query video generation task list - search multiple task ID
      • seedance-1-5-pro-first and last frames
    • Wan Video Generation
      • Generate video
      • Video query
  • Music Suno
    • Suno API Documentation
    • Task Submission
      • Generate song (concatenate song)
      • Generate lyrics
      • Concatenate songs
      • Report upload completion
      • Query upload processing status
      • Initialize audio clip
      • Request upload authorization
      • s3 upload example
      • Scenario 3: Pure Music - Custom
      • Song splicing
      • Generate a song (custom mode)
      • Generate a song (Inspiration Mode)
      • Generate a song (continuation mode)
      • Generate songs (singer style)
      • Generate a song (upload a song for secondary creation).
      • Generate a song (compose a song)
      • Report uploaded
      • Initialize audio file
      • Scene 1: Inspiration Mode
      • Scenario 2: Custom lyrics and song title
    • Query Interface
      • Batch fetch tasks
      • Query single task
      • Get wav
      • Timing: lyrics, audio timeline
      • Feed details retrieval
  • Kling Platform
    • Callback Protocol
    • Omni-Image
      • Query Task (Single)
      • Omni-Image
    • Omni-Video
      • Omni-Video
    • Custom Elements
      • Custom Elements
    • Motion Control
      • Motion Control
      • Query Task (Single)
    • Image Generation
      • Image Generation
      • Query Task (Single)
    • Image Recognition
      • Image Recognition
    • Image to Video
      • Image to Video
    • Image
      • Video
        • Query task (single)
    • Multi-image reference generation
      • Multi-image reference generation
      • Query task (single)
    • Multi-image reference video generation
      • Multi-image reference video generation
      • Query task (single)
    • Multi-modal video editing
      • Initialize video to be edited
      • Add video selection
      • Delete video selection
      • Preview selected area video
      • Multi-modal video
      • Query task (single)
    • Lip Sync
      • Face identification
      • Lip sync
    • lip-syncing
      • Query Task (Single)
      • Facial recognition
      • Lip-syncing
    • image expansion
      • Image Expansion
      • Query Task (Single)
    • digital human
      • Image to Video
      • Query Task (Single)
    • text to video
      • Text to Video
      • Query Task (Single)
    • text to audio
      • Text-to-Audio
      • Query Task (Single)
    • custom voice
      • Custom Voice
      • Query Custom Voice (Single)
      • Query Official Voices
      • Delete Custom Voice
    • virtual try-on
      • Virtual Try-On
      • Query Task (Single)
    • video extension
      • Video Extension
      • Query Task (Single)
    • video effects
      • Video Effects
      • Query Task (Single)
    • video to audio
      • Video to Audio
      • Query Task (Single)
    • text-to-speech
      • Text-to-Speech
  • Fal-ai aggregation platform
    • Integration Tutorial
    • falai-veo3 video generation
      • /fal-ai/veo3
      • /fal-ai/veo3/fast/image-to-video
      • /fal-ai/veo3/fast
      • /fal-ai/veo3/requests/{request_id}
      • /fal-ai/veo3/image-to-video
    • Get the request result
    • /fal-ai/flux-1/dev
    • /fal-ai/flux-1/dev/image-to-image
    • /fal-ai/flux-1/dev/redux
    • /fal-ai/flux-1/schnell/redux
    • /fal-ai/flux-pro/kontext
    • /fal-ai/flux-pro/kontext/text-to-image
    • /fal-ai/flux-pro/kontext/max
    • /fal-ai/flux-pro/kontext/max/multi
    • /fal-ai/wan/v2.2-a14b/image-to-image
    • /fal-ai/bytedance/seedream/v4/text-to-image
    • /fal-ai/bytedance/seedream/v4/edit
    • /fal-ai/vidu/reference-to-image
    • /fal-ai/imagen4/preview
    • /fal-ai/qwen-image-edit-lora
    • /fal-ai/qwen-image-edit-plus
    • /fal-ai/kling-video/v2.5-turbo/pro/text-to-video
    • /fal-ai/kling-video/v2.5-turbo/pro/image-to-video
    • /fal-ai/flux-lora
    • /fal-ai/flux-lora/image-to-image
    • /fal-ai/flux-lora/inpainting
  • Replicate Aggregation Platform
    • Access Tutorial
    • Create task black-forest-labs/flux-kontext-dev
      POST
    • Query task
      GET
    • Create task lucataco/remove-bg
      POST
    • Create task ideogram-ai/ideogram-v2-turbo
      POST
    • Create task minimax/video-01-live
      POST
    • Create task minimax/video-01
      POST
    • Create task recraft-ai/recraft-v3
      POST
    • Create task recraft-ai/recraft-v3-svg
      POST
    • Create task black-forest-labs/flux-1.1-pro-ultra
      POST
    • Create task black-forest-labs/flux-kontext-pro
      POST
    • Create task black-forest-labs/flux-kontext-max
      POST
    • Create task flux-kontext-apps/multi-image-kontext-max
      POST
    • Create task flux-kontext-apps/multi-image-kontext-pro
      POST
    • Create task riffusion/riffusion
      POST
    • Create task black-forest-labs/flux-fill-dev
      POST
    • Create task black-forest-labs/flux-fill-pro
      POST
    • Create task google/imagen-4-fast
      POST
    • Create task google/imagen-4-ultra
      POST
    • Create task google/imagen-4
      POST
    • Create task prunaai/vace-14b
      POST
    • Create task bytedance/seedream-4
      POST
  • Rerank Rerank Model
    • Rerank
  • Python Configuration
    • Python Basics Discussion
    • Using gpt-4o in Python to recognize images
    • Using Claude in Python to Recognize Images
    • Python OpenAI official libraries
    • Python continuous dialogue
    • Using Python to convert speech to text
    • Using Python to convert text to speech
    • Vectorization using Embeddings in Python
    • Python calls DALL·E
    • Simple Python function calling demo
    • Simple Python LangChain calling OpenAI demo
    • Python llama\Index configuration
    • Using gpt-4o in Python to recognize local images
    • Python library for streaming output
    • GPT Realtime Model Call
    • Python request request streaming demo
    • Using Python to create and edit images with gpt-image-1
  1. Replicate Aggregation Platform

Access Tutorial

Replicate Official Format Call#

If you need any models, please contact customer service to add them.
Replace https://api.replicate.com on the official website with {{BASE_URL}}/replicate. The input, output, and request methods should be consistent with the official website.
Integration Process
1.
Create a Task
After submitting the task, obtain the task ID.
2.
Get Task Progress
Query the task progress using the task ID and obtain the result.
PS:The returned resource link is only valid for 1 hour.
Return body Key field descriptions
Project Type Description
input object enter
output string or []string Output URL
status string Status: starting, processing, succeeded, failed
1.Task generation by path
Taking black-forest-labs/flux-schnell as an example
The returned data type ID is the ID of the next query task.
{
  "id": "qpt5jq1fssrmc0cmd5hvy31mdg",
  "model": "black-forest-labs/flux-schnell",
  "version": "dp-4d0bcc010b3049749a251855f12800be",
  "input": {
    "aspect_ratio": "1:1",
    "go_fast": true,
    "megapixels": "1",
    "num_inference_steps": 4,
    "num_outputs": 1,
    "output_format": "jpg",
    "output_quality": 80,
    "prompt": "Japanese cartoon anime style, (1 person) (Gender: Male, Age: 30, Hair: Short black hair, Outfit: Dark blue hunting attire, includes a fitted jacket and trousers.) (A dimly lit room filled with tension,  is questioning Female, 27 years old, long black hair, pink tulle dress., who stands nervously in her pink dress, the sound of rain pattering against the window.)"
  },
  "logs": "",
  "output": null,
  "data_removed": false,
  "error": null,
  "status": "starting",
  "created_at": "2025-01-15T09:54:55.566Z",
  "urls": {
    "cancel": "https://api.replicate.com/v1/predictions/qpt5jq1fssrmc0cmd5hvy31mdg/cancel",
    "get": "https://api.replicate.com/v1/predictions/qpt5jq1fssrmc0cmd5hvy31mdg",
    "stream": "https://stream.replicate.com/v1/files/bcwr-gvuc2rokjozhlaxh6dcvk6tvhh2ymt4egnnpxvmtqql57angyfsq"
  }
}
2.Generate task.version method
Using lucataco/flux-schnell-lora as an example: refer to the documentation: https://replicate.com/lucataco/flux-schnell-lora?input=http the version obtained from the documentation is 2a6b576af31790b470f0a8442e1e9791213fa13799cbb65a9fc1436e96389574
The return body format is consistent with the above format.
Get Task
Obtain the task ID through the above production process.
The results are in the key field output.
Note that the returned results and their linked files have time limits.
get {{BASE_URL}}/replicate/v1/predictions/{id}
Return body
{
  "id": "ctdwaehfz1rm80cmd5nsjd8114",
  "model": "black-forest-labs/flux-schnell",
  "version": "dp-4d0bcc010b3049749a251855f12800be",
  "input": {
    "aspect_ratio": "1:1",
    "go_fast": true,
    "megapixels": "1",
    "num_inference_steps": 4,
    "num_outputs": 1,
    "output_format": "jpg",
    "output_quality": 80,
    "prompt": "Japanese cartoon anime style, (1 person) (Gender: Male, Age: 30, Hair: Short black hair, Outfit: Dark blue hunting attire, includes a fitted jacket and trousers.) (A dimly lit room filled with tension,  is questioning Female, 27 years old, long black hair, pink tulle dress., who stands nervously in her pink dress, the sound of rain pattering against the window.)"
  },
  "logs": "Using seed: 62182\nrunning quantized prediction\nUsing seed: 62182\n  0%|          | 0/4 [00:00<?, ?it/s]\n 75%|███████▌  | 3/4 [00:00<00:00, 15.38it/s]\n100%|██████████| 4/4 [00:00<00:00, 13.43it/s]\nTotal safe images: 1 out of 1\n",
  "output": [
    "https://replicate.delivery/xezq/RoEhEdyl8PoIGFFPg46TU4Svj24i1NDVYmzehJfqLuX9nTFUA/out-0.jpg"
  ],
  "data_removed": false,
  "error": null,
  "status": "succeeded",
  "created_at": "2025-01-15T10:03:39.896Z",
  "started_at": "2025-01-15T10:03:40.584470194Z",
  "completed_at": "2025-01-15T10:03:41.142386377Z",
  "urls": {
    "cancel": "https://api.replicate.com/v1/predictions/ctdwaehfz1rm80cmd5nsjd8114/cancel",
    "get": "https://api.replicate.com/v1/predictions/ctdwaehfz1rm80cmd5nsjd8114",
    "stream": "https://stream.replicate.com/v1/files/bcwr-q57vie7wuzg3wxv2hvpajgmzqzmxe67kqddednevutmrpdcft6xq"
  },
  "metrics": {
    "image_count": 1,
    "predict_time": 0.557916184
  }
}
Modified at 2026-02-08 10:59:55
Previous
/fal-ai/flux-lora/inpainting
Next
Create task black-forest-labs/flux-kontext-dev
Built with