Uploads
Upload Files
Upload between 1 and 10 files in one request on Free or up to 50 on Plus. Ultra and team access keys have no file limit. Archives, audio and PDFs need Ultra or a team key. Every upload creates a post. Two or more files form one album unless post-type: individual is sent. Files of any size can also be sent in 50 MiB pieces with chunk-index; see Large Files.
POST
Upload Files
Upload between 1 and 10 files in one request on Free or up to 50 on Plus. Ultra and team access keys have no file limit. Every upload creates a post. Two or more files are grouped into one album post unless you ask for individual posts.
An album:
One post per file:
A private upload. The file URLs are signed:
An album:
Individual posts, where the third file went over the weekly quota:
Every file failed:
Headers
Header values are trimmed and case-insensitive. Boolean headers accept only
true or false; anything else returns 400.
Preferences are set on the website or with Update Preferences. A change made on the website reaches uploads within a minute. post-privacy never follows the Default Post Privacy preference.
Form Fields
Behavior
- One file: creates one post.
post-typeis ignored. - Two or more files: creates one album post, or one post per file with
post-type: individual. - Response shape: when one post is created the body is
{url, post}, whereurlis the direct URL of the post’s first file (post.files[0].url). When several posts are created (individual), the body is{posts}. An album where only one file survived also returns{url, post}. urlandpost.url: the top-levelurlis the direct file oni.snipp.gg.post.urlis the share page,https://snipp.gg/p/{code}, orhttps://{domain}/{code}when the account has picked another link domain.- Private posts: file URLs are signed and expire after 24 hours. Fetch the post again with
GET /posts/{code}for fresh ones. - Files (Ultra and team keys): archives, audio and PDFs are stored as-is and their URLs are always signed, whatever the privacy. A post that contains one is never public: if any file in the request is one of these,
post-privacy: publicis applied asunlistedto every post the request creates. See File Types. - Videos:
.mp4,.movand.mkvare remuxed to MP4 with+faststart, so.movand.mkvcome back with an.mp4name. A file that cannot be remuxed is rejected as corrupt. Uploaded videos get a thumbnail infiles[].thumbnail_url. See File Types. - Metadata: stripped unless
include-metadataistrue, or is left out while your Include Metadata preference is on. PNG, JPG, WebP and GIF are stripped at any size without re-encoding, so pixels are untouched; JPG and WebP keep their orientation and GIF keeps its animation. Videos lose container metadata during the remux. - Blur Personal Info: when it is on in your preferences (Plus and Ultra, set on the website or with Update Preferences), Snippy checks each PNG, JPG and WebP picture before it is stored and blurs personal details such as email addresses, phone numbers, addresses, account and card numbers, codes and keys. A picture where it found something gets a second look for anything the first one missed. A blurred picture is re-encoded, upright, in its own format. Each look adds a few seconds and uses some of your daily Snippy usage. If the first look cannot run because that usage ran out, or it fails, the picture is stored unblurred. GIFs, animated WebPs, videos and team keys are never checked.
- Priority streaming: eligible videos use adaptive streaming and spend priority minutes, unless
post-priorityisfalse, or is left out while your Adaptive Streaming preference is off.post.priorityistruewhen a video was queued for it. Minutes are charged after the response; if your budget runs out first, the video falls back to standard quality and the post later reportspriority: false. - Partial failures: files that fail are listed in
failed, each with its zero-basedindexand anerrorobject. The stored files are still returned with200. - Every file failed: a one-file request returns that file’s error at the top level, with
413forfile_too_large,500forinternaland400otherwise. A request with several files returns400with typeupload_failedand the samefailedarray. See Errors. - Weekly quota: a file that would exceed your weekly usage limit fails with type
quota_exceeded, carryingquota,usedandresets_at. - Size limits: a file over your plan’s per-file limit fails with type
file_too_large. One request carries at most 50 GB, even when your weekly quota is larger; send bigger files in pieces (see Large Files). A request whose declaredContent-Lengthis already larger than your weekly quota (orlimits.max_filestimes the per-file limit) is refused with413before any file is read. - Team keys: posts are always created
private, whateverpost-privacysays, and count against the team’s quota. No member’s preferences apply, so without the headers metadata is stripped and videos use priority streaming. A lapsed team returns403with typeforbidden. - New posts are scanned automatically. A flagged post is moderated after the response.
Large Files
One request carries at most 50 GB. For bigger files, or to resend one piece instead of the whole file when a connection drops, send the file in pieces to the samePOST /upload:
- First piece: the first 50 MiB in
file, withchunk-index: 0andfile-sizeset to the size of the whole file, plus any ofpost-privacy,include-metadataandpost-priority, and thetitleanddescriptionfields. The response is200withupload.idandupload.region, or202as for the last piece when the whole file fits in this one. The file type, your weekly quota and the server’s free space are checked here, so a file that cannot be stored is refused before you send the rest. The whole size is held against your weekly quota until the upload finishes, and anything it did not use is returned. - Middle pieces: each 50 MiB piece with its
chunk-indexandupload-id, in any order and several at a time. Each returns200, and a failed piece can be sent again. - Last piece: send it once every other piece has returned
200. The response is202withupload.status: processing. If a piece is missing, it is400withMissing chunks.and their indexes inmissing: send those, then the last piece again. - Result: poll
GET /upload/{id}every few seconds until it returns the usual{url, post}, or the error the upload ended with.
- Every piece except the last is exactly 50 MiB (52,428,800 bytes), and the last is the rest. Any other length returns
400withInvalid chunk length. - Send every piece after the first, and every status check, to
https://{region}.api.snipp.ggfromupload.region, so they reach the server holding the earlier pieces. - A chunked upload always creates one post with one file.
post-typehas no effect. - The same pieces add a large file to an existing post through
POST /posts/{code}/files, ending with that endpoint’s{post}body. - Pieces have their own rate limit of 600 per minute, separate from whole-file uploads.
- An upload with no new piece for an hour expires: its pieces are deleted and the held quota is returned.
Examples
One file:Responses
One file:Errors
Headers
Body
multipart/form-data