{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vmotif-com/json-schema/vmotif-com-generation-request-schema.json",
  "title": "GenerationRequest",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vmotif-com-openapi.yml#/components/schemas/GenerationRequest",
  "type": "object",
  "required": [
    "type",
    "prompt"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "image",
        "code"
      ],
      "description": "Kind of output. Must be compatible with `model`."
    },
    "prompt": {
      "type": "string",
      "minLength": 1,
      "maxLength": 50000,
      "description": "Generation prompt."
    },
    "model": {
      "type": "string",
      "description": "Model id from `GET /models`. Defaults to `openai/gpt-image-2` for images and `anthropic/claude-opus-5` for code."
    },
    "images": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "$ref": "#/$defs/ImageInput"
      },
      "description": "Reference images (image generations)."
    },
    "textInputs": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "$ref": "#/$defs/TextInput"
      },
      "description": "Additional text inputs."
    },
    "aspectRatio": {
      "$ref": "#/$defs/AspectRatio"
    },
    "targetLanguage": {
      "$ref": "#/$defs/CodeLanguage"
    },
    "screenHtml": {
      "type": "boolean",
      "default": false,
      "description": "Render the code output as a full HTML screen."
    }
  },
  "$defs": {
    "AspectRatio": {
      "type": "string",
      "enum": [
        "1:1",
        "16:9",
        "9:16",
        "4:3",
        "3:4",
        "3:2",
        "2:3"
      ],
      "description": "Output aspect ratio (image generations)."
    },
    "CodeLanguage": {
      "type": "string",
      "enum": [
        "text",
        "tsx",
        "jsx",
        "css",
        "svg",
        "glsl",
        "json",
        "typescript",
        "javascript",
        "mdx",
        "markdown"
      ],
      "description": "Target language for code generations. `svg` and `glsl` are visual: they render in the app rather than showing as plain text. A `glsl` result is a Shadertoy-convention fragment shader (a bare mainImage body; iResolution/iTime/iTimeDelta/iFrame/iMouse are supplied by the harness and must not be redeclared) that also declares 3-5 tunable uniforms annotated in same-line comments, e.g. `uniform float uSpeed; // @range 0.1 4.0 @default 1.0 @label Speed`."
    },
    "ImageInput": {
      "type": "object",
      "required": [
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "description": "Reference image as an `https://` URL or a `data:` URI."
        },
        "mediaType": {
          "type": "string",
          "default": "image/png",
          "description": "MIME type of the image."
        }
      }
    },
    "TextInput": {
      "type": "object",
      "required": [
        "content"
      ],
      "properties": {
        "content": {
          "type": "string",
          "maxLength": 50000,
          "description": "Text passed to the model."
        },
        "label": {
          "type": "string",
          "description": "Optional label; defaults to `Input N`."
        },
        "language": {
          "type": "string",
          "description": "Optional language hint for code inputs."
        }
      }
    }
  }
}