Upload media
Upload an image, audio, or video file via multipart/form-data (field file), application/json (base64 data), or a raw file body with its media MIME type and Content-Length headers. Multipart and raw uploads stream to storage up to 400 MiB; JSON uploads remain limited to 100 MiB because base64 decoding buffers in Worker memory. Raw uploads receive a random, unlisted ID. Returns an id and its retrieval URL. Omit id for a new random ID, or supply a case-sensitive ID scoped to your account. Custom IDs require a user-owned API key; the returned id includes an opaque account prefix. Existing files or gallery entries return 409 without being replaced, including on retries. Untagged files cannot be deleted. Files expire after 30 days; GET refreshes retention once a file is at least 15 days old.
Tags publish. An optional tags field publishes the upload into each tag's public gallery (GET /media?tag=…), where anyone can see it. Untagged uploads stay unlisted, but all retrieval URLs are public. Knowing one custom URL makes other predictable names in that account guessable. Alpha: the publish tagging is new and may still change.
Request
- Base URL: https://media.pollinations.ai
- URL: https://media.pollinations.ai/upload
- Auth: HTTP bearer
Request body
Response
Upload successful
Changes
No recorded changes to this operation across all 1 revision of this API.