{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gifsnap-com/json-schema/gifsnap-com-for-you-page-schema.json",
  "title": "ForYouPage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gifsnap-com-openapi.json#/components/schemas/ForYouPage",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "contract_version": {
      "const": 1
    },
    "request_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "model_version": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "feedback_token": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ForYouItem"
      },
      "maxItems": 30
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2048
    }
  },
  "required": [
    "contract_version",
    "request_id",
    "model_version",
    "feedback_token",
    "items",
    "next_cursor"
  ],
  "$defs": {
    "ForYouIdentity": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "provider": {
          "const": "gifsnap"
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "content_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "source": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        }
      },
      "required": [
        "provider",
        "id",
        "content_id"
      ]
    },
    "ForYouItem": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "recommendation_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "identity": {
          "$ref": "#/$defs/ForYouIdentity"
        },
        "title": {
          "type": "string",
          "maxLength": 500
        },
        "url": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "format": "uri",
          "pattern": "^https://"
        },
        "poster_url": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "format": "uri",
          "pattern": "^https://"
        },
        "width": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4096
        },
        "height": {
          "type": "integer",
          "minimum": 1,
          "maximum": 4096
        },
        "playback": {
          "$ref": "#/$defs/ForYouPlayback"
        },
        "personalization_allowed": {
          "const": true
        },
        "attribution": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      },
      "required": [
        "recommendation_id",
        "identity",
        "title",
        "url",
        "poster_url",
        "width",
        "height",
        "playback",
        "personalization_allowed",
        "attribution"
      ]
    },
    "ForYouPlayback": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "format": "uri",
          "pattern": "^https://"
        },
        "mime_type": {
          "const": "video/mp4"
        },
        "width": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1280
        },
        "height": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1280
        },
        "byte_size": {
          "type": "integer",
          "minimum": 1,
          "maximum": 8388608
        },
        "duration_ms": {
          "type": "integer",
          "minimum": 200,
          "maximum": 30000
        }
      },
      "required": [
        "url",
        "mime_type",
        "width",
        "height",
        "byte_size",
        "duration_ms"
      ]
    }
  }
}