Web URLs now in prediction objects

We’ve added a new web property to the urls object for predictions.

This property contains the web URL of the prediction, so you can view it in your browser:

{
  "web": "https://replicate.com/p/cky59275mdrm80cpw83rcn3ej0",
  "get": "https://api.replicate.com/v1/predictions/cky59275mdrm80cpw83rcn3ej0",
  "stream": "https://stream.replicate.com/v1/files/bcwr-3afcgaxf5opqtgeq5ababozl3erroi6ody73lpkwklvnu7bwtmrq",
  "cancel": "https://api.replicate.com/v1/predictions/cky59275mdrm80cpw83rcn3ej0/cancel"
}

Here’s an example of how to get the web URL of your account’s most recent prediction using cURL and jq, then open it in your browser:

curl -s \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  "https://api.replicate.com/v1/predictions" \
  | jq ".results[0].urls.web" \
  | xargs open