Skip to main content
POST
/
replicate
/
v1
/
models
/
{models}
/
predictions
cURL
curl https://api.deerapi.com/replicate/v1/models/black-forest-labs/flux-1.1-pro/predictions \
  -H "Authorization: Bearer <DEERAPI_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "prompt": "A red paper lantern on a wooden table, studio photo",
      "aspect_ratio": "1:1",
      "output_format": "jpg"
    }
  }'
{
  "id": "e6je4zpgdxrmw0cww2xsb0515g",
  "model": "black-forest-labs/flux-1.1-pro",
  "version": "hidden",
  "input": {
    "aspect_ratio": "1:1",
    "output_format": "jpg",
    "prompt": "A red paper lantern on a wooden table, studio photo"
  },
  "logs": "",
  "output": null,
  "data_removed": false,
  "error": null,
  "source": "api",
  "status": "starting",
  "created_at": "2026-03-12T06:28:50.927Z",
  "urls": {
    "cancel": "https://api.replicate.com/v1/predictions/e6je4zpgdxrmw0cww2xsb0515g/cancel",
    "get": "https://api.replicate.com/v1/predictions/e6je4zpgdxrmw0cww2xsb0515g",
    "stream": "https://stream.replicate.com/v1/files/example-stream",
    "web": "https://replicate.com/p/e6je4zpgdxrmw0cww2xsb0515g"
  }
}
当前页适合已经有 Replicate 心智模型的团队:模型放在 URL,参数全放进 input,返回标准 Predictions 对象。

这页和 FLUX 短路径怎么选

你更在意什么更适合哪一页
URL 更短、以 DeerAPI 模型 ID 为主flux/generate
保留 Replicate 风格对象结构当前页
同时接 Recraft、Ideogram、Stability、FLUX 等多家兼容模型当前页

第一次创建建议这样走

1

先确定完整模型 ID

例如 black-forest-labs/flux-1.1-prorecraft-ai/recraft-v3stability-ai/sdxl
2

把模型参数都放进 input

不要把 prompt 之类的字段平铺在根对象上。当前页的根对象主要就是 input、可选 webhook,以及路径里的模型 ID。
3

创建后立刻切到查询页

Predictions 创建成功时,output 仍然可能是 null。这不是失败,只是任务还没完成。

与官方 Replicate 的差异

  • Replicate 官方路径是 /v1/models/{owner}/{name}/predictions;DeerAPI 把完整模型 ID 合并成一个 {models} 路径参数,方便从模型列表直接复制。
  • DeerAPI 只开放当前已接入、并且在 DeerAPI 模型列表里可见的那部分模型。
  • DeerAPI 鉴权统一为 Bearer Token,不用官方 Replicate Token。

常见模型家族

  • FLUX:black-forest-labs/...
  • Recraft:recraft-ai/...
  • Ideogram:ideogram-ai/...
  • Stability:stability-ai/...

相关页面

查询任务(Replicate Predictions 对象)

当你要拿固定的 Predictions 对象时,用这一页继续轮询。

统一查询 FLUX 与 Replicate

如果你不想维护两套查询 URL,再考虑切到统一查询页。

参考文档

Authorizations

Authorization
string
header
required

使用 DeerAPI Key 进行 Bearer Token 鉴权。

Path Parameters

models
enum<string>
required

完整模型 ID。第一次接入建议直接从 /v1/models 返回结果里复制。

Available options:
black-forest-labs/flux-1.1-pro,
black-forest-labs/flux-1.1-pro-ultra,
black-forest-labs/flux-2-dev,
black-forest-labs/flux-2-flex,
black-forest-labs/flux-2-max,
black-forest-labs/flux-2-pro,
black-forest-labs/flux-dev,
black-forest-labs/flux-kontext-max,
black-forest-labs/flux-kontext-pro,
black-forest-labs/flux-pro,
black-forest-labs/flux-schnell,
dreamshaper-8-lcm,
ideogram-ai/ideogram-v2,
ideogram-ai/ideogram-v2-turbo,
ideogram-ai/ideogram-v2a,
ideogram-ai/ideogram-v3-balanced,
ideogram-ai/ideogram-v3-quality,
ideogram-ai/ideogram-v3-turbo,
recraft-ai/recraft-v3,
recraft-ai/recraft-v3-svg,
recraft-api,
recraftv3,
stability-ai/sdxl,
stability-ai/stable-diffusion,
stability-ai/stable-diffusion-3,
stability-ai/stable-diffusion-3.5-large,
stability-ai/stable-diffusion-3.5-large-turbo,
stability-ai/stable-diffusion-3.5-medium

Body

application/json
input
object
required

模型输入对象。字段由具体模型决定。

webhook
string<uri>
webhook_events_filter
enum<string>[]
Available options:
start,
output,
logs,
completed

Response

200 - application/json

任务已创建

id
string
required
input
object
required
status
enum<string>
required
Available options:
starting,
processing,
succeeded,
failed,
canceled
created_at
string<date-time>
required
urls
object
required
data_removed
boolean
required
model
string
version
string
logs
string | null
output
error
source
enum<string>
Available options:
api,
web
metrics
object
started_at
string<date-time> | null
completed_at
string<date-time> | null