Media

Check media limits

Changed on

Preflight a file against the platforms connected to your workspace and find out which (if any) would reject it by size or format, before you upload or post. Provide ONE of: a public url (we read its size/type via a HEAD request), an existing media_id, or an explicit size_bytes + mime. Use this to warn the user ("this 995 MB video won't post to Instagram") and confirm before uploading.

post/media/check

Request

  • Base URL
    https://api.omnisocials.com/v1
  • URL
    https://api.omnisocials.com/v1/media/check
  • Auth
    HTTP bearer

Request body

urlstring

Public URL of the file to check (HEAD-probed for size + type).

media_idstring

Id of an already-uploaded library item to check.

size_bytesinteger

File size in bytes (use with mime when you already know them).

mimestring

MIME type, e.g. "video/mp4" (use with size_bytes).

Example request

{
  "url": "https://example.com/video.mp4",
  "media_id": "482913",
  "size_bytes": 471859200,
  "mime": "video/mp4"
}

Response

Compatibility result

connected_platformsstring[]
compatibleboolean

true when no connected platform would reject the file.

summarystring nullable

One-line human summary, or null when fully compatible.

Example response

{
  "file": {
    "size_bytes": 471859200,
    "mime": "video/mp4",
    "size_known": true
  },
  "connected_platforms": [
    "instagram"
  ],
  "warnings": [
    {
      "platform": "instagram",
      "display_name": "Instagram",
      "reasons": [
        "max 300 MB"
      ]
    }
  ],
  "summary": "This file (450 MB) won't post to: Instagram (max 300 MB).",
  "fit": [
    {
      "platform": "instagram",
      "display_name": "Instagram",
      "ratio": "9:16",
      "target": "4:5"
    }
  ]
}

Changes