{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flowspeech/json-schema/flowspeech-create-job-schema.json",
  "title": "CreateJob",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flowspeech-openapi.json#/components/schemas/CreateJob",
  "type": "object",
  "properties": {
    "model": {
      "type": "string",
      "enum": [
        "gemini-tts"
      ],
      "default": "gemini-tts"
    },
    "input": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "mode": {
              "const": "single"
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100000
            },
            "voiceName": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100,
              "description": "Voice name returned by GET /api/v1/voices."
            }
          },
          "required": [
            "mode",
            "text",
            "voiceName"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "const": "multi"
            },
            "segments": {
              "type": "array",
              "minItems": 1,
              "items": {
                "type": "object",
                "properties": {
                  "speaker": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100000
                  },
                  "voiceName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Voice name returned by GET /api/v1/voices."
                  }
                },
                "required": [
                  "speaker",
                  "text",
                  "voiceName"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "mode",
            "segments"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "input"
  ],
  "additionalProperties": false
}