{"uid":"cap_JI1lvrU_Vs18ItUJ3lDMS","slug":"relaystation-data-sampler-0f62cf73","name":"RelayStation Data Sampler","description":"$0.0002/MB. Sample rows — n or fraction; random, head, or systematic; reproducible seed. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny","url":"https://api.relaystation.ai/v1/data/sample","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":{"n":{"type":"integer","minimum":0,"description":"Absolute sample size."},"to":{"enum":["csv","tsv","json","ndjson"],"type":"string","description":"A tabular file format: csv, tsv, json (array of objects), or ndjson."},"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","tsv","json","ndjson"],"type":"string","description":"A tabular file format: csv, tsv, json (array of objects), or ndjson."},"seed":{"type":"integer","description":"Reproducible random — same seed + input → identical sample."},"method":{"enum":["random","head","systematic"],"type":"string"},"fraction":{"type":"number","maximum":1,"minimum":0,"description":"Fractional sample size."}}},"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_kFVK3TrNPl9npQ7JkHd1g","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":"Sample rows from a dataset by count or fraction, using random, head, or systematic strategies with a reproducible seed","exampleAgentPrompt":"Take a random sample of 200 rows from my dataset using a seed of 42 so I can reproduce the results later.","exampleUseCases":[{"title":"Reproducible ML training split","prompt":"Sample 20% of my training dataset randomly using seed 99 so the same rows get picked every time I run the pipeline."},{"title":"Quick data preview for analysis","prompt":"Grab the first 100 rows from my dataset so I can inspect what it looks like before running the full analysis."},{"title":"Systematic survey sampling","prompt":"I have a dataset of 10,000 customer records — systematically sample every 50th row to get an evenly spaced subset for a survey."}],"resultDescription":"Returns the sampled rows from the input dataset, selected according to the specified strategy (random, head, or systematic), count or fraction, and optional seed for reproducibility. The response includes only the selected subset of rows.","failureModes":["Invalid or missing dataset input returns an error","Requested sample size larger than dataset returns partial or error","Unsupported sampling strategy name returns validation error","Non-numeric or out-of-range fraction (e.g. >1.0) returns error","Insufficient payment (below 1¢ minimum) blocks the request","Malformed row data or encoding issues may cause parsing errors"],"whenToPreferThis":"Choose this endpoint when you need to quickly reduce a large dataset to a representative or reproducible subset, especially when you need control over sampling strategy (random vs. head vs. systematic) and reproducibility via a seed. Priced per MB at $0.0002 with a 1¢ minimum, it is cost-effective for large datasets. Prefer this over a general-purpose code execution endpoint when you want a managed, low-latency sampling service without setting up infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:51:46.696Z","isFirstParty":false}