{"uid":"cap_yr5w61B3VnnwzXEnLXEKq","slug":"relaystation-sql-query-engine-7d56c646","name":"Relaystation SQL Query Engine","description":"$0.0005/MB. Query any CSV/JSON/parquet file with full SQL — sandboxed read-only DuckDB, parquet in and out. A serverless query engine for a fraction of a cent. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny","url":"https://api.relaystation.ai/v1/data/sql","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{"to":{"enum":["csv","json","parquet"],"type":"string","description":"csv/json return inline text; parquet is binary (storage-ref output envelope)."},"sql":{"type":"string","minLength":1,"description":"The DuckDB SQL; your file is the table named `input`."},"file":{"type":"object","description":"cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }."},"from":{"enum":["csv","json","ndjson","parquet"],"type":"string"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Na0nWxYSAxC6MqKZnVNIg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes full SQL queries against CSV, JSON, or Parquet files using a sandboxed read-only DuckDB engine, returning results as Parquet","exampleAgentPrompt":"Run this SQL query against my sales data CSV — SELECT region, SUM(revenue) as total FROM data GROUP BY region ORDER BY total DESC — and give me back the results.","exampleUseCases":[{"title":"Aggregate sales data from CSV","prompt":"I have a CSV file of sales transactions at this URL — can you run SQL on it to get the total revenue grouped by product category, sorted descending?"},{"title":"Filter rows from a Parquet dataset","prompt":"Query this parquet file and give me only the rows where status = 'failed' and amount > 1000, using SQL — I need the results back as a table."},{"title":"Join and summarize JSON records","prompt":"I've got a JSON dataset of customer orders — run a SQL query to count orders per customer and return only customers with more than 5 orders."}],"resultDescription":"Returns query results as a Parquet file (or structured tabular data), reflecting the rows and columns produced by the SQL statement executed against the input file. Pricing is $0.0005/MB of data processed, with a 1¢ minimum charge and any remainder auto-credited.","failureModes":["Invalid SQL syntax returns a parse or execution error","File URL unreachable or unsupported format returns an ingestion error","Query exceeds memory or size limits returns a resource error","Write operations (INSERT, UPDATE, DROP) rejected — read-only sandbox","Malformed Parquet or corrupt CSV returns a file parsing error"],"whenToPreferThis":"Choose this endpoint when you need to run arbitrary SQL analytics on flat files (CSV, JSON, Parquet) without spinning up a database. Ideal for agents doing ad-hoc data exploration, filtering, or aggregation on files available by URL. Prefer it over hosted database solutions when the data is file-based, the query is one-off, and cost-per-MB pricing is more economical than a persistent connection.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:40:34.928Z","isFirstParty":false}