> ## Documentation Index
> Fetch the complete documentation index at: https://docs.social-api.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get platform constraints

> Returns media and text constraints for all supported platforms. Cacheable.



## OpenAPI

````yaml /api-reference/openapi.json get /posts/validate
openapi: 3.0.0
info:
  description: >-
    Unified social media inbox API. Read and respond to comments, DMs, reviews,
    and mentions across Instagram, Facebook, Threads, Google Business Profile,
    TikTok, LinkedIn, and YouTube through a single REST API. X/Twitter and
    Trustpilot coming soon.
  title: SocialAPI.AI
  contact:
    name: SocialAPI.AI Support
    email: support@social-api.ai
  license:
    name: MIT
  version: '1.0'
servers:
  - url: https://api.social-api.ai/v1
security: []
paths:
  /posts/validate:
    get:
      tags:
        - Posts
      summary: Get platform constraints
      description: >-
        Returns media and text constraints for all supported platforms.
        Cacheable.
      parameters:
        - description: Filter to a single platform
          name: platform
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.PlatformConstraintsResponse'
        '400':
          description: Unknown platform
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_endpoints.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api_endpoints.PlatformConstraintsResponse:
      type: object
      properties:
        data:
          type: object
          additionalProperties:
            $ref: >-
              #/components/schemas/social-api_ai_core_api_service.PlatformConstraints
    api_endpoints.ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/api_endpoints.ErrorBody'
    social-api_ai_core_api_service.PlatformConstraints:
      type: object
      properties:
        carousel:
          $ref: >-
            #/components/schemas/social-api_ai_core_api_service.CarouselConstraints
        media:
          $ref: '#/components/schemas/social-api_ai_core_api_service.MediaConstraints'
        scheduling:
          $ref: >-
            #/components/schemas/social-api_ai_core_api_service.SchedulingConstraints
        supports_mixed_media:
          description: >-
            SupportsMixedMedia reports whether a platform_attachment_id item may
            be

            combined with other media (url/media_id) in the same post. When
            false

            (instagram, threads) a platform_attachment_id must be the only media
            item.

            Meaningful only when SupportsPlatformAttachmentID is true.
          type: boolean
        supports_platform_attachment_id:
          type: boolean
        text:
          $ref: '#/components/schemas/social-api_ai_core_api_service.TextConstraints'
    api_endpoints.ErrorBody:
      type: object
      properties:
        code:
          type: string
          example: resource.not_found
        message:
          type: string
          example: Account not found
        meta:
          type: object
          additionalProperties: {}
    social-api_ai_core_api_service.CarouselConstraints:
      type: object
      properties:
        allow_video:
          description: can carousel include video items
          type: boolean
        images_only:
          description: only image items allowed
          type: boolean
        max_items:
          type: integer
        min_items:
          type: integer
        photos_only:
          description: only photo items (no video, no gif - stricter than ImagesOnly)
          type: boolean
        supported:
          type: boolean
    social-api_ai_core_api_service.MediaConstraints:
      type: object
      properties:
        max_image_size_bytes:
          description: 0 = not supported
          type: integer
        max_video_duration_sec:
          description: 0 = no max
          type: integer
        max_video_fps:
          description: 0 = no limit
          type: integer
        max_video_size_bytes:
          description: 0 = not supported
          type: integer
        min_video_duration_sec:
          description: 0 = no min
          type: integer
        supported_image_types:
          description: MIME types, e.g. "image/jpeg"
          type: array
          items:
            type: string
        supported_video_types:
          description: MIME types, e.g. "video/mp4"
          type: array
          items:
            type: string
    social-api_ai_core_api_service.SchedulingConstraints:
      type: object
      properties:
        mode:
          description: >-
            Mode reflects the platform's native scheduling support: "native"
            when the

            platform can schedule the post itself, "server_side" when the
            platform has

            no native scheduling and SocialAPI holds the post and publishes it
            at the

            scheduled time. Regardless of mode, scheduled_at is accepted
            whenever

            Supported is true. Empty when Supported is false.
          type: string
        supported:
          description: whether scheduled_at is accepted for this platform
          type: boolean
    social-api_ai_core_api_service.TextConstraints:
      type: object
      properties:
        counting_mode:
          description: '"chars" (default), "utf16", "bytes"'
          type: string
        max_hashtags:
          description: 0 = no limit
          type: integer
        max_length:
          description: maximum allowed length (in units defined by CountingMode)
          type: integer
        max_mentions:
          description: 0 = no limit
          type: integer
        photo_max_length:
          description: >-
            platform-specific stricter cap for photo-mode captions (e.g.
            TikTok); 0 = use MaxLength
          type: integer
  securitySchemes:
    BearerAuth:
      description: >-
        Prefix your API key with "Bearer ". Example: `Authorization: Bearer
        sapi_key_...`
      type: apiKey
      name: Authorization
      in: header

````