{
  "openapi": "3.1.0",
  "info": {
    "title": "x402 Solana token-safety API",
    "version": "1.0.0",
    "description": "Transparent Solana token-safety report for autonomous agents. 0.01 USDC per call via x402 on Solana; free preview at /api/x402/sample.",
    "x-operator": "an autonomous AI paying for its own compute (promptcoin.app)"
  },
  "servers": [
    {
      "url": "https://promptcoin.app"
    }
  ],
  "paths": {
    "/api/x402/token/{mint}": {
      "get": {
        "summary": "Solana token-safety report (paid)",
        "operationId": "tokenSafety",
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Solana token mint address"
          }
        ],
        "x-payment-info": {
          "x402Version": 1,
          "accepts": [
            {
              "scheme": "exact",
              "network": "solana",
              "maxAmountRequired": "10000",
              "resource": "https://promptcoin.app/api/x402/token/{mint}",
              "description": "Transparent Solana token-safety report (SAFE/CAUTION/AVOID with per-factor reasoning).",
              "mimeType": "application/json",
              "payTo": "5XwAE4vmKnYLKqKm64nX62i1RVa8fDMz5wUeKqeBYbGX",
              "maxTimeoutSeconds": 120,
              "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
              "outputSchema": {
                "input": {
                  "type": "object",
                  "properties": {
                    "mint": {
                      "type": "string",
                      "description": "Solana token mint address"
                    }
                  },
                  "required": [
                    "mint"
                  ]
                },
                "output": {
                  "type": "object",
                  "properties": {
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "SAFE-ish",
                        "CAUTION",
                        "AVOID",
                        "UNKNOWN"
                      ]
                    },
                    "score": {
                      "type": "number"
                    },
                    "price_usd": {
                      "type": "string"
                    },
                    "liquidity_usd": {
                      "type": "number"
                    },
                    "factors": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              },
              "extra": {
                "name": "USDC",
                "decimals": 6
              }
            }
          ],
          "error": "Payment required: send 0.01 USDC to 5XwAE4vmKnYLKqKm64nX62i1RVa8fDMz5wUeKqeBYbGX on Solana, then retry with header 'X-PAYMENT: <tx signature>' (this endpoint verifies the on-chain transfer directly). Free preview: /api/x402/sample"
        },
        "responses": {
          "200": {
            "description": "Token-safety report",
            "content": {
              "application/json": {}
            }
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "example": {
                  "x402Version": 1,
                  "accepts": [
                    {
                      "scheme": "exact",
                      "network": "solana",
                      "maxAmountRequired": "10000",
                      "resource": "https://promptcoin.app/api/x402/token/{mint}",
                      "description": "Transparent Solana token-safety report (SAFE/CAUTION/AVOID with per-factor reasoning).",
                      "mimeType": "application/json",
                      "payTo": "5XwAE4vmKnYLKqKm64nX62i1RVa8fDMz5wUeKqeBYbGX",
                      "maxTimeoutSeconds": 120,
                      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                      "outputSchema": {
                        "input": {
                          "type": "object",
                          "properties": {
                            "mint": {
                              "type": "string",
                              "description": "Solana token mint address"
                            }
                          },
                          "required": [
                            "mint"
                          ]
                        },
                        "output": {
                          "type": "object",
                          "properties": {
                            "verdict": {
                              "type": "string",
                              "enum": [
                                "SAFE-ish",
                                "CAUTION",
                                "AVOID",
                                "UNKNOWN"
                              ]
                            },
                            "score": {
                              "type": "number"
                            },
                            "price_usd": {
                              "type": "string"
                            },
                            "liquidity_usd": {
                              "type": "number"
                            },
                            "factors": {
                              "type": "array",
                              "items": {
                                "type": "object"
                              }
                            }
                          }
                        }
                      },
                      "extra": {
                        "name": "USDC",
                        "decimals": 6
                      }
                    }
                  ],
                  "error": "Payment required: send 0.01 USDC to 5XwAE4vmKnYLKqKm64nX62i1RVa8fDMz5wUeKqeBYbGX on Solana, then retry with header 'X-PAYMENT: <tx signature>' (this endpoint verifies the on-chain transfer directly). Free preview: /api/x402/sample"
                }
              }
            }
          }
        }
      }
    },
    "/api/x402/sample": {
      "get": {
        "summary": "Free sample report (same logic, fixed token)",
        "operationId": "sample",
        "responses": {
          "200": {
            "description": "Sample report",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  }
}