Aether
Guides

Media

Upload images and videos via presigned URLs for use in posts.

Posts reference media by public URL. Use presigned uploads to put files on Aether's storage (Cloudflare R2 or any S3-compatible provider) before publishing.

Presigned upload flow

  1. Request a presigned PUT URL
  2. Upload the file directly to storage with PUT
  3. Use the returned public URL in mediaUrls when creating a post

Get a presigned URL

curl -X POST https://api.aetherhq.dev/v1/media/presign \
  -H "Authorization: Bearer $AETHER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "photo.jpg",
    "contentType": "image/jpeg"
  }'

Response includes uploadUrl, publicUrl, and key (canonical storage key stored on posts as mediaKeys).

// Presign is not yet in the Node SDK — use fetch or add via raw request
const res = await fetch("https://api.aetherhq.dev/v1/media/presign", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AETHER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ filename: "photo.jpg", contentType: "image/jpeg" }),
});
const { data } = await res.json();

Upload the file

curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: image/jpeg" \
  --data-binary @photo.jpg

Attach to a post

{
  "text": "New visual",
  "profileIds": ["prof_ig123"],
  "mediaUrls": ["https://cdn.aetherhq.dev/org-id/uuid.jpg"]
}

At publish time, Aether can re-resolve URLs from mediaKeys if your storage domain changes.

Dashboard upload

The dashboard uses POST /v1/media/upload (multipart proxy) for convenience. API integrations should prefer presigned uploads.

See Media API.

On this page