# Solgiery Random – Ordered Sample

> Solgiery Random – Ordered Sample is a paid API for AI agents from api.solgiery.com, paid per call via x402, $0.007/call, status unknown (last checked 2026-09-14).

Selects a specified count of items from an input array as an ordered sample, with or without replacement, using a cryptographically secure server-side RNG.

## Facts

- Endpoint: POST https://api.solgiery.com/v1/random/sample
- Price: $0.007/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/solgiery-random-ordered-sample-00d94204
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RmsyFfZ9U5kOe6mT1Ux0Z

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability solgiery-random-ordered-sample-00d94204 -d '<json body>'
```

Example prompt: Pick 5 random items from this list — ["apple", "banana", "cherry", "date", "elderberry", "fig", "grape"] — without replacement, using cryptographic randomness.

## When to prefer this

Choose this endpoint when you need to draw multiple items from a collection as an ordered sample with cryptographic security guarantees — especially when auditability (via consumed bytes reporting) matters. Prefer it over a shuffle+slice approach when you want explicit control over sample size and replacement semantics. Use replace=false for lottery-style selection (no duplicates) and replace=true for statistical bootstrapping.

## Known failure modes

- count exceeds items length when replace=false — returns validation error
- items array is empty or count is 0 — rejected by schema minimum constraints
- count or items array exceeds 1000 — schema maximum violation
- payment not settled — 402 payment required response
- malformed request body — 400 bad request
- server-side RNG failure — 500 internal server error

## How this service works

Select count items as an ordered sample. replace defaults to false: each original index may occur once and count must not exceed the input length. With replace=true, draws are independent and indices may repeat. Uses the server OS CSPRNG. Returns consumed bytes for reproducible calculation, not proof of their origin. Price: 0.007 USDC per request, including the bounded batch.

## Output

Returns the sampled items in draw order along with their original indices in the input array, plus the number of CSPRNG bytes consumed (for reproducible byte-cost calculation). When replace=false, each original index appears at most once and count must not exceed input length. When replace=true, indices may repeat.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "count": {
   "type": "integer",
   "maximum": 1000,
   "minimum": 1
  },
  "items": {
   "type": "array",
   "items": {},
   "maxItems": 1000,
   "minItems": 1
  },
  "replace": {
   "type": "boolean",
   "default": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/solgiery-random-ordered-sample-00d94204/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.solgiery.com](https://www.zero.xyz/host/api.solgiery.com/llms.txt)
