Upload an image file
upload_imageUpload an image file you hold, sent as base64, with its licence, credit and source (the editor’s “upload a file”), stored as a new image — a lossless WebP at the file’s full resolution with its colour profile kept and every other metadata (EXIF, XMP, IPTC) dropped: at most 70 MB of file (its base64 is a third larger: up to 94 MB, which the site takes whole). POST /api/media (multipart, with this key) takes a file of the same 70 MB. The image is public at /img/w/…/ once stored, before any review — unless you set hold: true, which stores it held for a proposal: /img serves it only to you and to reviewers (never cached), it is in no list, and only your own proposal may name it, until a reviewer approves that proposal and releases it. A rejected or withdrawn proposal leaves it held, never deleted. The real run answers its mediaId: pass it to propose_entry_change as image_media_id to propose it for an entry. Audited, with the file name. Dry run by default; every run needs confirm_rights: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hold | No | true: store it held, for a proposal (see above). Pass the mediaId to propose_entry_change as image_media_id. | |
| credit | No | Whom to credit, as shown beside the image — the author or rights holder. Needed by the licences that say so. | |
| source | No | Where you found the image (a web page), kept for a rights question; never shown publicly. | |
| content | Yes | The file’s bytes in base64 (standard or URL-safe alphabet, no line breaks, no data: prefix). Any image sharp reads (PNG, JPEG, WebP, GIF, AVIF, TIFF, SVG); it is stored as a lossless WebP at its full resolution, its colour profile kept, every other metadata dropped. | |
| dry_run | No | true (the default): write nothing — show the change and the exact request it would send. false: make the change. | |
| license | Yes | How the image may be reused: "cc0-1.0" (CC0 1.0), "public-domain" (Public domain), "cc-by-4.0" (CC BY 4.0, needs a credit), "cc-by-sa-4.0" (CC BY-SA 4.0, needs a credit), "supplied" (Supplied by the subject, needs a credit), "permission" (Used with permission, needs a credit), "none" (No licence, only with the upload-unlicensed permission). | |
| filename | Yes | The file’s name. Kept in the audit log for a rights question, never shown publicly or used to store it. | |
| confirm_rights | Yes | true: you confirm the image may be published under this licence. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | A dry run: what to do next to make the change, in words. | |
| result | No | A real run: the route’s own answer, where the tool adds facts of its own beside it. | |
| confirm | No | A dry run of a change that needs it: the exact target to send back as `confirm` with dry_run: false. | |
| dry_run | No | true: a dry run, which wrote nothing. Absent from a real run. | |
| replayed | No | A real run with an idempotency_key already used for this change: the first call’s answer, given back; nothing was written now. | |
| would_send | No | A dry run: the exact request the real run would send (`method`, `path`, any `headers` such as an Idempotency-Key, and its `body`, `form` or `query`), or the requests, in order. | |
| may_edit_live | No | A dry run of a live edit: whether this key’s account may edit this entry live. | |
| refused_because | No | A dry run the real run would be refused for: why, in words. |