{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rostro-dev/json-schema/rostro-dev-text-to-speech-request-schema.json",
  "title": "TextToSpeechRequest",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rostro-dev-openapi.json#/components/schemas/TextToSpeechRequest",
  "properties": {
    "transcript": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Transcript",
      "description": "The text to read out.",
      "default": "A wizard's job is to vex chumps quickly in fog."
    },
    "voice": {
      "anyOf": [
        {
          "$ref": "#/$defs/Voice"
        },
        {
          "type": "null"
        }
      ],
      "description": "Select a voice to use.",
      "default": "bright_female_20s"
    },
    "chat_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Chat Id",
      "description": "If this is inside of a chat, include its ID as a string."
    },
    "uuid": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Uuid"
    },
    "mode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Mode"
    },
    "sub_mode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sub Mode"
    },
    "width": {
      "anyOf": [
        {
          "type": "integer",
          "multipleOf": 8.0,
          "maximum": 1536.0,
          "minimum": 8.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Width",
      "description": "The width. Overridden by aspect ratio.",
      "default": 1024
    },
    "height": {
      "anyOf": [
        {
          "type": "integer",
          "multipleOf": 8.0,
          "maximum": 1536.0,
          "minimum": 8.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Height",
      "description": "The height. Overridden by aspect ratio.",
      "default": 1024
    },
    "item_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Item Id",
      "description": "The item_id, if any."
    },
    "extension_source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Extension Source",
      "description": "If an extension is requesting this, include its ID."
    },
    "parent_image": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Parent Image",
      "description": "The UUID of the parent image, if any."
    },
    "aspect_ratio": {
      "anyOf": [
        {
          "$ref": "#/$defs/AspectRatio"
        },
        {
          "type": "null"
        }
      ],
      "description": "The desired aspect ratio.",
      "default": "w1h1"
    },
    "seed": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Seed",
      "description": "Use this only if reproducible results are important.",
      "default": -1
    },
    "prompt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Prompt",
      "description": "It should be descriptive of exactly what you want, and fairly detailed.",
      "default": ""
    },
    "negative_prompt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Negative Prompt",
      "description": "What you don't want in the result.",
      "default": ""
    },
    "num_inference_steps": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 100.0,
          "minimum": 2.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Num Inference Steps",
      "description": "Larger values may produce better outputs at the cost of longer generation times. Values over 50 are usually overkill.",
      "default": 30
    },
    "remove_background": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Remove Background",
      "description": "Whether to remove the background of any image(s) before/after this operation.",
      "default": false
    },
    "init_image": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Init Image",
      "description": "Base64 image string, or a URL to an image."
    },
    "strength": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.001
        },
        {
          "type": "null"
        }
      ],
      "title": "Strength",
      "description": "The strength of any image-to-image transformation.",
      "default": 0.7
    },
    "guidance_scale": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 20.0,
          "minimum": 0.1
        },
        {
          "type": "null"
        }
      ],
      "title": "Guidance Scale",
      "description": "How strongly the prompt affects the output.",
      "default": 3.5
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model",
      "description": "Which model to use. z, or None for the default."
    },
    "voice_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Voice Id",
      "description": "Which voice_id to use. None for the default."
    },
    "remove_silence": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Remove Silence",
      "description": "Whether to remove gaps from the resulting audio.",
      "default": false
    },
    "stream": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Stream",
      "description": "Whether to stream the response.",
      "default": false
    },
    "character_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Character Id",
      "description": "The character's voice to use. Overrides voice id. Must be given as the 'username/project-slug' id."
    }
  },
  "type": "object",
  "$defs": {
    "AspectRatio": {
      "type": "string",
      "enum": [
        "w1h1",
        "w1h2",
        "w2h1",
        "w16h9",
        "w21h9",
        "w2h3",
        "w3h2",
        "w3h4",
        "w4h3",
        "w4h5",
        "w5h4",
        "w9h16",
        "w9h21"
      ],
      "title": "AspectRatio"
    },
    "Voice": {
      "type": "string",
      "enum": [
        "bright_female_20s",
        "gentle_female_30s",
        "whispery_female_40s",
        "formal_female_30s",
        "professional_female_30s",
        "resonant_male_40s",
        "light_male_20s",
        "animated_male_20s",
        "calm_female_20s"
      ],
      "title": "Voice"
    }
  }
}