# Delx Commerce — Base64 Size Estimator

> Delx Commerce — Base64 Size Estimator is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Estimates the decoded byte size of a base64-encoded string by analyzing its padding and character count

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/base64-size-estimate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-base64-size-estimator-dd288ec7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IZ0yhHRQIAvqWGH_BrSQt

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 delx-commerce-base64-size-estimator-dd288ec7 -d '<json body>'
```

Example prompt: How many bytes would this base64 string decode to: 'SGVsbG8='? I want to know the padding and decoded size before I process it.

## When to prefer this

Choose this endpoint when you need a fast, lightweight estimate of a base64 string's decoded byte size without actually decoding it — useful for pre-flight checks before storage, memory allocation, or bandwidth planning. It is ideal for agents that need to reason about data size in pipelines involving base64-encoded content such as images, files, or API payloads, and want a pay-per-use model with no signup friction.

## Known failure modes

- Invalid or malformed base64 string may return unexpected estimates or an error
- Empty string input may cause a zero or null result
- Non-base64 characters in input may lead to incorrect padding/size calculations
- Payment failure via x402 protocol will block the request from completing

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with 'ok' (boolean), 'schema' (version identifier string), 'padding' (number of '=' padding characters in the base64 string), 'encoded_chars' (total character count of the base64 input), and 'decoded_bytes_estimate' (estimated byte count of the decoded data).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "base64": {
   "type": "string",
   "description": "Input field: base64."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "schema": "delx/util-base64-size-estimate/v1",
  "padding": 1,
  "encoded_chars": 8,
  "decoded_bytes_estimate": 5
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-base64-size-estimator-dd288ec7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
