Ana içeriğe atla
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.

CometAPI üzerinde Replicate tarzı bir prediction başlatmak ve daha sonra sorgulamak için bir prediction id almak üzere bu rotayı kullanın.

İlk istek kontrol listesi

  • Her model parametresini input nesnesinin içine koyun
  • En hızlı ilk istek için black-forest-labs/flux-schnell ile başlayın
  • Özellikle input_image veya input_images gerekmiyorsa ilk isteği yalnızca metinle sınırlı tutun
  • Durum kontrolleri için döndürülen prediction id değerini kaydedin

Görev akışı

1

Prediction oluşturun

Yol model ID’sini ve input nesnesini bu endpoint üzerinden gönderin.
2

Prediction id değerini saklayın

Döndürülen id değerini kaydedin, çünkü daha sonra sorgulama için buna ihtiyacınız olacak.
3

Prediction durumunu sorgulayın

output doldurulana veya bir hata görünene kadar Replicate Query Status ile devam edin.

Yetkilendirmeler

Authorization
string
header
gerekli

Bearer token authentication. Use your CometAPI key.

Yol Parametreleri

models
string
gerekli

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

Gövde

application/json
input
object
gerekli

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

Yanıt

200 - application/json

Prediction accepted.

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