{"uid":"cap_eUksUHRmQt9hRyjSRi2As","slug":"delx-seeded-stratified-split-0341b3cd","name":"Delx Seeded Stratified Split","description":"Seeded Stratified Split: Seeded Stratified Split splits labeled items while preserving per-label proportions from bounded caller-supplied values without an external provider. Call Seeded Stratified Split when an agent needs a reproducible decision that another run can independently replay. Returns the deterministic selection plus seed provenance, population bounds, and the operation-specific outcome for Seeded Stratified Split as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base…","url":"https://api.delx.ai/api/v1/x402/seeded-stratified-split","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"seed":{"type":"string","maxLength":8192,"description":"Seed supplied to Seeded Stratified Split; used only for this bounded calculation and processed in memory without retention."},"labels":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":256,"description":"Labels supplied to Seeded Stratified Split; used only for this bounded calculation and processed in memory without retention."},"test_fraction":{"type":"number","description":"Test Fraction supplied to Seeded Stratified Split; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"test_indices":[0,2],"train_indices":[1,3,4]},"schema":"delx/util-seeded-stratified-split/v1","status":"pass","evidence":{"retained":false,"input_sha256":"08664b0c9a268e7fa50dce77287db1f0a1c365e4d2c6715a151b40ea08b5e4b9","external_calls":0},"operation":"seeded_decision:seeded_stratified_split"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PLIbr43cbJ_Y2wxhes3U7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Splits a labeled dataset into train and test index sets using a reproducible seed and stratified sampling to preserve label distribution.","exampleAgentPrompt":"Split this list of labels ['cat','dog','cat','bird','dog'] into train and test sets using seed 'abc123' with a 0.3 test fraction, keeping the class distribution balanced.","exampleUseCases":[{"title":"Reproducible ML dataset partitioning","prompt":"I have a list of 200 class labels for my image dataset and need to split them into train and test sets with exactly 20% going to test — use seed 'experiment_42' so I can reproduce the split later."},{"title":"Stratified split for imbalanced classes","prompt":"My labels array has a mix of 'fraud' and 'normal' entries — can you split them into train and test with a 0.25 test fraction using seed 'fraud_run_1', making sure both sets reflect the original class proportions?"},{"title":"Cross-validation fold preparation","prompt":"I need to create a reproducible train/test index partition for my sentiment labels ['positive','negative','neutral','positive','positive','negative'] — use seed 'cv_fold_3' and a 0.2 test fraction."}],"resultDescription":"Returns a JSON object containing 'test_indices' and 'train_indices' arrays (integer positions into the original labels array), a status field ('pass'), operation name, and an evidence block confirming no data retention and zero external calls, along with an input SHA-256 hash for auditability.","failureModes":["Invalid test_fraction (must be between 0 and 1 exclusive) causes a validation error","Empty or null labels array returns an error or trivially empty split","test_fraction so large or small that one split receives zero samples may cause an edge-case failure","Labels array exceeding 256 items is rejected by the schema","Malformed seed (exceeding 8192 chars) may be rejected","Network or service unavailability returns a non-200 HTTP response"],"whenToPreferThis":"Use this endpoint when you need a reproducible, stratified train/test split by index — especially when label class balance matters and you want the same partition every time given the same seed. Prefer this over random splits when debugging model pipelines, running ablations, or sharing experiment configurations with teammates. It is lightweight, stateless, and leaves no data on server (evidenced by the retained:false flag), making it safe for sensitive label sets.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:17:30.542Z","isFirstParty":false}