





















You can now use the POST /v1/predictions HTTP API endpoint to run any model on Replicate, whether it’s an official model or a community model. This removes the confusion about which endpoint to use for different types of models.
The POST /v1/predictions endpoint now accepts official model identifiers in the owner/name format, in addition to the existing {owner}/{name}:{version_id} and {version_id} formats.
The existing POST /v1/models/{model_owner}/{model_name}/predictions endpoint will still be supported for running official models. If you’re already using that endpoint, you don’t need to change anything.
This change is backward compatible. Existing code will continue to work without any modifications.
When using the POST /v1/predictions endpoint, you can specify models in these formats:
{owner}/{name} - For official models (e.g., black-forest-labs/flux-schnell){owner}/{name}:{version_id} - For community models with full version ID (e.g., replicate/hello-world:9dcd6d78e7c6560c340d916fe32e9f24aabfa331e5cce95fe31f77fb03121426){version_id} - Just the 64-character version ID (e.g., 9dcd6d78e7c6560c340d916fe32e9f24aabfa331e5cce95fe31f77fb03121426)Here’s an example of how to run an official model (in this case, black-forest-labs/flux-schnell) using the POST /v1/predictions operation:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。