{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/svgai-org/json-schema/svgai-org-generate-request-schema.json",
  "title": "GenerateRequest",
  "description": "At least one nonempty prompt, image or image_url is required. image and image_url cannot both be supplied. These schemas describe the recommended canonical input types; the server also normalizes some string/boolean aliases.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/svgai-org-openapi.json#/components/schemas/GenerateRequest",
  "type": "object",
  "properties": {
    "prompt": {
      "type": "string",
      "maxLength": 4000,
      "description": "Plain-language design brief. Optional with an image; whitespace-only text is empty."
    },
    "image": {
      "type": "string",
      "minLength": 100,
      "description": "Raw base64 or an image data URL. PNG, JPEG, or WebP; up to 8 MB decoded. Do not send together with image_url."
    },
    "image_url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https?://",
      "description": "Publicly reachable HTTP(S) image URL. Private/reserved hosts are rejected; up to 8 MB downloaded. Do not send together with image."
    },
    "model": {
      "type": "string",
      "enum": [
        "classic",
        "ultra"
      ],
      "default": "classic",
      "description": "Generation model. Check current costs through GET /api/v1/credits."
    },
    "variations": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4,
      "default": 1,
      "description": "Each variation uses credits."
    },
    "transparent_background": {
      "type": "string",
      "enum": [
        "auto",
        "on",
        "off"
      ],
      "default": "auto"
    },
    "aspect_ratio": {
      "type": "string",
      "enum": [
        "default",
        "square"
      ],
      "default": "default"
    },
    "wait": {
      "type": "boolean",
      "default": true
    }
  },
  "anyOf": [
    {
      "required": [
        "prompt"
      ],
      "properties": {
        "prompt": {
          "minLength": 1,
          "pattern": "\\S"
        }
      }
    },
    {
      "required": [
        "image"
      ]
    },
    {
      "required": [
        "image_url"
      ]
    }
  ],
  "not": {
    "required": [
      "image",
      "image_url"
    ]
  }
}