Перейти до основного вмісту
POST
/
replicate
/
v1
/
models
/
{models}
/
predictions
Create a Replicate prediction
curl --request POST \
  --url https://api.cometapi.com/replicate/v1/models/{models}/predictions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": {
    "prompt": "A paper boat floating on calm water at sunrise.",
    "aspect_ratio": "1:1",
    "output_format": "webp",
    "output_quality": 80
  }
}
'
{
  "id": "q4chw5rey9rmt0cww76t4h3ma4",
  "model": "black-forest-labs/flux-schnell",
  "version": "hidden",
  "input": {
    "aspect_ratio": "1:1",
    "output_format": "webp",
    "output_quality": 80,
    "prompt": "A paper boat floating on calm water at sunrise."
  },
  "logs": "",
  "output": null,
  "data_removed": false,
  "error": null,
  "source": "api",
  "status": "starting",
  "created_at": "2026-03-12T11:27:18.258Z",
  "urls": {
    "cancel": "https://api.replicate.com/v1/predictions/q4chw5rey9rmt0cww76t4h3ma4/cancel",
    "get": "https://api.replicate.com/v1/predictions/q4chw5rey9rmt0cww76t4h3ma4",
    "stream": "https://stream.replicate.com/v1/files/example",
    "web": "https://replicate.com/p/q4chw5rey9rmt0cww76t4h3ma4"
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Використовуйте цей маршрут, щоб запустити prediction у стилі Replicate в CometAPI і отримати id prediction для подальшого опитування.

Контрольний список для першого запиту

  • Помістіть кожен параметр моделі всередину об’єкта input
  • Почніть із black-forest-labs/flux-schnell для найшвидшого першого запиту
  • Нехай перший запит буде лише текстовим, якщо вам не потрібні саме input_image або input_images
  • Збережіть повернений id для перевірки статусу

Потік виконання

1

Створіть prediction

Надішліть model ID зі шляху та об’єкт input через цей endpoint.
2

Збережіть id prediction

Збережіть повернений id, оскільки він знадобиться вам для подальшого опитування.
3

Опитуйте prediction

Продовжуйте з Replicate Query Status, доки output не буде заповнено або не з’явиться помилка.

Авторизації

Authorization
string
header
обов'язково

Bearer token authentication. Use your CometAPI key.

Параметри шляху

models
string
обов'язково

Replicate model id, for example black-forest-labs/flux-schnell or black-forest-labs/flux-kontext-pro.

Тіло

application/json
input
object
обов'язково

Provider-specific model input. Keep all parameters inside this object.

Відповідь

200 - application/json

Prediction accepted.

id
string
обов'язково
model
string
обов'язково
input
object
обов'язково
output
string[] | null
обов'язково
error
string | null
обов'язково
status
string
обов'язково
created_at
string
обов'язково
urls
object
обов'язково
version
string
logs
string
data_removed
boolean
source
string