Replicate Integration Tutorial

Use FLUX models via the Replicate-compatible format. Simply replace the official Replicate base URL with the AnyFast endpoint.

Base URL

Replace the official Replicate API base URL:
https://api.replicate.com  →  https://www.anyfast.ai/replicate
The input/output format and request structure remain identical to the official Replicate API.

Workflow

  1. Create a task — Submit a prediction request and receive a task ID
  2. Query task progress — Poll the task status until it completes and retrieve the result
Resource links in the response are valid for 1 hour.

Response Key Fields

FieldTypeDescription
inputobjectThe input parameters submitted with the task
outputstring or string[]Content URL(s) of the generated result
statusstringTask status: starting, processing, succeeded, failed

Create Task

# Create task (path method) - using black-forest-labs/flux-schnell
curl --request POST \
  --url https://www.anyfast.ai/replicate/v1/models/black-forest-labs/flux-schnell/predictions \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "input": {
      "prompt": "a beautiful landscape",
      "go_fast": true,
      "num_outputs": 1,
      "aspect_ratio": "1:1",
      "output_format": "jpg"
    }
  }'

Query Task

# Query task
curl --request GET \
  --url https://www.anyfast.ai/replicate/v1/predictions/{id} \
  --header 'Authorization: Bearer YOUR_API_KEY'