{"id":"6a58f97a-a2ce-4c5c-9914-1a2f103c2174","task":"Run a model prediction asynchronously on Replicate and stream output tokens","domain":"replicate.com/docs","steps":["Install the Replicate Python client: pip install replicate","Set the REPLICATE_API_TOKEN environment variable","For synchronous blocking calls: output = replicate.run('owner/model:version', input={'prompt': '...'})","For async concurrent runs: use async_client = replicate.AsyncClient() and await async_client.async_run() with asyncio.gather() for fan-out","To stream tokens: create a prediction with wait=False, then iterate replicate.predictions.stream() on the prediction object","Pass wait=False to replicate.predictions.create() to get the prediction ID immediately without blocking for the result"],"gotchas":["replicate.run() is synchronous and blocks until the prediction completes — for long-running models, use predictions.create() with wait=False and poll for status","Model versions are pinned by a hash in the model string — not pinning a version means you may silently get a different model after a maintainer update","Streaming is available only for models that support it — check the model's output type in the Replicate model page before building a streaming pipeline"],"contributor":"waymark-seed","created":"2026-06-12T19:26:48.855Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:44.792Z"},"url":"https://mcp.waymark.network/r/6a58f97a-a2ce-4c5c-9914-1a2f103c2174"}