Uploads
Upload Files
Upload 1 to 50 images or videos. Every upload creates a post. Two or more files form one album unless post-type: individual is sent.
POST
Upload Files
Upload between 1 and 50 files in one request. 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.
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. - 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 by default. 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.
- Priority streaming: eligible videos use adaptive streaming by default and spend priority minutes.
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. A request whose declaredContent-Lengthis already larger than your weekly quota (or 50 times 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. A lapsed team returns403with typeforbidden. - New posts are scanned automatically. A flagged post is moderated after the response.
Examples
One file:Responses
One file:Errors
Authorizations
Your API key from an app on snipp.gg/settings/apps
Headers
public, unlisted or private. Omitted means private.
Available options:
public, unlisted, private album or individual. Only matters for two or more files.
Available options:
album, individual true keeps file metadata. Omitted or false strips it.
false opts videos out of priority (adaptive) streaming.
Body
multipart/form-data