Media API for Developers

Upload, optimize, and manage media files for social publishing. Automatic format conversion and platform-specific optimization.

No credit card required · Full API access

Features

Everything you need

Direct File Upload

Upload images and videos directly via multipart form data. Receive a stable media ID you can reference in any number of future posts across all platforms.

URL-Based Upload

Pass a public URL and RelayAPI fetches, validates, and stores the file for you. Ideal for pulling assets from your CMS, DAM, or CDN without an extra download step.

Automatic Resizing & Optimization

Every upload is automatically resized and compressed to meet each target platform's requirements — Instagram's square crops, Twitter's aspect ratios, LinkedIn's resolution limits — all handled server-side.

Format Conversion

Upload in any common format and RelayAPI converts as needed. WebP to JPEG for platforms that don't support it, MOV to MP4 for broader compatibility, and animated GIF to video where required.

Thumbnail Generation

Video uploads automatically generate multiple thumbnail options at key frames. Select a thumbnail via the API or let the platform choose the best one.

Media Library Management

Browse, search, tag, and organize all uploaded media through the API. Filter by type, upload date, usage status, or custom tags to keep your asset library under control.

Global CDN Delivery

All media is served from Cloudflare's global CDN with edge caching across 300+ locations. Your assets load fast regardless of where your audience is.

Metadata Extraction

Automatically extract EXIF data, dimensions, duration, codec information, and color profiles. Use metadata to build smart media selectors or audit your library.

How It Works

Up and running in minutes

1

Get Your API Key

Sign up and generate your credentials in seconds.

2

Connect Social Accounts

Link platforms via OAuth with our guided setup flow.

3

Start Building

Use the API to publish, manage, and track content across all platforms.

Why Developers Choose RelayAPI

One Upload Endpoint, Every Format

Building a media pipeline that handles format conversion, resizing for 17 platforms, and CDN delivery is a massive undertaking. RelayAPI gives you all of it through a single upload endpoint.

Enterprise-Grade Reliability

Media is stored on Cloudflare R2 with 99.999999999% durability and served from a global CDN with 99.9% uptime. Your files are safe and always accessible.

Developer-First Experience

Simple multipart upload, presigned URL support, comprehensive SDKs, and detailed API docs. Handle media in your app the way it should work — without fighting platform quirks.

Quick Start

Start building in minutes

curl -X POST https:"color:#6a9955">//api.relayapi.dev/v1/media \
  -H "Authorization: Bearer rlay_live_xxxxxxxx" \
  -F "file=@./product-hero.png" \
  -F "alt_text=Product hero image showing the new dashboard" \
  -F "tags=product,launch,2026"

Frequently Asked Questions

Ready to Start Building?

Get your API key and start publishing across 17 platforms in minutes.

Start Building Free

© 2026 Relay. All rights reserved.