{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/frameo-ai/json-schema/frameo-ai-generation-input-schema.json",
  "title": "GenerationInput",
  "description": "The request a generation is made from. This fixes the shape; `catalog.check` holds the\nvalues to what the model lists, and the gateway has the last word.",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/frameo-ai-openapi.json#/components/schemas/GenerationInput",
  "properties": {
    "model": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1,
      "title": "Model"
    },
    "prompt": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20000
        },
        {
          "type": "null"
        }
      ],
      "title": "Prompt"
    },
    "negative_prompt": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20000
        },
        {
          "type": "null"
        }
      ],
      "title": "Negative Prompt"
    },
    "images": {
      "items": {
        "$ref": "#/$defs/Media"
      },
      "type": "array",
      "maxItems": 32,
      "title": "Images"
    },
    "videos": {
      "items": {
        "$ref": "#/$defs/Media"
      },
      "type": "array",
      "maxItems": 8,
      "title": "Videos"
    },
    "audios": {
      "items": {
        "$ref": "#/$defs/Media"
      },
      "type": "array",
      "maxItems": 8,
      "title": "Audios"
    },
    "duration_seconds": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Duration Seconds"
    },
    "resolution": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ],
      "title": "Resolution"
    },
    "aspect_ratio": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 20
        },
        {
          "type": "null"
        }
      ],
      "title": "Aspect Ratio"
    },
    "generate_audio": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Generate Audio"
    },
    "seed": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Seed"
    },
    "draft": {
      "anyOf": [
        {
          "$ref": "#/$defs/Draft"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "model"
  ],
  "$defs": {
    "Draft": {
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "draft",
            "finalize"
          ],
          "title": "Mode"
        },
        "source_generation_id": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 64
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Generation Id"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "mode"
      ],
      "title": "Draft",
      "description": "Draft mode: `draft` renders a cheap preview; `finalize` renders one finished draft in full,\nnamed by its generation id."
    },
    "Media": {
      "properties": {
        "url": {
          "type": "string",
          "maxLength": 4096,
          "minLength": 1,
          "title": "Url"
        },
        "role": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 40
            },
            {
              "type": "null"
            }
          ],
          "title": "Role"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "url"
      ],
      "title": "Media"
    }
  }
}