# XRD Bragg Spacing Calculator

> XRD Bragg Spacing Calculator is a paid API for AI agents from www.mahastrategies.com, paid per call via x402, $0.085/call, status unknown (last checked 2026-10-17).

Calculates first-order Bragg d-spacings from supplied two-theta peak positions and X-ray wavelength, returning explicit units without lattice indexing or phase identification.

## Facts

- Endpoint: POST https://www.mahastrategies.com/api/v1/micro/materials-xrd-peak-analysis?utm_source=zero.xyz
- Price: $0.085/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/xrd-bragg-spacing-calculator-f2cf8116
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uWWkTzBd5tDb94ET73zFy

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 xrd-bragg-spacing-calculator-f2cf8116 -d '<json body>'
```

Example prompt: I have XRD peaks at 25.3, 37.8, and 48.0 degrees two-theta measured with Cu Kα radiation at 1.5406 Angstroms — can you calculate the first-order Bragg d-spacings for each of those peaks? The data is public.

## When to prefer this

Choose this endpoint when you need a fast, deterministic first-order Bragg d-spacing calculation from raw two-theta peak positions and a known wavelength, and you do not need lattice indexing, phase matching, or crystal structure identification. Ideal for preprocessing XRD data before more advanced analysis, verifying manual Bragg calculations, or automating routine peak-to-d-spacing conversion in a materials characterization pipeline.

## Known failure modes

- Missing required fields (twoThetaDegrees, wavelengthAngstrom, dataClass) return validation errors
- Two-theta values of 0 or ≥ 90 degrees may cause mathematical errors in Bragg's law computation
- More than 128 peaks supplied exceeds maxItems limit and will be rejected
- Wavelength of zero or negative value will fail minimum constraint
- Invalid dataClass enum value (not 'public' or 'synthetic') causes schema rejection
- Payment failure via x402 protocol prevents execution

## How this service works

Calculate first-order Bragg spacings from supplied two-theta peaks and wavelength. Explicit units; no lattice indexing or unique phase identification.

## Output

Returns a result object containing first-order Bragg d-spacings for each supplied two-theta peak (calculated via Bragg's law with explicit units), along with boundary metadata, an offer ID, version string, input digest for verification, and a receipt digest for payment confirmation. No lattice indexing or crystal phase identification is performed.

## Request schema (JSON Schema)

```json
{
 "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",
     "required": [
      "dataClass",
      "twoThetaDegrees",
      "wavelengthAngstrom"
     ],
     "properties": {
      "dataClass": {
       "enum": [
        "public",
        "synthetic"
       ],
       "type": "string"
      },
      "twoThetaDegrees": {
       "type": "array",
       "maxItems": 128,
       "minItems": 1
      },
      "wavelengthAngstrom": {
       "type": "number",
       "maximum": 1000000000000,
       "minimum": 0
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "version",
      "offerId",
      "amountBaseUnits",
      "inputDigest",
      "result",
      "boundaries",
      "receiptDigest"
     ],
     "properties": {
      "result": {
       "type": "object"
      },
      "offerId": {
       "enum": [
        "materials-xrd-peak-analysis"
       ],
       "type": "string"
      },
      "version": {
       "enum": [
        "maha-microproducts/0.1"
       ],
       "type": "string"
      },
      "boundaries": {
       "type": "array",
       "maxItems": 128,
       "minItems": 0
      },
      "inputDigest": {
       "type": "string",
       "maxLength": 71
      },
      "receiptDigest": {
       "type": "string",
       "maxLength": 71
      },
      "amountBaseUnits": {
       "enum": [
        "85000"
       ],
       "type": "string"
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/xrd-bragg-spacing-calculator-f2cf8116/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.mahastrategies.com](https://www.zero.xyz/host/www.mahastrategies.com/llms.txt)
