Docs menu
API reference

Media

Uploads and signed URLs.

Upload media

POST/v1/public/media
scopescontent:write

multipart/form-data with a `file` field. Images (JPEG/PNG/WebP/HEIC) up to 50MB, video (MP4/MOV) up to 150MB. iPhone HEIC photos are converted to JPEG. Use the returned id with posts/from-media or set-image.

Body
filerequiredfileThe image or video to upload
request
curl -X POST https://api.taka.ai/v1/public/media \
  -H "Authorization: Bearer taka_live_..." \
  --form "file=@croissants.jpg"
response
{
  "id": "abc123",
  "mimeType": "image/jpeg",
  "size": 184320,
  "blurhash": "LKO2?U%2Tw=w]~RBVZRi};RPxuwH",
  "ratio": 1,
  "url": "https://media.taka.ai/abc123.jpg?signature=...",
  "urlExpiresAt": "2026-09-01T09:30:00Z"
}

Get media metadata and a fresh download URL

GET/v1/public/media/{mediaId}
scopescontent:read

The URL is signed and expires (~6h); re-fetch rather than caching it.

Path and query parameters
mediaIdrequiredstringMedia id returned by the upload
request
curl https://api.taka.ai/v1/public/media/MEDIA_ID \
  -H "Authorization: Bearer taka_live_..."
response
{
  "id": "abc123",
  "mimeType": "image/jpeg",
  "size": 184320,
  "blurhash": "LKO2?U%2Tw=w]~RBVZRi};RPxuwH",
  "ratio": 1,
  "url": "https://media.taka.ai/abc123.jpg?signature=...",
  "urlExpiresAt": "2026-09-01T09:30:00Z"
}