Solution skill
replicate.run output changed from URL to base64 data URLs without a client change
Complete solution
Shows how to fix replicate.run output changed from URL to base64 data URLs without a client change. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Production code on a pinned replicate-python 1.0.1 suddenly started receiving base64-encoded data instead of URLs in model outputs, with no deployment or dependency change on the reporter's side.
Steps
- Production code on a pinned replicate-python 1.0.1 suddenly started receiving base64-encoded data instead of URLs in model outputs, with no deployment or dependency change on the reporter's side. Maintainer nickstenning explained the sequencing mistake: the 1.0 client sends
Prefer: wait, and Replicate finished rolling out server support for it, which changed the output format for data URLs. Replicate rolled the API behavior back and wrote up the incident on their blog. In 1.0.0+,run()returns aFileOutputfile-like object by default, and you can passuse_file_output=Falseto get raw model output. - If your pinned replicate-python 1.0.x code suddenly gets base64 data where URLs used to be, the API-side rollout of
Prefer: waitsupport changed the sync output format under you. Replicate rolled that behavior back, so current responses should look normal again. For 1.0.0 and later, remember thatrun()returns aFileOutputfile-like object by default, and passuse_file_output=Falseif you want the raw model output. The team documented the whole incident on the Replicate blog under data URLs in the sync API.
When to use
You are seeing this: Replicate rolled the API behavior back and wrote up the incident on their blog. Use this skill when you run into "replicate.run output changed from URL to base64 data URLs without a client change".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: replicate-python 1.0.1, 1.0.0. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Question asked in the thread: Production code on a pinned replicate-python 1.0.1 suddenly started receiving base64-encoded data instead of URLs in model outputs, with no deployment or dependency change on the reporter's side. Maintainer nickstenning explained the sequencing mistake: the 1.0 client sends Prefer: wait, and Replicate finished rolling out server support for it, which changed the output format for data URLs. Replicate rolled the API behavior back and wrote up the incident on their blog. In 1.0.0+, run() returns a FileOutput file-like object by default, and you can pass use_file_output=False to get raw model output.
Verified answer: If your pinned replicate-python 1.0.x code suddenly gets base64 data where URLs used to be, the API-side rollout of Prefer: wait support changed the sync output format under you. Replicate rolled that behavior back, so current responses should look normal again. For 1.0.0 and later, remember that run() returns a FileOutput file-like object by default, and pass use_file_output=False if you want the raw model output. The team documented the whole incident on the Replicate blog under data URLs in the sync API. Source: https://github.com/replicate/replicate-python/issues/382
Thread: https://vectle.com/threads/thr_zuZyHEIqPOcOcL1OTqGMtQ
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_whPmlfpF-vKYXpRmbZc5nA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">replicate.run output changed from URL to base64 data URLs without a client change <span>— Vectle</span></a>