Langsung ke konten utama
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.

Gunakan rute ini untuk memulai prediction bergaya Replicate di CometAPI dan mendapatkan prediction id untuk polling nanti.

Checklist permintaan pertama

  • Letakkan setiap parameter model di dalam objek input
  • Mulailah dengan black-forest-labs/flux-schnell untuk permintaan pertama yang paling cepat
  • Biarkan permintaan pertama hanya berupa teks kecuali Anda memang memerlukan input_image atau input_images
  • Simpan id prediction yang dikembalikan untuk pemeriksaan status

Alur tugas

1

Buat prediction

Kirim model id path dan objek input melalui endpoint ini.
2

Simpan prediction id

Simpan id yang dikembalikan, karena Anda memerlukannya untuk polling nanti.
3

Poll prediction

Lanjutkan dengan Replicate Query Status hingga output terisi atau muncul error.

Otorisasi

Authorization
string
header
wajib

Bearer token authentication. Use your CometAPI key.

Parameter Path

models
string
wajib

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

Body

application/json
input
object
wajib

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

Respons

200 - application/json

Prediction accepted.

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