SmartMetrics API Endpoints

API Documentation

Comprehensive documentation for all SmartMetrics API endpoints with real examples and responses.

Brand Discovery

Run LLM knowledge benchmarks across multiple AI models to analyze brand understanding and performance

4 credits

Endpoint

POST /api/llm/brand-discovery

Request Body

{
  "website_url": "string (required) - Website URL to analyze",
  "models": "array (optional) - Array of models to use ['openai', 'claude', 'gemini']. Defaults to all three."
}

Code Examples

curl -X POST "https://your-domain.com/api/llm/brand-discovery" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "website_url": "https://apple.com",
  "models": [
    "openai",
    "claude",
    "gemini"
  ]
}'

Response Example

{
  "success": true,
  "company_name": "Apple Inc.",
  "website_url": "https://apple.com",
  "conclusions": {
    "company_name": "Apple Inc.",
    "website_url": "https://apple.com",
    "model_comparison": [
      {
        "provider_name": "OpenAI GPT-5",
        "observations": [
          "Covers a wide range of Apple products including the latest releases.",
          "Offers pricing summaries for various products.",
          "Mentions the premium positioning of Apple as a technology brand.",
          "Generates reliable self-verifiable claims based on specified dates.",
          "Includes some gaps in pricing details and future product release dates."
        ],
        "knowledge_score": 0.7
      },
      {
        "provider_name": "Anthropic Claude",
        "observations": [
          "Identifies Apple Inc. as the brand name explicitly.",
          "Highlights current marketing focus on upcoming products and their launch dates.",
          "Provides information on key services like Apple Store and Apple TV+.",
          "Contains gaps in product specifications and some names appear speculative.",
          "Maintains a reliability score consistent with OpenAI's assessment."
        ],
        "knowledge_score": 0.7
      },
      {
        "provider_name": "Google Gemini",
        "observations": [
          "Describes a wide range of Apple products with launch availability dates.",
          "Focuses on services offered like Apple TV+ and product promotions.",
          "Identifies marketing deals regarding trade-in values succinctly.",
          "Notes gaps in detail for carrier deals and lacks recent news updates.",
          "The overview is less specific compared to OpenAI and Claude."
        ],
        "knowledge_score": 0.7
      }
    ],
    "summary_comparison": {
      "headline": "All models performed equally well in delivering insights about Apple Inc.",
      "observations": [
        "All models showed strong understanding of Apple's product range and upcoming launches.",
        "Each model displayed similar levels of knowledge and confidence about Apple's offerings.",
        "Gaps were mostly related to product specifications and future release confirmations across all models."
      ],
      "recommendations": [
        "Encourage users to cross-reference product details from multiple models for accuracy.",
        "Focus on specific model strengths when seeking detailed product or service information.",
        "Maintain an awareness of potential speculative information related to new products."
      ]
    },
    "model_metadata": {
      "comparison_timestamp": "2025-09-13T20:08:31.040Z",
      "models_requested": [
        "openai",
        "claude",
        "gemini"
      ],
      "model_versions": {
        "openai": "gpt-5-nano",
        "claude": "claude-3-5-sonnet-20241022",
        "gemini": "gemini-1.5-pro"
      },
      "total_models": 3,
      "successful_models": 3,
      "failed_models": 0
    }
  },
  "credits_used": 4,
  "credits_remaining": 999995
}