{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wandura-ai/json-schema/wandura-ai-style-schema.json",
  "title": "Style",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wandura-ai-openapi.json#/components/schemas/Style",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "const": "style"
    },
    "model": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "input_hint": {
      "type": "string"
    },
    "preview_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "inputs": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "enum": [
          "required",
          "optional"
        ]
      },
      "description": "Each field of POST /v2/jobs this style takes. Fields not listed are refused (422)."
    },
    "input_slots": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InputSlot"
      },
      "description": "Styles that put one person (or pet) per photo: one entry per photo of image_urls, IN ORDER (entry 1 = image_urls[0]); `subject` says what each photo must show (a person, or which animal). Show it on each upload box. A style that takes ONE photo of everyone together has a single entry whose `roles` lists who must be in it. Absent for other styles."
    },
    "input_counts": {
      "type": "object",
      "additionalProperties": {
        "type": "integer",
        "minimum": 1
      },
      "description": "The exact number of files a list field takes, e.g. {\"image_urls\": 2}: send exactly 2 photos, one per subject, in input_slots order. Any other count is refused with 422 INVALID_INPUT (field image_urls) before anything runs or is charged, test keys included. Absent when the style has no fixed count."
    },
    "max_job_seconds": {
      "type": "integer"
    },
    "price": {
      "type": "object",
      "properties": {
        "credits": {
          "type": "number",
          "description": "1 credit = $0.01"
        },
        "usd": {
          "type": "number"
        }
      },
      "description": "Charged only when the job succeeds (live keys)."
    },
    "list_price": {
      "type": "object",
      "properties": {
        "credits": {
          "type": "number",
          "description": "1 credit = $0.01"
        },
        "usd": {
          "type": "number"
        }
      },
      "description": "Partner pricing only: the list price; price is what is charged."
    },
    "discount": {
      "type": "object",
      "properties": {
        "percent": {
          "type": "number"
        },
        "label": {
          "type": "string",
          "description": "e.g. \"Partner −20%\""
        }
      },
      "description": "Partner pricing only: your org's % off every job; the prices above are already discounted (what is charged)."
    }
  },
  "$defs": {
    "InputSlot": {
      "type": "object",
      "properties": {
        "pronoun": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "she",
            "he",
            "they",
            null
          ]
        },
        "role": {
          "type": [
            "string",
            "null"
          ]
        },
        "hint": {
          "type": [
            "string",
            "null"
          ],
          "description": "What photo to take."
        },
        "subject": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "person",
            "dog",
            "cat",
            "animal",
            null
          ],
          "description": "What this photo must show: person = a person, never an animal; dog / cat = that animal, never a person; animal = a cat or a dog, never a person. Show it on the upload box so a user does not send a face to a pet role or a pet to a person role. null = the style does not say. New values may be added."
        },
        "preview_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "A still of the person this photo replaces in the template video."
        },
        "roles": {
          "type": "array",
          "description": "Only on a style that takes ONE photo of everyone together (the single entry of input_slots): who must be in that photo, in the style's order. `side` = where the role stands in the photo when the style tells them apart by place (left, center, right), else null.",
          "items": {
            "type": "object",
            "properties": {
              "pronoun": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "she",
                  "he",
                  "they",
                  null
                ]
              },
              "role": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "side": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "subject": {
                "type": "string",
                "enum": [
                  "person",
                  "animal"
                ],
                "description": "person = a person; animal = a cat or a dog."
              }
            }
          }
        }
      }
    }
  }
}