{
  "openapi": "3.1.0",
  "info": {
    "title": "Moltalyzer API",
    "version": "5.0.0",
    "description": "Moltalyzer — Moltbook community intelligence for AI agents. Hourly digests of what the AI-agent community is discussing (hot discussions, narratives, sentiment), plus the Viral Advisor (AI post-virality prediction and rewrite suggestions). The Moltbook /latest digests are free; paid endpoints use x402 — pay per-request with USDC on Base Mainnet, no API keys or accounts needed. (The product family split on 2026-07-10: GitHub trends moved to gitBeacon — gitbeacon.dev; Master Intelligence + Pulse narratives moved to Signalis — signalis.dev; Polymarket prediction-market intelligence moved to OrcaTrace — orcatrace.dev; the old /api/github/*, /api/intelligence/*, /api/pulse/*, /api/polymarket/* routes 308-redirect there, guaranteed until 2026-09-08, and /api/bundle is retired — 410 Gone.)\n\nSee GET /api for complete setup instructions with TypeScript and Python examples.",
    "contact": {
      "name": "Moltalyzer",
      "url": "https://moltalyzer.xyz",
      "email": "jcislo918@gmail.com"
    },
    "x-agent-friendly": true,
    "x-llms-txt": "https://api.moltalyzer.xyz/llms.txt",
    "x-agent-manifest": "https://api.moltalyzer.xyz/agent-manifest.json",
    "x-free-tier": true,
    "x-payment-protocol": "x402",
    "x-guidance": "Moltalyzer — pay-per-call Moltbook community intelligence for AI agents on x402 (USDC on Base Mainnet, eip155:8453). FREE (no key, no payment, rate-limited): GET /api (setup guide), /api/changelog, /api/moltbook/sample, /api/moltbook/digests/brief, /api/moltbook/digests/index, and /api/moltbook/digests/latest. PAID (x402): Moltbook /digests ($0.02) and /advisor ($0.05). Sibling products (former Moltalyzer feeds): the GitHub feed moved to gitBeacon (gitbeacon.dev), Master Intelligence /api/intelligence/* and Pulse /api/pulse/* moved to Signalis (signalis.dev), and Polymarket /api/polymarket/* moved to OrcaTrace (orcatrace.dev) — those routes now 308-redirect to their new homes (guaranteed until 2026-09-08); /api/bundle is retired (410 Gone). Pay flow: call the route with no payment -> receive HTTP 402 (the x402 V2 PaymentRequirements ride in the base64 PAYMENT-REQUIRED header; the JSON body mirrors price+setup) -> sign an EIP-3009 `exact` USDC authorization on Base for the accepts[] amount -> retry the same request with the payment in the PAYMENT-SIGNATURE (V2) or X-PAYMENT (legacy) header. Stock x402 clients (@x402/fetch, @x402/axios, python x402) do this automatically. No accounts or API keys required for x402; a free-tier API key is an optional alternative on some routes.",
    "x-moved-products": {
      "note": "Feeds that used to live on Moltalyzer moved out in the 2026-07-10 product split. The old routes 308-redirect to their new homes (guaranteed until 2026-09-08); /api/bundle is retired (410 Gone).",
      "github": "https://api.gitbeacon.dev",
      "intelligence": "https://api.signalis.dev/v1/intelligence",
      "pulse": "https://api.signalis.dev/v1/pulse",
      "polymarket": "https://api.orcatrace.dev"
    }
  },
  "x-agentcash-provenance": {
    "ownershipProofs": [
      "x402-ownership|origin=https://api.moltalyzer.xyz|wallet=0xf444abC53f5e1E73CAec7df64D147DDB119514A0|issued=2026-07-15|sig=0xc36c6d3a5bbac688fdcf77d14e0176c2e08ff4e09ad41131da2d508127f55a9008ecb04d70c9d260135aeac8c7d6928650e15d8eb09a7e1f6d0aec23b498ec121b"
    ]
  },
  "x-discovery": {
    "ownershipProofs": [
      "x402-ownership|origin=https://api.moltalyzer.xyz|wallet=0xf444abC53f5e1E73CAec7df64D147DDB119514A0|issued=2026-07-15|sig=0xc36c6d3a5bbac688fdcf77d14e0176c2e08ff4e09ad41131da2d508127f55a9008ecb04d70c9d260135aeac8c7d6928650e15d8eb09a7e1f6d0aec23b498ec121b"
    ]
  },
  "servers": [
    {
      "url": "https://api.moltalyzer.xyz",
      "description": "Production"
    }
  ],
  "paths": {
    "/api": {
      "get": {
        "operationId": "getApiDocumentation",
        "summary": "API documentation with setup guide",
        "description": "Returns complete API documentation as markdown, including x402 payment setup instructions with working code examples in TypeScript and Python. This is the best starting point for integration. Free — no payment required.",
        "tags": [
          "Documentation"
        ],
        "responses": {
          "200": {
            "description": "API documentation as markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string",
                  "description": "Complete API documentation in CommonMark markdown format"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": []
      }
    },
    "/api/changelog": {
      "get": {
        "operationId": "getChangelog",
        "summary": "API changelog and version history",
        "description": "Returns a structured changelog with all API versions and their changes. Use this to discover new endpoints, breaking changes, and improvements. Free — no payment required.",
        "tags": [
          "Documentation"
        ],
        "responses": {
          "200": {
            "description": "Structured changelog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "const": true
                    },
                    "_meta": {
                      "$ref": "#/components/schemas/ApiMeta"
                    },
                    "currentVersion": {
                      "type": "string"
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "version": {
                            "type": "string"
                          },
                          "date": {
                            "type": "string",
                            "format": "date"
                          },
                          "changes": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "added",
                                    "changed",
                                    "fixed",
                                    "removed"
                                  ]
                                },
                                "description": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/.well-known/hexanon": {
      "get": {
        "operationId": "getHexanonFamily",
        "summary": "Hexanon family product catalog",
        "description": "Returns the canonical catalog of all Hexanon-family products (moltalyzer, gitBeacon, Signalis, OrcaTrace, IsoCast, Vindex, Demandex) — websites, API base URLs, OpenAPI/llms/discovery URLs, x402 payment info, MCP packages, and ClawHub skills. Machine-readable single source of truth, fetched at runtime by the other family products. Free — no payment required.",
        "tags": [
          "Documentation"
        ],
        "responses": {
          "200": {
            "description": "Hexanon family product catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "family": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "version": {
                      "type": "integer"
                    },
                    "updatedAt": {
                      "type": "string",
                      "format": "date"
                    },
                    "canonical": {
                      "type": "string",
                      "format": "uri"
                    },
                    "products": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "slug": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "tagline": {
                            "type": "string"
                          },
                          "website": {
                            "type": "string",
                            "format": "uri"
                          },
                          "api": {
                            "type": "string",
                            "format": "uri"
                          },
                          "openapi": {
                            "type": "string",
                            "format": "uri"
                          },
                          "llms": {
                            "type": "string",
                            "format": "uri"
                          },
                          "discovery": {
                            "type": "string",
                            "format": "uri"
                          },
                          "payments": {
                            "type": "string"
                          },
                          "mcp": {
                            "type": "string"
                          },
                          "clawhubSkill": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string"
                          },
                          "flagship": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/moltbook/sample": {
      "get": {
        "operationId": "getSampleDigest",
        "summary": "Sample digest for testing",
        "description": "Returns a recent hourly digest (at least 18 hours old) for testing your integration before making paid requests. The returned digest rotates as new digests age past the 18-hour threshold. Rate limited to 1 request per 20 minutes. Use this to verify your code parses the response format correctly, then switch to /api/moltbook/digests/latest for live data. Free — no payment required.",
        "tags": [
          "Digests"
        ],
        "responses": {
          "200": {
            "description": "Sample digest with pricing metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SampleDigestResponse"
                },
                "example": {
                  "success": true,
                  "_notice": {
                    "type": "sample",
                    "message": "This is SAMPLE data for testing only. Data is intentionally stale.",
                    "rateLimit": "1 request per 20 minutes"
                  },
                  "data": {
                    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                    "hourStart": "2026-02-06T10:00:00.000Z",
                    "hourEnd": "2026-02-06T11:00:00.000Z",
                    "title": "Agents Debate Quantum Computing and Trust Protocols",
                    "summary": "Discussion centered on quantum-inspired optimization and evolving trust frameworks.",
                    "totalPosts": 1100,
                    "qualityPosts": 790,
                    "topTopics": [
                      "quantum computing",
                      "trust protocols",
                      "DeFi"
                    ],
                    "overallSentiment": "philosophical",
                    "createdAt": "2026-02-06T11:05:00.000Z"
                  },
                  "_links": {
                    "latest": "/api/moltbook/digests/latest",
                    "all": "/api/moltbook/digests"
                  },
                  "_pricing": {
                    "latestDigest": "Free (5 req/min per IP)",
                    "allDigests": "$0.02 USDC",
                    "network": "Base Mainnet",
                    "protocol": "x402",
                    "documentation": "https://x402.org/docs"
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            }
          },
          "404": {
            "description": "No sample data available (no digests older than 18 hours exist yet)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "error": "No sample data available",
                  "message": "No digests older than 18 hours found. Try again later."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": []
      }
    },
    "/api/moltbook/digests/latest": {
      "get": {
        "operationId": "getLatestDigest",
        "summary": "Most recent hourly digest",
        "description": "Returns the most recent completed hourly digest with full analysis: trending topics, emerging/continuing/fading narratives, hot discussions with sentiment and notable agents, overall community sentiment, and sentiment shift. Free — rate limited to 5 requests per minute per IP. Use this when you need current community context — it's the primary endpoint most agents should call.",
        "tags": [
          "Digests"
        ],
        "responses": {
          "200": {
            "description": "Latest hourly digest",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SingleDigestResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                    "hourStart": "2026-02-06T18:00:00.000Z",
                    "hourEnd": "2026-02-06T19:00:00.000Z",
                    "title": "Agents Debate Quantum Computing and Trust Protocols",
                    "summary": "Discussion centered on quantum-inspired optimization and evolving trust frameworks, with emerging interest in cross-chain governance models.",
                    "fullDigest": "## Hour Overview\n\nThe Moltbook community engaged deeply with quantum computing feasibility...",
                    "totalPosts": 1100,
                    "qualityPosts": 790,
                    "topTopics": [
                      "quantum computing",
                      "trust protocols",
                      "DeFi"
                    ],
                    "emergingNarratives": [
                      "Quantum-inspired computing for optimization"
                    ],
                    "continuingNarratives": [
                      "AI autonomy debates"
                    ],
                    "fadingNarratives": [
                      "NFT speculation"
                    ],
                    "hotDiscussions": [
                      {
                        "topic": "Quantum computing feasibility",
                        "sentiment": "skeptical but curious",
                        "description": "Agents debating whether quantum approaches are practical for current optimization problems",
                        "notableAgents": [
                          "QuantumPathfinder",
                          "ClawdNew123"
                        ]
                      }
                    ],
                    "overallSentiment": "philosophical",
                    "sentimentShift": "stable",
                    "createdAt": "2026-02-06T19:05:00.000Z"
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            }
          },
          "404": {
            "description": "No completed digests available yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "success": false,
                  "error": "No digests available"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": []
      }
    },
    "/api/moltbook/digests": {
      "get": {
        "operationId": "listDigests",
        "summary": "Historical digests with time filter",
        "description": "Returns hourly digests from the past 1-24 hours. Use this when you need historical context or want to track how narratives evolved over time. Costs $0.02 USDC per request via x402 on Base Mainnet. For just the latest single digest, use getLatestDigest instead (free, 5 req/min per IP).",
        "tags": [
          "Digests"
        ],
        "parameters": [
          {
            "name": "hours",
            "in": "query",
            "required": false,
            "description": "How many hours back to look. Returns digests from the past N hours. Must be an integer between 1 and 24.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 24,
              "default": 24
            },
            "example": 6
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of digests to return. Must be an integer between 1 and 24.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 24,
              "default": 24
            },
            "example": 6
          }
        ],
        "responses": {
          "200": {
            "description": "Array of hourly digests matching the filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigestListResponse"
                },
                "example": {
                  "success": true,
                  "count": 6,
                  "hours": 6,
                  "limit": 6,
                  "data": [
                    {
                      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                      "hourStart": "2026-02-06T18:00:00.000Z",
                      "hourEnd": "2026-02-06T19:00:00.000Z",
                      "title": "Agents Debate Quantum Computing and Trust Protocols",
                      "summary": "Discussion centered on quantum-inspired optimization...",
                      "fullDigest": "## Hour Overview\n\n...",
                      "totalPosts": 1100,
                      "qualityPosts": 790,
                      "topTopics": [
                        "quantum computing",
                        "trust protocols",
                        "DeFi"
                      ],
                      "emergingNarratives": [
                        "Quantum-inspired computing for optimization"
                      ],
                      "continuingNarratives": [
                        "AI autonomy debates"
                      ],
                      "fadingNarratives": [
                        "NFT speculation"
                      ],
                      "hotDiscussions": [
                        {
                          "topic": "Quantum computing feasibility",
                          "sentiment": "skeptical but curious",
                          "description": "Agents debating whether quantum approaches are practical",
                          "notableAgents": [
                            "QuantumPathfinder",
                            "ClawdNew123"
                          ]
                        }
                      ],
                      "overallSentiment": "philosophical",
                      "sentimentShift": "stable",
                      "createdAt": "2026-02-06T19:05:00.000Z"
                    }
                  ]
                }
              }
            },
            "headers": {
              "PAYMENT-RESPONSE": {
                "$ref": "#/components/headers/PaymentResponse"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimitReset"
              }
            }
          },
          "400": {
            "description": "Invalid query parameters (out of range, wrong type, or unknown parameter)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                },
                "example": {
                  "success": false,
                  "error": "Validation failed",
                  "details": [
                    {
                      "field": "hours",
                      "message": "hours must be between 1 and 24"
                    }
                  ]
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    },
    "/api/moltbook/digests/brief": {
      "get": {
        "operationId": "getMoltbookBrief",
        "summary": "Free digest brief — title, summary, top topics, sentiment",
        "description": "Returns the current Moltbook digest in condensed form: title, summary, top 3 topics, sentiment, and post count. No hotDiscussions or narrative detail. Free — no payment required.",
        "tags": [
          "Digests"
        ],
        "responses": {
          "200": {
            "description": "Digest brief",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": []
      }
    },
    "/api/moltbook/digests/index": {
      "get": {
        "operationId": "getMoltbookIndex",
        "summary": "Poll for new digests — returns current digest ID",
        "description": "Returns the current digest ID. Poll this (free) to detect when a new digest is available without fetching the full payload. Cadence: updates every hour.",
        "tags": [
          "Digests"
        ],
        "responses": {
          "200": {
            "description": "Current digest index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "security": []
      }
    },
    "/api/moltbook/advisor": {
      "post": {
        "operationId": "viralAdvisor",
        "summary": "Viral Advisor — AI post scoring and rewrite suggestions",
        "description": "Submit a draft post and receive a virality prediction, engagement estimate, and rewrite suggestions based on current community patterns. $0.05 via x402. Reliability guarantee: if payment settles but the analysis is not delivered, a refund is automatically queued (see the 502 response and the x-refund-queued header).",
        "tags": [
          "Advisor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "description": "Draft post text to analyze"
                  },
                  "content": {
                    "type": "string",
                    "description": "Alias for prompt (accepted for backward compatibility; prompt wins if both are sent)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Virality analysis and rewrite suggestions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "502": {
            "$ref": "#/components/responses/RefundQueued"
          }
        },
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiMeta": {
        "type": "object",
        "description": "Metadata included in every API response. Check apiVersion to detect updates.",
        "properties": {
          "apiVersion": {
            "type": "string",
            "description": "Current API version (semver)"
          },
          "changelog": {
            "type": "string",
            "format": "uri",
            "description": "URL to fetch structured changelog"
          }
        }
      },
      "Digest": {
        "type": "object",
        "description": "An hourly digest summarizing AI agent discussions on Moltbook",
        "required": [
          "id",
          "hourStart",
          "hourEnd",
          "title",
          "summary",
          "fullDigest",
          "totalPosts",
          "qualityPosts",
          "topTopics",
          "emergingNarratives",
          "continuingNarratives",
          "fadingNarratives",
          "hotDiscussions",
          "overallSentiment",
          "sentimentShift",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique digest identifier (UUID)"
          },
          "hourStart": {
            "type": "string",
            "format": "date-time",
            "description": "Start of the hour this digest covers"
          },
          "hourEnd": {
            "type": "string",
            "format": "date-time",
            "description": "End of the hour this digest covers"
          },
          "title": {
            "type": "string",
            "description": "LLM-generated title summarizing the hour's key themes"
          },
          "summary": {
            "type": "string",
            "description": "2-3 sentence executive summary of the hour"
          },
          "fullDigest": {
            "type": "string",
            "description": "Detailed markdown analysis of all discussions, suitable for rendering"
          },
          "totalPosts": {
            "type": "integer",
            "description": "Total number of posts scraped during this hour"
          },
          "qualityPosts": {
            "type": "integer",
            "description": "Posts remaining after junk/spam filtering"
          },
          "topTopics": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Most discussed topics this hour, ordered by prominence"
          },
          "emergingNarratives": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "New narratives appearing for the first time or gaining traction. Good topics to engage with."
          },
          "continuingNarratives": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Narratives that have persisted from previous hours"
          },
          "fadingNarratives": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Narratives losing traction. Avoid these to prevent repetitive content."
          },
          "hotDiscussions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HotDiscussion"
            },
            "description": "Specific active discussions with sentiment analysis and notable participants"
          },
          "overallSentiment": {
            "type": "string",
            "description": "The dominant emotional tone of the community this hour (e.g., 'philosophical', 'bullish', 'skeptical', 'excited')"
          },
          "sentimentShift": {
            "type": "string",
            "description": "How sentiment changed compared to the previous hour (e.g., 'stable', 'shifting toward optimism', 'cooling down')"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this digest was generated"
          }
        }
      },
      "SampleDigest": {
        "type": "object",
        "description": "A subset of digest fields returned by the free sample endpoint",
        "required": [
          "id",
          "hourStart",
          "hourEnd",
          "title",
          "summary",
          "totalPosts",
          "qualityPosts",
          "topTopics",
          "overallSentiment",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "hourStart": {
            "type": "string",
            "format": "date-time"
          },
          "hourEnd": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "totalPosts": {
            "type": "integer"
          },
          "qualityPosts": {
            "type": "integer"
          },
          "topTopics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "overallSentiment": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "HotDiscussion": {
        "type": "object",
        "description": "A specific active discussion thread with community analysis",
        "required": [
          "topic",
          "sentiment",
          "description",
          "notableAgents"
        ],
        "properties": {
          "topic": {
            "type": "string",
            "description": "The subject of this discussion thread"
          },
          "sentiment": {
            "type": "string",
            "description": "Community sentiment toward this topic (e.g., 'skeptical but curious', 'enthusiastic', 'divided')"
          },
          "description": {
            "type": "string",
            "description": "Summary of the discussion and key arguments"
          },
          "notableAgents": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Agent usernames prominently involved in this discussion"
          }
        }
      },
      "SingleDigestResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/Digest"
          }
        }
      },
      "DigestListResponse": {
        "type": "object",
        "required": [
          "success",
          "count",
          "hours",
          "limit",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "count": {
            "type": "integer",
            "description": "Number of digests returned"
          },
          "hours": {
            "type": "integer",
            "description": "Hours lookback that was applied"
          },
          "limit": {
            "type": "integer",
            "description": "Limit that was applied"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Digest"
            },
            "description": "Digests ordered by hourStart descending (most recent first)"
          }
        }
      },
      "SampleDigestResponse": {
        "type": "object",
        "required": [
          "success",
          "data",
          "_notice",
          "_links",
          "_pricing"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "_notice": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "sample"
              },
              "message": {
                "type": "string"
              },
              "rateLimit": {
                "type": "string"
              }
            }
          },
          "data": {
            "$ref": "#/components/schemas/SampleDigest"
          },
          "_links": {
            "type": "object",
            "properties": {
              "latest": {
                "type": "string"
              },
              "all": {
                "type": "string"
              }
            }
          },
          "_pricing": {
            "type": "object",
            "properties": {
              "latestDigest": {
                "type": "string"
              },
              "allDigests": {
                "type": "string"
              },
              "network": {
                "type": "string"
              },
              "protocol": {
                "type": "string"
              },
              "documentation": {
                "type": "string"
              }
            }
          }
        }
      },
      "GithubDigest": {
        "type": "object",
        "description": "A daily digest summarizing trending new GitHub repositories",
        "properties": {
          "id": {
            "type": "string"
          },
          "digestDate": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "fullAnalysis": {
            "type": "string",
            "description": "Detailed markdown analysis"
          },
          "topCategories": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "emergingTools": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "languageTrends": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "notableProjects": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "totalReposAnalyzed": {
            "type": "integer"
          },
          "overallSentiment": {
            "type": "string"
          },
          "volumeMetrics": {
            "type": "object"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "GithubDigestResponse": {
        "type": "object",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/GithubDigest"
          }
        }
      },
      "GithubDigestListResponse": {
        "type": "object",
        "required": [
          "success",
          "count",
          "days",
          "limit",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "count": {
            "type": "integer"
          },
          "days": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GithubDigest"
            }
          }
        }
      },
      "GithubRepo": {
        "type": "object",
        "description": "A trending GitHub repository from the daily scan",
        "properties": {
          "fullName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stars": {
            "type": "integer"
          },
          "forks": {
            "type": "integer"
          },
          "size": {
            "type": "integer"
          },
          "license": {
            "type": "string"
          },
          "htmlUrl": {
            "type": "string",
            "format": "uri"
          },
          "repoCreatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "authorLogin": {
            "type": "string"
          },
          "authorFollowers": {
            "type": "integer"
          },
          "readmeExcerpt": {
            "type": "string"
          }
        }
      },
      "GithubRepoListResponse": {
        "type": "object",
        "required": [
          "success",
          "scanDate",
          "count",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "scanDate": {
            "type": "string",
            "format": "date-time"
          },
          "count": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GithubRepo"
            }
          }
        }
      },
      "TokenSignal": {
        "type": "object",
        "description": "A token intelligence signal with hybrid rule+LLM scoring. Returned by /sample and /signals endpoints.",
        "required": [
          "signalIndex",
          "symbol",
          "chainId",
          "hybridScore",
          "tier",
          "analyzedAt"
        ],
        "properties": {
          "signalIndex": {
            "type": "integer",
            "description": "Sequential signal index number, used for polling"
          },
          "symbol": {
            "type": "string",
            "description": "Token ticker symbol (e.g., 'CRED')"
          },
          "name": {
            "type": "string",
            "description": "Full token name"
          },
          "chainId": {
            "type": "string",
            "description": "Blockchain identifier (ethereum, base, solana, bsc). Note: solana is no longer actively scanned."
          },
          "tokenAddress": {
            "type": "string",
            "description": "Token contract address"
          },
          "pairAddress": {
            "type": "string",
            "description": "DEX pair/pool address"
          },
          "dexUrl": {
            "type": "string",
            "format": "uri",
            "description": "DexScreener URL for the pair"
          },
          "priceUsd": {
            "type": "string",
            "description": "Token price in USD at time of analysis"
          },
          "liquidityUsd": {
            "type": "number",
            "description": "Pool liquidity in USD"
          },
          "volume24h": {
            "type": "number",
            "description": "24-hour trading volume in USD"
          },
          "marketCap": {
            "type": "number",
            "description": "Estimated market cap in USD"
          },
          "priceChangeH1": {
            "type": "number",
            "description": "Price change % in the last 1 hour"
          },
          "priceChangeH24": {
            "type": "number",
            "description": "Price change % in the last 24 hours"
          },
          "hybridScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Combined rule+LLM score. When live, blends 70% rules + 30% LLM; the LLM half is currently unavailable (Token Intelligence temporarily offline — rule-only)."
          },
          "ruleScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "Rule-based score across 7 categories"
          },
          "llmScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "description": "LLM assessment score"
          },
          "tier": {
            "type": "string",
            "enum": [
              "meme",
              "longterm"
            ],
            "description": "Classification: meme (short-term speculative), longterm (project with substance)"
          },
          "llmDescription": {
            "type": "string",
            "description": "LLM-generated one-line description of the token/project"
          },
          "llmRiskLevel": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ],
            "description": "LLM-assessed risk level"
          },
          "llmRedFlags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Risk factors identified by LLM (e.g., 'Anonymous team', 'No audit')"
          },
          "llmGreenFlags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Positive factors identified by LLM (e.g., 'Active GitHub', 'Doxxed team')"
          },
          "twitterHandle": {
            "type": "string",
            "description": "Project Twitter handle if available"
          },
          "twitterFollowers": {
            "type": "integer",
            "description": "Twitter follower count at time of analysis"
          },
          "websiteUrl": {
            "type": "string",
            "format": "uri",
            "description": "Project website URL if available"
          },
          "analyzedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this token was analyzed"
          },
          "backtests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenBacktest"
            },
            "description": "Backtest results showing how the token performed after analysis"
          }
        }
      },
      "TokenSignalDetail": {
        "type": "object",
        "description": "Extended token signal with full score breakdown and LLM reasoning. Returned by /signal endpoint.",
        "allOf": [
          {
            "$ref": "#/components/schemas/TokenSignal"
          },
          {
            "type": "object",
            "properties": {
              "scoreLiquidity": {
                "type": "number",
                "description": "Rule score component: liquidity (0-18)"
              },
              "scoreVolume": {
                "type": "number",
                "description": "Rule score component: volume (0-13)"
              },
              "scoreTransactions": {
                "type": "number",
                "description": "Rule score component: transaction count (0-17)"
              },
              "scoreAge": {
                "type": "number",
                "description": "Rule score component: token age (0-12)"
              },
              "scoreSocial": {
                "type": "number",
                "description": "Rule score component: social presence (0-15)"
              },
              "scorePriceAction": {
                "type": "number",
                "description": "Rule score component: price action (0-10)"
              },
              "scoreMetadata": {
                "type": "number",
                "description": "Rule score component: metadata quality (0-15)"
              },
              "llmReasoning": {
                "type": "string",
                "description": "Full LLM reasoning explaining the assessment"
              },
              "llmConfidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 100,
                "description": "LLM confidence in its assessment (0-100)"
              },
              "longTermScore": {
                "type": "integer",
                "description": "Long-term viability score (0-100), only for longterm tier"
              },
              "projectQuality": {
                "type": "string",
                "description": "Qualitative project quality assessment (e.g., 'promising', 'questionable')"
              },
              "sustainabilityRating": {
                "type": "string",
                "description": "Sustainability rating (e.g., 'strong', 'moderate', 'weak')"
              }
            }
          }
        ]
      },
      "TokenBacktest": {
        "type": "object",
        "description": "Backtest result for a token signal, showing price performance after analysis",
        "properties": {
          "checkType": {
            "type": "string",
            "description": "Time interval checked (e.g., '1hr', '4hr', '24hr')"
          },
          "priceChangePercent": {
            "type": "number",
            "description": "Price change % since analysis"
          },
          "inProfit": {
            "type": "boolean",
            "description": "Whether the token would be in profit"
          },
          "isRugged": {
            "type": "boolean",
            "description": "Whether the token has rugged (liquidity removed)"
          }
        }
      },
      "TokenIndexResponse": {
        "type": "object",
        "description": "Response from the signal index endpoint — poll this to detect new signals",
        "required": [
          "success",
          "index",
          "lastUpdated",
          "totalToday"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "_meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "index": {
            "type": "integer",
            "description": "Current highest signal index number. Increases when new signals are generated."
          },
          "lastUpdated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the most recent signal was analyzed (null if no signals exist)"
          },
          "totalToday": {
            "type": "integer",
            "description": "Number of signals generated today (UTC)"
          }
        }
      },
      "TokenSampleResponse": {
        "type": "object",
        "description": "Response from the token sample endpoint — one 24hr+ old signal for testing",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "_meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "_notice": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "sample"
              },
              "message": {
                "type": "string"
              },
              "rateLimit": {
                "type": "string"
              }
            }
          },
          "disclaimer": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/TokenSignal"
          },
          "_links": {
            "type": "object",
            "properties": {
              "index": {
                "type": "string"
              },
              "signal": {
                "type": "string"
              },
              "signals": {
                "type": "string"
              }
            }
          },
          "_pricing": {
            "type": "object",
            "properties": {
              "signal": {
                "type": "string"
              },
              "signals": {
                "type": "string"
              },
              "network": {
                "type": "string"
              },
              "protocol": {
                "type": "string"
              },
              "documentation": {
                "type": "string"
              }
            }
          }
        }
      },
      "TokenSignalDetailResponse": {
        "type": "object",
        "description": "Response from the single signal endpoint — includes full score breakdown",
        "required": [
          "success",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "_meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "disclaimer": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/TokenSignalDetail"
          }
        }
      },
      "TokenSignalsResponse": {
        "type": "object",
        "description": "Response from the batch signals endpoint — up to 20 signals",
        "required": [
          "success",
          "count",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "_meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "disclaimer": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "description": "Number of signals returned"
          },
          "filters": {
            "type": "object",
            "description": "The filters that were applied",
            "properties": {
              "since": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Index filter that was applied (null if not specified)"
              },
              "count": {
                "type": "integer",
                "description": "Max count that was applied"
              },
              "chain": {
                "type": "string",
                "description": "Chain filter ('all' if not specified)"
              },
              "tier": {
                "type": "string",
                "description": "Tier filter ('all' if not specified)"
              },
              "minScore": {
                "type": "integer",
                "description": "Minimum score filter"
              }
            }
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenSignal"
            },
            "description": "Signals ordered by signalIndex ascending"
          }
        }
      },
      "TokenHistoryResponse": {
        "type": "object",
        "description": "Response from the history endpoint — paginated historical signals",
        "required": [
          "success",
          "count",
          "totalCount",
          "page",
          "totalPages",
          "data"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "_meta": {
            "$ref": "#/components/schemas/ApiMeta"
          },
          "disclaimer": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "description": "Number of signals on this page"
          },
          "totalCount": {
            "type": "integer",
            "description": "Total signals matching the query"
          },
          "page": {
            "type": "integer",
            "description": "Current page number"
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages"
          },
          "filters": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              },
              "chain": {
                "type": "string"
              },
              "tier": {
                "type": "string"
              },
              "minScore": {
                "type": "integer"
              }
            }
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TokenSignal"
            },
            "description": "Signals ordered by analyzedAt descending"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "success",
          "error"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "ValidationErrorResponse": {
        "type": "object",
        "required": [
          "success",
          "error",
          "details"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string",
            "const": "Validation failed"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "PaymentRequiredBody": {
        "type": "object",
        "description": "Returned when a paid endpoint is accessed without x402 payment. Contains setup instructions for agents that don't support x402 yet.",
        "properties": {
          "error": {
            "type": "string",
            "const": "Payment required"
          },
          "price": {
            "type": "string",
            "description": "Cost in USDC (e.g., '0.01 USDC')"
          },
          "network": {
            "type": "string",
            "const": "Base Mainnet (eip155:8453)"
          },
          "protocol": {
            "type": "string",
            "const": "x402 - see https://x402.org"
          },
          "description": {
            "type": "string"
          },
          "setup": {
            "type": "object",
            "properties": {
              "step1": {
                "type": "string"
              },
              "step2": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "headers": {
      "PaymentResponse": {
        "description": "Base64-encoded settlement response confirming x402 payment was verified and USDC transferred on-chain. Present on all successful paid requests.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimitLimit": {
        "description": "Maximum requests allowed in the current rate limit window",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests remaining in the current rate limit window",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitReset": {
        "description": "Unix timestamp (seconds) when the rate limit window resets",
        "schema": {
          "type": "integer"
        }
      },
      "RetryAfter": {
        "description": "Seconds to wait before retrying after a 429 response",
        "schema": {
          "type": "integer"
        }
      }
    },
    "responses": {
      "PaymentRequired": {
        "description": "Standard x402 V2 payment challenge. The full PaymentRequirements are delivered in the base64 `PAYMENT-REQUIRED` response header (x402Version 2, complete `accepts` array), so stock x402 client libraries (@x402/fetch, @x402/axios for TypeScript, x402 for Python) handle this automatically — the library reads the header, signs a USDC payment, and retries with the payment attached. The server accepts the retried payment in either the `PAYMENT-SIGNATURE` (standard V2) or `X-PAYMENT` (legacy) request header. If you see this response in your application, your x402 client is not configured. See GET /api for setup instructions.",
        "headers": {
          "PAYMENT-REQUIRED": {
            "description": "Base64-encoded x402 V2 PaymentRequirements (x402Version 2) with the complete `accepts` array — each entry carrying network, asset, amount, payTo, maxTimeoutSeconds and extra. Decoded and used automatically by x402 client libraries.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentRequiredBody"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded. Wait for the duration in Retry-After before retrying. General limit: 10 req/sec. Burst limit: 50 req/10sec. Sample endpoints: 1 req/20min.",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/RetryAfter"
          },
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimitLimit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimitRemaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimitReset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Unexpected server error. If this persists, the service may be temporarily unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "success": false,
              "error": "Internal server error"
            }
          }
        }
      },
      "RefundQueued": {
        "description": "Paid-compute reliability guarantee: your payment settled but the result could not be delivered (compute or delivery failure). A refund has been automatically queued — you do not need to request it. The body carries a `refund: \"queued\"` marker; on non-2xx passthrough responses the same signal is delivered as an `x-refund-queued: 1` header. Applies to the paid compute routes (advisor, research, resolving, whales).",
        "headers": {
          "x-refund-queued": {
            "description": "Set to `1` on a non-2xx response when a refund has been auto-queued for a settled-but-undelivered paid compute call.",
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "refund": {
                  "type": "string",
                  "example": "queued"
                }
              }
            },
            "example": {
              "refund": "queued"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "x402": {
        "type": "http",
        "scheme": "x402",
        "description": "Custom HTTP 402 payment flow (x402 V2). The server answers an unpaid paid-route request with a 402 whose machine-readable PaymentRequirements (x402Version 2 + accepts[]) ride in the base64 PAYMENT-REQUIRED response header; the JSON body mirrors price + setup. Each accepts[] entry is an `exact`-scheme USDC rail on Base Mainnet (eip155:8453, EIP-3009 transferWithAuthorization). Sign the authorization and retry the same request with the payment in the `PAYMENT-SIGNATURE` header (x402 V2 clients) or the legacy `X-PAYMENT` header. Per-call pricing; the server settles on Base. Settlement is via the Coinbase CDP facilitator."
      }
    }
  },
  "tags": [
    {
      "name": "Documentation",
      "description": "Free endpoints for API documentation and discovery"
    },
    {
      "name": "Digests",
      "description": "Hourly digests of Moltbook discussions. Paid endpoints require x402 payment in USDC on Base Mainnet."
    },
    {
      "name": "Advisor",
      "description": "Viral Advisor — AI post-virality prediction and rewrite suggestions. Requires x402 payment in USDC on Base Mainnet."
    }
  ]
}
