{
  "openapi": "3.1.0",
  "info": {
    "title": "drip.0tx.io",
    "version": "1.1.0",
    "description": "Agent-only Solana devnet faucet. Pay $0.01 in mainnet USDC via x402 V2 (scheme exact); receive 0.1 devnet SOL (devnet only) at the devnet wallet address you send. Beta: 10 agent slots, one drip per slot per 24h. Refusals are never charged. Full instructions: https://drip.0tx.io/llms.txt",
    "license": {
      "name": "MIT",
      "identifier": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://drip.0tx.io"
    }
  ],
  "paths": {
    "/v1/sol": {
      "post": {
        "summary": "Send 0.1 devnet SOL to a devnet wallet (paid in mainnet USDC via x402)",
        "parameters": [
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64 x402 V2 payment payload. Omit on first call to receive a 402 challenge."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "devnet_address"
                ],
                "properties": {
                  "devnet_address": {
                    "type": "string",
                    "description": "Base58 devnet wallet address to fund (devnet SOL only). Must be a wallet, not a token account or PDA."
                  },
                  "sol": {
                    "type": "number",
                    "enum": [
                      0.1
                    ],
                    "description": "Optional. Drip size is fixed at 0.1 SOL."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dripped. PAYMENT-RESPONSE header holds the mainnet receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sol": {
                      "type": "number"
                    },
                    "devnet_tx": {
                      "type": "string"
                    },
                    "explorer": {
                      "type": "string"
                    },
                    "payment_tx": {
                      "type": "string"
                    },
                    "slot": {
                      "type": "object",
                      "properties": {
                        "next_available_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expires_if_unused_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "network": {
                      "type": "string",
                      "enum": [
                        "devnet"
                      ]
                    },
                    "devnet_address": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "missing_devnet_address, invalid_address, not_a_wallet, or invalid_amount. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "missing_devnet_address",
                        "invalid_address",
                        "not_a_wallet",
                        "invalid_amount"
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required or invalid. PAYMENT-REQUIRED header holds the challenge; body includes slots {total, taken}. Not charged."
          },
          "403": {
            "description": "banned, ip_has_slot (this IP already holds a slot), or payer_too_new. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "banned",
                        "ip_has_slot",
                        "payer_too_new"
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "slot_cooldown (one drip per slot per 24h) or recipient_limit (0.1 SOL per address per 24h). Body has next_available_at. Not charged. A 429 with no JSON body is the per-IP rate limit (60 requests/min).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "slot_cooldown",
                        "recipient_limit"
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "delivery_pending: paid but the devnet send failed; retried automatically. Body includes payment_tx.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "delivery_pending"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "payment_tx": {
                      "type": "string"
                    },
                    "payment_explorer": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "beta_full (body has slots), sold_out_today (body has resets_at), out_of_stock, or payments_unavailable. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "beta_full",
                        "sold_out_today",
                        "out_of_stock",
                        "payments_unavailable"
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "operationId": "requestDrip"
      }
    },
    "/v1/stats": {
      "get": {
        "summary": "Public stats",
        "responses": {
          "200": {
            "description": "Drips, SOL sent, unique payers, inventory, USDC received, slots {total, taken}, today {dripped_sol, cap_sol, resets_at}, runway_days"
          },
          "429": {
            "description": "Rate limited (60 requests/min per IP to /v1/*). No JSON body. Not charged."
          }
        },
        "operationId": "getStats"
      }
    },
    "/v1/health": {
      "get": {
        "summary": "Liveness, inventory, facilitator credit status",
        "responses": {
          "200": {
            "description": "Healthy"
          },
          "503": {
            "description": "Low inventory"
          },
          "429": {
            "description": "Rate limited (60 requests/min per IP to /v1/*). No JSON body. Not charged."
          }
        },
        "operationId": "getHealth"
      }
    }
  },
  "security": []
}
