Create a prediction
POST
/v1/predictions
{
"version": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
"input": {
"text": "Alice"
}
}
curl -s -X POST \
-d '{"version": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa", "input": {"text": "Alice"}}' \
-H "Authorization: Token <paste-your-token-here>" \
-H 'Content-Type: application/json' \
https://api.replicate.com/v1/predictions
{
"id": "gm3qorzdhgbfurvjtvhg6dckhu",
"model": "replicate/hello-world",
"version": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
"input": {
"text": "Alice"
},
"logs": "",
"error": null,
"status": "starting",
"created_at": "2023-09-08T16:19:34.765994657Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/gm3qorzdhgbfurvjtvhg6dckhu/cancel",
"get": "https://api.replicate.com/v1/predictions/gm3qorzdhgbfurvjtvhg6dckhu"
}
}
webhook
HTTPS URL for us to call when the results are ready, or poll the get a prediction endpoint until it has finished.replicate.delivery
and its subdomains. If you use an allow list of external domains for your assets, add replicate.delivery
and *.replicate.delivery
to it.Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.replicate.com/v1/predictions?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw ''
Response Response Example
{}
Request
Body Params application/json
Responses
Modified at 2023-12-22 03:33:22