POST /v1/posts takes media as a list of links, a social network fetches or receives those bytes, and that is the whole contract. Everything below is about how to get a URL when you do not already have one.
Three ways in
You already host it
Pass the URL straight to
POST /v1/posts. Nothing is stored by Nylon and nothing is charged for.Let Nylon copy it
POST /v1/media with { "url": "…" }. Nylon downloads it once and hands back a URL of its own.Send the bytes
POST /v1/media with the file as the body, or POST /v1/media/uploads for anything large.A link you already host
A link Nylon copies
Bytes
Post the file with its own content type, for anything up to 4 MB:@vercel/blob client against POST /v1/media/uploads.
A
data: URI also works anywhere media takes a URL, and is stored the same way. It exists for agents: a model that has just generated an image has bytes, not a link.What Nylon keeps, and for how long
Two tiers, and the second one is the point:
A file you uploaded and never published deletes itself after a week, along with any compressed copies made from it. That is as much about not paying to store files nobody posted as it is about not holding your media longer than needed.
Uploading the same file twice stores it once — assets are addressed by the hash of their contents.
Compression
Nylon fixes weight, never shape. An image over a network’s byte limit is recompressed before publishing: quality first, then dimensions, stopping the moment it fits. A transparent PNG stays a PNG; an opaque one may become a JPEG. For the networks that fetch media themselves — Instagram, Threads, TikTok, Google Business and DEV — the compressed copy is hosted by Nylon and that URL is what the platform is given. It is made once per file per limit, so a carousel to five profiles compresses once. What is never changed: aspect ratio, exact dimensions, video, and animated GIFs. Each of those would alter what you published rather than just its file size, so they are refused with the real numbers instead.POST /v1/validate reports all of it before anything goes out.