{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reddit/json-schema/reddit-components-schema-generated-posters-job-schema.json",
  "title": "Generated Posters Job",
  "description": "Poster generation job state selected by `status`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reddit-creative-generator-api-openapi.yml#/components/schemas/components_schema_generated_posters_job",
  "oneOf": [
    {
      "$ref": "#/$defs/components_schema_generated_posters_job_processing"
    },
    {
      "$ref": "#/$defs/components_schema_generated_posters_job_success"
    },
    {
      "$ref": "#/$defs/components_schema_generated_posters_job_failed"
    }
  ],
  "$defs": {
    "components_schema_generated_poster": {
      "title": "Generated Poster",
      "description": "A generated still image extracted from the source video.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "https_url",
          "description": "The generated poster's URL."
        }
      }
    },
    "components_schema_generated_posters_job_error": {
      "title": "Generated Posters Job Error",
      "description": "Failure information for a terminal poster generation job.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "Machine-readable failure category for a terminal poster generation job.\nUse this value to decide whether to verify the source URL, submit a different\nvideo, or retry the same source. See the [video specifications](https://business.reddithelp.com/s/article/video-ad-specifications).\n",
          "enum": [
            "VIDEO_DOWNLOAD_FAILED",
            "VIDEO_TOO_LARGE",
            "VIDEO_PROCESSING_FAILED",
            "INTERNAL_ERROR"
          ],
          "x-enumDescriptions": {
            "VIDEO_DOWNLOAD_FAILED": "The source video did not exist or is inaccessible.",
            "VIDEO_TOO_LARGE": "The source video exceeds the file maximum of 1 GB.",
            "VIDEO_PROCESSING_FAILED": "Use a different source video.",
            "INTERNAL_ERROR": "Start a new job with the same source."
          }
        },
        "message": {
          "type": "string",
          "description": "The human-readable error message."
        }
      }
    },
    "components_schema_generated_posters_job_failed": {
      "title": "Generated Posters Job Failed",
      "description": "A poster generation job that reached a terminal failure state.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "status",
        "error"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The generated posters job ID."
        },
        "status": {
          "type": "string",
          "description": "The job failed.",
          "const": "FAILED"
        },
        "error": {
          "$ref": "#/$defs/components_schema_generated_posters_job_error"
        }
      }
    },
    "components_schema_generated_posters_job_processing": {
      "title": "Generated Posters Job Processing",
      "description": "A poster generation job that is still running.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The generated posters job ID. Treat this as an unscoped capability token; possession grants poll access."
        },
        "status": {
          "type": "string",
          "description": "The job is still processing.",
          "const": "PROCESSING"
        }
      }
    },
    "components_schema_generated_posters_job_success": {
      "title": "Generated Posters Job Success",
      "description": "A poster generation job that completed successfully.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "status",
        "posters"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The generated posters job ID."
        },
        "status": {
          "type": "string",
          "description": "The job completed successfully.",
          "const": "SUCCESS"
        },
        "posters": {
          "type": "array",
          "description": "Generated poster outputs.",
          "minItems": 1,
          "maxItems": 30,
          "items": {
            "$ref": "#/$defs/components_schema_generated_poster"
          }
        }
      }
    }
  }
}