OpenRouter image API: b64_json no longer always present, new URL output (November 19, 2026)
POST /api/v1/images can now return signed URLs that expire; b64_json is optional. Code reading data[0].b64_json must check first.
Your keys
0 of 1 ready
Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. Your keys stay in this tab. They are never sent to Wirestack or saved; we only count that the panel was used.
- OpenRouter API keyOPENROUTER_API_KEYGet key
Click Create API Key
What changed
On November 19, 2026, OpenRouter changed the response schema of POST /api/v1/images (ImageGenerationResponse). The changelog marks it "Action required": b64_json is no longer a required property of each item in data.
- New request field
response_format, with valuesb64_json(the default, image bytes inline) orurl. - With
url, OpenRouter stores each image and returns a signed download link indata[].urlin place of the bytes. The guide says these URLs expire after 24 hours. - New response field
expires_at: a Unix timestamp (seconds) of the earliest expiry among the URLs indata. The API reference says to treat every URL as expired after it. - The API reference says
b64_jsonis present unless the request asked forresponse_format: "url"and a URL was issued. If a URL cannot be issued (streaming, zero data retention, or storage unavailable), the response falls back tob64_jsonandurlis absent.
So code that always reads data[0].b64_json keeps working on default requests, but breaks if response_format: "url" is sent. Typed clients or generated SDKs that treat b64_json as always present must now treat it as optional.
Second change, November 18, 2026 (also "Action required"): the ReasoningFormat enum value google-vertex-responses-v1 was renamed google-vertex-meta-responses-v1. It is used by 6 endpoints, including POST /chat/completions and POST /responses. The API still accepts the old value on input and treats it as the new one, so replaying stored reasoning_details keeps working. Update any code or generated SDK enum that compares against the old string, and accept both values while older stored reasoning is still replayed.
Prerequisites
Affected by this? Start from a checked OpenRouter integration
Code with pinned versions, checked against the official docs on a schedule.
