{
  "openapi": "3.0.3",
  "info": {
    "title": "LLMPulse API",
    "description": "API for monitoring brand visibility and sentiment across AI-powered search engines and LLMs (ChatGPT, Perplexity, Gemini, Claude).",
    "version": "1.0.0",
    "contact": {
      "name": "LLMPulse Support",
      "url": "https://llmpulse.ai",
      "email": "support@llmpulse.ai"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://llmpulse.ai/terms"
    }
  },
  "servers": [
    {
      "url": "https://api.llmpulse.ai/api/v1",
      "description": "Production API"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Health",
      "description": "API health check"
    },
    {
      "name": "Dimensions",
      "description": "Retrieve dimension data (projects, competitors, prompts, etc.)"
    },
    {
      "name": "Metrics",
      "description": "Retrieve time-series metrics and aggregations"
    },
    {
      "name": "Answers",
      "description": "Access raw AI responses"
    },
    {
      "name": "Sentiments",
      "description": "Detailed sentiment analysis data"
    },
    {
      "name": "MCP",
      "description": "Model Context Protocol endpoint for AI clients"
    }
  ],
  "paths": {
    "/ping": {
      "get": {
        "tags": ["Health"],
        "summary": "Health check",
        "description": "Returns API status and current timestamp. Use this to verify your API key is valid.",
        "operationId": "ping",
        "responses": {
          "200": {
            "description": "API is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "ok"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/dimensions/projects": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List all projects",
        "description": "Returns all projects accessible with your API key.",
        "operationId": "listProjects",
        "responses": {
          "200": {
            "description": "List of projects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Project"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/dimensions/projects/{id}": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "Get project details",
        "description": "Returns detailed information about a specific project.",
        "operationId": "getProjectDetails",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Project ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Project details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDetails"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/dimensions/competitors": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List competitors",
        "description": "Returns all competitors for a project.",
        "operationId": "listCompetitors",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of competitors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Competitor"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/competitors/{id}": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "Get competitor details",
        "description": "Returns detailed information about a specific competitor.",
        "operationId": "getCompetitorDetails",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Competitor ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Competitor details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompetitorDetails"
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/collections": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List collections (tags)",
        "description": "Returns all prompt collections/tags for a project.",
        "operationId": "listCollections",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of collections",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Collection"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/tags": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List tags (alias for collections)",
        "description": "Alias for /dimensions/collections.",
        "operationId": "listTags",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of tags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Collection"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/models": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List AI models",
        "description": "Returns all AI models available for filtering.",
        "operationId": "listModels",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of AI models",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Model"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/locales": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List locales",
        "description": "Returns all locales (languages/regions) for filtering.",
        "operationId": "listLocales",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of locales",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Locale"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/sentiments": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List sentiment buckets",
        "description": "Returns sentiment bucket definitions with colors.",
        "operationId": "listSentiments",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of sentiment buckets",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SentimentBucket"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/prompts": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List prompts",
        "description": "Returns paginated list of prompts for a project.",
        "operationId": "listPrompts",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of prompts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPrompts"
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/prompt_executions": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List prompt executions",
        "description": "Returns paginated list of prompt execution records.",
        "operationId": "listPromptExecutions",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of prompt executions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPromptExecutions"
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/sources": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List citation sources",
        "description": "Returns paginated list of citation sources (domains).",
        "operationId": "listSources",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of sources",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSources"
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/mentions": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List brand mentions",
        "description": "Returns paginated list of brand mentions in AI responses.",
        "operationId": "listMentions",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of mentions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMentions"
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/citations": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List citations",
        "description": "Returns paginated list of URL citations in AI responses.",
        "operationId": "listCitations",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of citations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCitations"
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/competitor_mentions": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List competitor mentions",
        "description": "Returns paginated list of competitor mentions.",
        "operationId": "listCompetitorMentions",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/Competitors"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of competitor mentions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMentions"
                }
              }
            }
          }
        }
      }
    },
    "/dimensions/competitor_citations": {
      "get": {
        "tags": ["Dimensions"],
        "summary": "List competitor citations",
        "description": "Returns paginated list of competitor citations.",
        "operationId": "listCompetitorCitations",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/Competitors"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of competitor citations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedCitations"
                }
              }
            }
          }
        }
      }
    },
    "/metrics/timeseries": {
      "get": {
        "tags": ["Metrics"],
        "summary": "Get time-series metrics",
        "description": "Returns time-series data for specified metrics with configurable granularity.",
        "operationId": "getTimeseries",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "metrics",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of metrics: mentions, citations, responses, visibility, citation_rate, ai_visibility_score, avg_position, sentiment_very_positive, sentiment_positive, sentiment_neutral, sentiment_negative, sentiment_very_negative, net_sentiment"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["day", "week", "month"]
            },
            "description": "Time granularity for aggregation"
          },
          {
            "name": "range",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Number of days to look back (alternative to from/to)"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Start date (YYYY-MM-DD)"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "End date (YYYY-MM-DD)"
          },
          {
            "$ref": "#/components/parameters/Competitors"
          },
          {
            "name": "model",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by AI model (e.g., gpt-4o, claude-3)"
          },
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by locale"
          },
          {
            "name": "collection",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter by collection/tag ID"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          },
          {
            "name": "include_project",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            },
            "description": "Include project data in response"
          }
        ],
        "responses": {
          "200": {
            "description": "Time-series data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeseriesResponse"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        }
      }
    },
    "/metrics/summary": {
      "get": {
        "tags": ["Metrics"],
        "summary": "Get metrics summary",
        "description": "Returns aggregated summary metrics for a time period.",
        "operationId": "getSummary",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "metrics",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated list of metrics"
          },
          {
            "name": "granularity",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["day", "week", "month"]
            }
          },
          {
            "name": "range",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Number of days to look back"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Summary metrics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SummaryResponse"
                }
              }
            }
          }
        }
      }
    },
    "/metrics/sov": {
      "get": {
        "tags": ["Metrics"],
        "summary": "Get Share of Voice",
        "description": "Returns Share of Voice breakdown comparing your brand to competitors.",
        "operationId": "getShareOfVoice",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "range",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30
            },
            "description": "Number of days to look back"
          },
          {
            "$ref": "#/components/parameters/Competitors"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Share of Voice data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SovResponse"
                }
              }
            }
          }
        }
      }
    },
    "/metrics/top_sources": {
      "get": {
        "tags": ["Metrics"],
        "summary": "Get top citation sources",
        "description": "Returns top domains cited in AI responses, ranked by frequency or visibility.",
        "operationId": "getTopSources",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "name": "range",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": ["total_responses", "avg_visibility"],
              "default": "total_responses"
            }
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter domains by search term"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Top sources data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TopSourcesResponse"
                }
              }
            }
          }
        }
      }
    },
    "/answers": {
      "get": {
        "tags": ["Answers"],
        "summary": "List AI answers",
        "description": "Returns paginated list of raw AI responses.",
        "operationId": "listAnswers",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "name": "prompt",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by prompt ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of answers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAnswers"
                }
              }
            }
          }
        }
      }
    },
    "/answers/{id}": {
      "get": {
        "tags": ["Answers"],
        "summary": "Get answer details",
        "description": "Returns full details of a specific AI response.",
        "operationId": "getAnswer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Answer details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnswerDetails"
                }
              }
            }
          }
        }
      }
    },
    "/sentiments": {
      "get": {
        "tags": ["Sentiments"],
        "summary": "List detailed sentiments",
        "description": "Returns paginated list of detailed sentiment analysis records.",
        "operationId": "listDetailedSentiments",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProjectId"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of sentiment records",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSentiments"
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "tags": ["MCP"],
        "summary": "Model Context Protocol endpoint",
        "description": "JSON-RPC 2.0 endpoint for AI clients using the Model Context Protocol.",
        "operationId": "handleMcp",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/McpRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MCP response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key authentication. Get your key from https://app.llmpulse.ai/app/api_keys"
      }
    },
    "parameters": {
      "ProjectId": {
        "name": "project_id",
        "in": "query",
        "required": true,
        "schema": {
          "type": "integer"
        },
        "description": "Your project ID"
      },
      "Competitors": {
        "name": "competitors",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Comma-separated competitor IDs"
      },
      "Page": {
        "name": "page",
        "in": "query",
        "schema": {
          "type": "integer",
          "default": 1
        },
        "description": "Page number"
      },
      "PerPage": {
        "name": "per_page",
        "in": "query",
        "schema": {
          "type": "integer",
          "default": 20,
          "maximum": 100
        },
        "description": "Items per page (max 100)"
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Authentication failed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "ERR_MISSING_AUTH",
              "message": "Missing Authorization header"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "ERR_PROJECT_NOT_FOUND",
              "message": "Project not found or not accessible"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Access forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "ERR_REVOKED_API_KEY",
              "message": "API key has been revoked"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "Invalid parameters",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "ERR_INVALID_PARAM",
              "message": "Unknown metric: invalid_metric"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Error code",
            "enum": ["ERR_MISSING_AUTH", "ERR_INVALID_API_KEY", "ERR_REVOKED_API_KEY", "ERR_PROJECT_NOT_FOUND", "ERR_INVALID_PARAM"]
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message"
          }
        }
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          }
        }
      },
      "ProjectDetails": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "competitors_count": {
            "type": "integer"
          },
          "prompts_count": {
            "type": "integer"
          }
        }
      },
      "Competitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          }
        }
      },
      "CompetitorDetails": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Collection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "prompts_count": {
            "type": "integer"
          }
        }
      },
      "Model": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          }
        }
      },
      "Locale": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "SentimentBucket": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "color": {
            "type": "string"
          }
        }
      },
      "Prompt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "text": {
            "type": "string"
          },
          "collection_id": {
            "type": "integer"
          }
        }
      },
      "PaginatedPrompts": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Prompt"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      },
      "PaginatedPromptExecutions": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      },
      "PaginatedSources": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      },
      "PaginatedMentions": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      },
      "PaginatedCitations": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      },
      "PaginatedAnswers": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      },
      "AnswerDetails": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "prompt": {
            "type": "string"
          },
          "response": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "executed_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PaginatedSentiments": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      },
      "PaginationMeta": {
        "type": "object",
        "properties": {
          "current_page": {
            "type": "integer"
          },
          "total_pages": {
            "type": "integer"
          },
          "total_count": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          }
        }
      },
      "TimeseriesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "project": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "competitors": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "granularity": {
                "type": "string"
              },
              "from": {
                "type": "string",
                "format": "date"
              },
              "to": {
                "type": "string",
                "format": "date"
              }
            }
          }
        }
      },
      "SummaryResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object"
          },
          "meta": {
            "type": "object"
          }
        }
      },
      "SovResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "project": {
                "type": "object",
                "properties": {
                  "share": {
                    "type": "number"
                  },
                  "mentions": {
                    "type": "integer"
                  }
                }
              },
              "breakdown": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "others": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "TopSourcesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "domain": {
                  "type": "string"
                },
                "total_responses": {
                  "type": "integer"
                },
                "avg_visibility": {
                  "type": "number"
                }
              }
            }
          },
          "meta": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        }
      },
      "McpRequest": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          },
          "id": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "params": {
            "type": "object"
          }
        }
      },
      "McpResponse": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "result": {
            "type": "object"
          }
        }
      }
    }
  }
}
