Skip to main content
GET
cURL
このエンドポイントは、すでに Replicate prediction id を取得している場合に使用します。現在のタスク状態を報告し、prediction が完了すると output URL を返します。

まず確認するフィールド

  • prediction がまだ実行中か、すでに完了しているかを確認するには status
  • 生成されたアセット URL を確認するには output
  • プロバイダー側の失敗を確認するには error
  • 実行時間や画像数の詳細が必要な場合は metrics

ポーリングパターン

1

まず prediction を作成する

2

prediction id でポーリングする

status が終端状態になり、output に値が入るか、プロバイダーエラーが返されるまでクエリを続けます。
3

完了したアセットを保存する

返されたアセット URL は配信用 URL として扱い、長期保存が必要な場合は自分のストレージに移動します。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

パスパラメータ

id
string
必須

Prediction id returned by the create endpoint.

レスポンス

200 - application/json

Current prediction state.

id
string
必須
input
object
必須
model
string
必須
output
string[] | null
必須
status
string
必須
created_at
string
必須
data_removed
boolean
必須
logs
string
urls
object
error
string | null
metrics
object
version
string
started_at
string | null
completed_at
string | null