Search projects, hackathons, sponsors and tech

    ← All projects

    Sprue

    Sprue turns plain-text logic into persistent, cross-chain APIs from multiple Subgraphs and sell it

    Demo

    About

    Sprue is an AI-powered platform for turning natural-language data requests into deployable and monetizable APIs. A user describes the data product they need, and Sprue discovers relevant Subgraphs, analyzes their schemas and pre-built aggregations, selects the appropriate entities and fields, and generates an inspectable structured DAG. Filters and sorting operations can be pushed down into GraphQL so that only the required data is fetched from The Graph. Before deployment, Sprue compiles and validates the DAG for cycles, schema mismatches, invalid operators, and source compatibility. A successful build produces an immutable executable version that queries The Graph in real time whenever the API is called. Creators can deploy a private API protected by a Sprue API key or publish an x402 endpoint on Hedera, allowing consumers to pay in HBAR and receive the API response automatically. Sprue also provides deployment controls, request testing, revenue statistics, transaction records, private deployment exports, and an hx402 CLI for calling and paying for compatible endpoints.

    How it's made

    Sprue is built primarily in TypeScript. The frontend uses React 19, Vite, React Flow, Phosphor Icons, and Privy authentication. The backend runs on Node.js 24 with Express 5, PostgreSQL, Drizzle ORM, Redis, GraphQL, and Zod. Docker Compose connects the frontend, API, background worker, PostgreSQL, and Redis services, while Nginx serves the production frontend. The Agent first inspects The Graph Subgraph schemas and available pre-built aggregate entities. Embeddings rank semantically relevant aggregates and entities before an OpenAI-compatible language model selects the best data sources, fields, and operators. Sprue then produces a typed, inspectable DAG. Compatible filters and sorting operations are pushed into GraphQL to reduce unnecessary source reads, while the remaining transformations stay visible in the workflow. Our compiler validates node versions, typed ports, schemas, output contracts, reachability, and cycles before creating an immutable executable version and specification hash. The generic runtime can execute any valid compiled DAG, so deploying another API requires configuration rather than writing a new endpoint. Every request performs fresh, bounded queries against The Graph instead of reusing cached result rows. Privy provides creator wallet authentication and transaction confirmation. Hedera testnet and Blocky402 are used to publish HBAR-priced x402 endpoints: clients receive an HTTP 402 payment challenge, submit a signed Hedera payment, and receive the protected API response after verification and settlement. We also built a standalone hx402-cli using the official x402 Hedera packages. It can create or import an encrypted wallet, obtain testnet funds, inspect payment requirements, enforce spending limits, pay compatible endpoints, and print their responses. The most notable technical decision was separating API execution from individual endpoint code. Sprue treats each product as an immutable compiled DAG plus deployment configuration, allowing the same execution engine to serve private API-key endpoints, paid x402 endpoints, and self-hosted exports.