{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/toughtongueai-com/json-schema/toughtongueai-com-public-scenario-response-schema.json",
  "title": "PublicScenarioResponse",
  "description": "Schema for scenario responses in the public API",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/toughtongueai-com-openapi.json#/components/schemas/PublicScenarioResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "description": {
      "type": "string",
      "title": "Description"
    },
    "user_friendly_description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "User Friendly Description"
    },
    "rubrik": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rubrik"
    },
    "is_public": {
      "type": "boolean",
      "title": "Is Public",
      "default": true
    },
    "passcode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Passcode"
    },
    "is_recording": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Is Recording"
    },
    "restrict_analysis": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Restrict Analysis"
    },
    "session_analysis": {
      "anyOf": [
        {
          "$ref": "#/$defs/SessionAnalysis"
        },
        {
          "type": "null"
        }
      ]
    },
    "appearance": {
      "anyOf": [
        {
          "$ref": "#/$defs/Appearance"
        },
        {
          "type": "null"
        }
      ]
    },
    "pricing": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProductPricing-Output"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "description"
  ],
  "$defs": {
    "Appearance": {
      "properties": {
        "voice": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Voice",
          "description": "Voice name for the agent. Options: Aoede, Charon, Fenrir, Kore, Puck",
          "default": "Aoede"
        },
        "avatar_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avatar Url",
          "description": "Custom avatar image URL. If provided, overrides the default avatar."
        },
        "live_avatar_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Live Avatar Id",
          "description": "LiveKit avatar ID from stock avatars (Avatario). Used for live video avatars."
        },
        "language_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Language Code",
          "description": "Language code (in BCP 47 format, e.g. \"en-US\") for speech synthesis. Valid values are: de-DE, en-AU, en-GB, en-IN, es-US, fr-FR, hi-IN, pt-BR, ar-XA, es-ES, fr-CA, id-ID, it-IT, ja-JP, tr-TR, vi-VN, bn-IN, gu-IN, kn-IN, ml-IN, mr-IN, ta-IN, te-IN, nl-NL, ko-KR, cmn-CN, pl-PL, ru-RU, and th-TH.",
          "default": "en-US"
        },
        "start_sound": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "countdown_blip",
                "ringtone",
                "click",
                "none"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Start Sound",
          "description": "Start sound option for connection button. Options: countdown_blip (2x blips with effect), ringtone, click, none",
          "default": "countdown_blip"
        },
        "hybrid_avatar": {
          "anyOf": [
            {
              "$ref": "#/$defs/HybridAvatar"
            },
            {
              "type": "null"
            }
          ],
          "description": "Hybrid avatar configuration with thinking/speaking videos"
        }
      },
      "type": "object",
      "title": "Appearance",
      "description": "Visual and auditory representation of the AI agent.\nTODO: KP: Make it typed for voices"
    },
    "BillingInterval": {
      "type": "string",
      "enum": [
        "month",
        "6_months",
        "year"
      ],
      "title": "BillingInterval",
      "description": "Supported billing intervals for recurring payments"
    },
    "HybridAvatar": {
      "properties": {
        "enabled": {
          "type": "boolean",
          "title": "Enabled",
          "description": "Whether hybrid avatar mode is enabled",
          "default": false
        },
        "thinking_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Thinking Url",
          "description": "S3 URL for thinking state video (played when agent is not speaking)"
        },
        "speaking_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Speaking Url",
          "description": "S3 URL for speaking state video (played when agent is speaking)"
        }
      },
      "type": "object",
      "title": "HybridAvatar",
      "description": "Configuration for hybrid avatar with thinking/speaking video states."
    },
    "PriceConfig": {
      "properties": {
        "stripe_price_id": {
          "type": "string",
          "title": "Stripe Price Id"
        },
        "billing_interval": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillingInterval"
            },
            {
              "type": "null"
            }
          ]
        },
        "amount": {
          "type": "number",
          "title": "Amount"
        },
        "currency": {
          "type": "string",
          "title": "Currency",
          "default": "USD"
        },
        "is_default": {
          "type": "boolean",
          "title": "Is Default",
          "default": false
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        }
      },
      "type": "object",
      "required": [
        "stripe_price_id",
        "amount"
      ],
      "title": "PriceConfig",
      "description": "Configuration for a specific price variant"
    },
    "ProductPricing-Output": {
      "properties": {
        "enabled": {
          "type": "boolean",
          "title": "Enabled",
          "description": "Whether this product requires payment",
          "default": false
        },
        "stripe_product_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Stripe Product Id",
          "description": "Stripe product ID for this product"
        },
        "configs": {
          "items": {
            "$ref": "#/$defs/PriceConfig"
          },
          "type": "array",
          "title": "Configs",
          "description": "Multiple price configurations (monthly, 6-month, annual, etc.)"
        }
      },
      "type": "object",
      "title": "ProductPricing",
      "description": "Consolidated pricing information for products (scenarios/collections)"
    },
    "SessionAnalysis": {
      "properties": {
        "admin_email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Admin Email",
          "description": "Email address(es) to send analysis reports to. Supports comma-separated values for multiple recipients (e.g., 'admin@example.com, manager@example.com'). If present, analysis reports will be automatically sent to these emails."
        },
        "is_auto_analysis": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Is Auto Analysis",
          "description": "Whether to automatically trigger analysis when session ends",
          "default": false
        },
        "is_auto_submit": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Is Auto Submit",
          "description": "Whether to automatically submit session data without user interaction",
          "default": false
        },
        "multimodal_analysis": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Multimodal Analysis",
          "description": "Whether to enable multimodal (video/audio) analysis for sessions",
          "default": false
        },
        "email_analysis": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email Analysis",
          "description": "Whether to send analysis results via email to admin emails",
          "default": false
        },
        "email_transcript": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email Transcript",
          "description": "Whether to send session transcript via email to admin emails",
          "default": false
        }
      },
      "type": "object",
      "title": "SessionAnalysis",
      "description": "Configuration for session analysis."
    }
  }
}