Zum Hauptinhalt springen
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.

Verwende diese Route, um eine Prediction im Replicate-Stil auf CometAPI zu starten und eine prediction id für späteres Polling zurückzubekommen.

Checkliste für die erste Anfrage

  • Lege jeden Modellparameter innerhalb des input-Objekts ab
  • Starte mit black-forest-labs/flux-schnell für die schnellste erste Anfrage
  • Halte die erste Anfrage rein textbasiert, es sei denn, du benötigst ausdrücklich input_image oder input_images
  • Speichere die zurückgegebene Prediction-id für Statusprüfungen

Aufgabenablauf

1

Create the prediction

Übermittle die Pfad-model ID und das input-Objekt über diesen Endpunkt.
2

Store the prediction id

Speichere die zurückgegebene id, da du sie für späteres Polling benötigst.
3

Poll the prediction

Fahre mit Replicate Status abfragen fort, bis output ausgefüllt ist oder ein Fehler erscheint.

Autorisierungen

Authorization
string
header
erforderlich

Bearer token authentication. Use your CometAPI key.

Pfadparameter

models
string
erforderlich

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

Body

application/json
input
object
erforderlich

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

Antwort

200 - application/json

Prediction accepted.

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