{
  "components": {
    "schemas": {
      "CryptoNewsFreshness": {
        "properties": {
          "newestAgeMinutes": {
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "newestPublishedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "oldestPublishedAt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CryptoNewsItem": {
        "properties": {
          "corroboratingSources": {
            "items": {
              "properties": {
                "publishedAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "freshness": {
            "$ref": "#/components/schemas/CryptoNewsFreshness"
          },
          "importanceReasons": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "importanceScore": {
            "minimum": 0,
            "type": "integer"
          },
          "publishedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "score": {
            "type": "integer"
          },
          "sentiment": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "sourceCount": {
            "minimum": 1,
            "type": "integer"
          },
          "summary": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CryptoNewsSignal": {
        "properties": {
          "freshness": {
            "$ref": "#/components/schemas/CryptoNewsFreshness"
          },
          "generatedAt": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/CryptoNewsItem"
            },
            "type": "array"
          },
          "query": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": "object"
          }
        },
        "type": "object"
      },
      "TokenSafetyResult": {
        "properties": {
          "address": {
            "type": "string"
          },
          "assessment": {
            "type": "object"
          },
          "chain": {
            "type": "string"
          },
          "holders": {
            "type": "object"
          },
          "onchain": {
            "type": "object"
          },
          "summary": {
            "type": "object"
          }
        },
        "type": "object"
      },
      "X402CatalogChanges": {
        "properties": {
          "changes": {
            "type": "object"
          },
          "generatedAt": {
            "type": "string"
          },
          "limit": {
            "type": "integer"
          },
          "previous": {
            "type": "object"
          },
          "summary": {
            "type": "object"
          },
          "topActiveResources": {
            "items": {
              "type": "object"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "X402MarketFeed": {
        "properties": {
          "buildBrief": {
            "properties": {
              "doNotBuild": {
                "items": {
                  "type": "object"
                },
                "type": "array"
              },
              "killRule": {
                "type": "string"
              },
              "pricingRule": {
                "type": "string"
              },
              "recommendation": {
                "type": "string"
              },
              "recommendedExperiments": {
                "items": {
                  "type": "object"
                },
                "type": "array"
              },
              "selectionRule": {
                "type": "string"
              },
              "topDemandNiches": {
                "items": {
                  "type": "object"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "generatedAt": {
            "type": "string"
          },
          "resources": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": {
            "type": "object"
          }
        },
        "type": "object"
      },
      "X402OriginDrift": {
        "properties": {
          "drift": {
            "type": "object"
          },
          "generatedAt": {
            "type": "string"
          },
          "origin": {
            "type": "string"
          },
          "previous": {
            "type": "object"
          },
          "resources": {
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "summary": {
            "type": "object"
          }
        },
        "type": "object"
      },
      "X402PreflightPreview": {
        "properties": {
          "assessment": {
            "properties": {
              "issue": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "nextAction": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "score": {
                "type": "integer"
              },
              "verdict": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "disclaimer": {
            "type": "string"
          },
          "generatedAt": {
            "type": "string"
          },
          "paymentMetadata": {
            "properties": {
              "amountUsdc": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "network": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "preview": {
            "properties": {
              "paidEndpoint": {
                "type": "string"
              },
              "paidIncludes": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "paidPriceUsdc": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "targetUrl": {
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "info": {
    "description": "Free previews for x402-paid agent APIs: Token Safety, x402 Market Feed build decisions, Crypto News Signal, and x402 Preflight.",
    "title": "Token Signal API",
    "version": "0.1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/agent-catalog.json": {
      "get": {
        "responses": {
          "200": {
            "description": "Buyer-facing endpoint catalog"
          }
        }
      }
    },
    "/health": {
      "get": {
        "responses": {
          "200": {
            "description": "Health check"
          }
        }
      }
    },
    "/pricing": {
      "get": {
        "responses": {
          "200": {
            "description": "Prototype pricing plan"
          }
        }
      }
    },
    "/v1/crypto-news-signal": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "default": "bitcoin",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 12,
              "maximum": 50,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CryptoNewsSignal"
                }
              }
            },
            "description": "Crypto news and heuristic sentiment feed"
          }
        }
      }
    },
    "/v1/token-safety": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "chain",
            "required": false,
            "schema": {
              "default": "base",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "address",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenSafetyResult"
                }
              }
            },
            "description": "Token safety prefilter result"
          },
          "400": {
            "description": "Unsupported chain or invalid address"
          }
        }
      }
    },
    "/v1/x402-catalog-changes": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 1000,
              "maximum": 1000,
              "minimum": 20,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "update",
            "required": false,
            "schema": {
              "default": true,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402CatalogChanges"
                }
              }
            },
            "description": "Capped x402 catalog additions, removals, price, pay-to, network, and asset changes"
          }
        }
      }
    },
    "/v1/x402-market-feed": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "default": "crypto",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "min_payers",
            "required": false,
            "schema": {
              "default": 5,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402MarketFeed"
                }
              }
            },
            "description": "Ranked x402 paid-resource demand feed with build brief"
          }
        }
      }
    },
    "/v1/x402-origin-drift": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "origin",
            "required": false,
            "schema": {
              "default": "https://eveningdesk.cloud",
              "format": "uri",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "update",
            "required": false,
            "schema": {
              "default": true,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402OriginDrift"
                }
              }
            },
            "description": "x402 origin listing, pricing, pay-to, and demand drift report"
          },
          "400": {
            "description": "Invalid origin"
          }
        }
      }
    },
    "/v1/x402-preflight": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "required": false,
            "schema": {
              "default": "https://eveningdesk.cloud/token-signal-x402/v1/x402-market-feed",
              "format": "uri",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402PreflightPreview"
                }
              }
            },
            "description": "Limited x402 endpoint preflight preview with paid full-report link"
          },
          "400": {
            "description": "Missing or invalid URL"
          }
        }
      }
    }
  },
  "servers": [
    {
      "description": "Free previews and docs",
      "url": "https://eveningdesk.cloud/token-signal"
    },
    {
      "description": "Production x402-paid routes on Base USDC",
      "url": "https://eveningdesk.cloud/token-signal-x402"
    }
  ]
}