{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dialogbrain-com/json-schema/dialogbrain-com-tts-key-list-response-schema.json",
  "title": "TtsKeyListResponse",
  "description": "GET /api/billing/tts-keys — every provider's status for the user\nplus the per-workspace toggle matrix the UI renders.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dialogbrain-com-billing-tts-api-openapi.yml#/components/schemas/TtsKeyListResponse",
  "properties": {
    "providers": {
      "items": {
        "$ref": "#/$defs/TtsKeyState"
      },
      "type": "array",
      "title": "Providers"
    },
    "workspace_toggles": {
      "items": {
        "$ref": "#/$defs/WorkspaceTtsBYOKItem"
      },
      "type": "array",
      "title": "Workspace Toggles"
    }
  },
  "type": "object",
  "required": [
    "providers",
    "workspace_toggles"
  ],
  "$defs": {
    "TtsKeyState": {
      "properties": {
        "provider": {
          "type": "string",
          "title": "Provider"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "has_key": {
          "type": "boolean",
          "title": "Has Key"
        },
        "masked_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Masked Key"
        },
        "last_uploaded_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Uploaded At"
        }
      },
      "type": "object",
      "required": [
        "provider",
        "label",
        "has_key"
      ],
      "title": "TtsKeyState",
      "description": "One provider's BYOK status for the calling user."
    },
    "WorkspaceTtsBYOKItem": {
      "properties": {
        "workspace_id": {
          "type": "integer",
          "title": "Workspace Id"
        },
        "workspace_name": {
          "type": "string",
          "title": "Workspace Name"
        },
        "enabled_by_provider": {
          "additionalProperties": {
            "type": "boolean"
          },
          "type": "object",
          "title": "Enabled By Provider"
        }
      },
      "type": "object",
      "required": [
        "workspace_id",
        "workspace_name",
        "enabled_by_provider"
      ],
      "title": "WorkspaceTtsBYOKItem"
    }
  }
}