Przejdź do głównej treści
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.

Użyj tej ścieżki, aby uruchomić predykcję w stylu Replicate na CometAPI i otrzymać prediction id do późniejszego odpytywania.

Lista kontrolna pierwszego żądania

  • Umieść każdy parametr model wewnątrz obiektu input
  • Zacznij od black-forest-labs/flux-schnell, aby wykonać jak najszybsze pierwsze żądanie
  • W pierwszym żądaniu użyj tylko tekstu, chyba że konkretnie potrzebujesz input_image lub input_images
  • Zapisz zwrócone id do sprawdzania statusu

Przepływ zadania

1

Create the prediction

Prześlij path model id oraz obiekt input przez ten endpoint.
2

Store the prediction id

Zapisz zwrócone id, ponieważ będzie potrzebne do późniejszego odpytywania.
3

Poll the prediction

Kontynuuj w Replicate Query Status, aż output zostanie uzupełnione lub pojawi się błąd.

Autoryzacje

Authorization
string
header
wymagane

Bearer token authentication. Use your CometAPI key.

Parametry ścieżki

models
string
wymagane

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

Treść

application/json
input
object
wymagane

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

Odpowiedź

200 - application/json

Prediction accepted.

id
string
wymagane
model
string
wymagane
input
object
wymagane
output
string[] | null
wymagane
error
string | null
wymagane
status
string
wymagane
created_at
string
wymagane
urls
object
wymagane
version
string
logs
string
data_removed
boolean
source
string