{
  "openapi": "3.1.0",
  "info": {
    "title": "AgentIntel \u2014 LLM Intelligence for AI Agents",
    "version": "1.0.0",
    "description": "x402-powered LLM provider intelligence API. Get recommendations, capability data, and status for AI agent routing decisions. Pay per query in USDC on Base mainnet.",
    "contact": {
      "url": "https://intel.memoryapi.org"
    }
  },
  "servers": [
    {
      "url": "https://intel.memoryapi.org"
    }
  ],
  "paths": {
    "/x402/intel/providers": {
      "get": {
        "summary": "List and filter LLM providers",
        "description": "Returns agent-optimized LLM provider data including pricing, capabilities, agent scores, and use-case recommendations. Filter by tool calling, context size, price, x402 support.",
        "parameters": [
          {
            "name": "tool_calling",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "Only providers with tool calling support"
          },
          {
            "name": "x402",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "description": "Only x402-native providers"
          },
          {
            "name": "min_context",
            "in": "query",
            "schema": {
              "type": "integer",
              "example": 32000
            },
            "description": "Minimum context window (tokens)"
          },
          {
            "name": "max_price",
            "in": "query",
            "schema": {
              "type": "number",
              "example": 1.0
            },
            "description": "Max input price per million tokens (USD)"
          },
          {
            "name": "best_for",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "tool_calling"
            },
            "description": "Filter by use case: tool_calling, reasoning, cost, speed, long_context, rag"
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered provider list with agent-specific metrics"
          },
          "402": {
            "description": "x402 payment required"
          }
        },
        "x-price": "$0.001 USDC"
      }
    },
    "/x402/intel/recommend": {
      "get": {
        "summary": "Get LLM recommendation for your agent task",
        "description": "Returns top 3 ranked provider recommendations for a specific task type and priority. Scoring weights are task-specific.",
        "parameters": [
          {
            "name": "task",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "tool_calling",
              "enum": [
                "tool_calling",
                "reasoning",
                "rag",
                "summarization",
                "high_volume",
                "low_latency",
                "general"
              ]
            },
            "description": "Agent task type"
          },
          {
            "name": "priority",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "quality",
              "enum": [
                "balanced",
                "cost",
                "speed",
                "quality"
              ]
            },
            "description": "Optimization priority"
          },
          {
            "name": "min_context",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Minimum context window needed"
          },
          {
            "name": "max_input_price",
            "in": "query",
            "schema": {
              "type": "number"
            },
            "description": "Budget ceiling per million tokens"
          },
          {
            "name": "require_tool_calling",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          },
          {
            "name": "require_x402",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top 3 ranked provider recommendations with reasoning"
          },
          "402": {
            "description": "x402 payment required"
          }
        },
        "x-price": "$0.001 USDC"
      }
    },
    "/x402/intel/status": {
      "get": {
        "summary": "Check LLM provider status",
        "description": "Current operational status, recent latency, and uptime data for providers.",
        "parameters": [
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "openai-gpt4o"
            },
            "description": "Optional: specific provider slug. Omit for all."
          }
        ],
        "responses": {
          "200": {
            "description": "Provider status with latency and uptime data"
          },
          "402": {
            "description": "x402 payment required"
          }
        },
        "x-price": "$0.001 USDC"
      }
    }
  }
}