# Elastic Moduli API
> Isotropic elastic-constant mechanics as an API, computed locally and deterministically. The convert endpoint takes any two of the five linear-elastic constants — Young’s modulus E, shear modulus G, bulk modulus K, Poisson’s ratio ν and the first Lamé parameter λ — and returns all five, using the standard isotropic relations (G = E/(2(1+ν)), K = E/(3(1−2ν)), λ = Eν/((1+ν)(1−2ν)) and their inversions for the pairs E+ν, G+ν, K+ν, E+G, E+K, K+G, G+λ, K+λ and λ+ν); steel given E = 200 GPa and ν = 0.3 comes back as G ≈ 76.92 GPa, K ≈ 166.67 GPa and λ ≈ 115.38 GPa. The wave-speeds endpoint computes the longitudinal (P) and shear (S) elastic wave speeds from two moduli and the density, vp = √((K + 4G/3)/ρ) and vs = √(G/ρ), together with the vp/vs ratio used in seismology and ultrasonic testing — steel comes out at about 5860 m/s for P-waves and 3130 m/s for S-waves. Moduli convert in whatever consistent unit you supply (the wave-speed endpoint expects strict SI: pascals and kg/m³ for metres per second). Everything is computed locally and deterministically, so it is instant and private. Ideal for materials-science, mechanical-engineering, geophysics, seismology, ultrasonic-NDT and FEA app developers, material-property and rock-physics tools, and simulation software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 2 endpoints. This interconverts elastic constants; for Young’s modulus from a stress/strain tensile test use a Young’s-modulus API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/elasticmoduli-api/..."
```

## Pricing
- **Free** (Free) — 4,000 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 40,000 calls/Mo, 6 req/s
- **Pro** ($19/Mo) — 190,000 calls/Mo, 15 req/s
- **Mega** ($60/Mo) — 1,150,000 calls/Mo, 40 req/s

## Endpoints

### Elasticity

#### `GET /v1/convert` — Interconvert elastic constants

**Parameters:**
- `e` (query, optional, string) — Young's modulus E Example: `200`
- `g` (query, optional, string) — Shear modulus G
- `k` (query, optional, string) — Bulk modulus K
- `nu` (query, optional, string) — Poisson's ratio ν Example: `0.3`
- `lambda` (query, optional, string) — First Lamé parameter λ

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/elasticmoduli-api/v1/convert?e=200&nu=0.3"
```

**Response:**
```json
{
    "data": {
        "note": "Isotropic elastic-constant interconversion. Moduli E, G, K, λ come out in the same unit you supplied them in; ν is dimensionless. Steel (E=200 GPa, ν=0.3) gives G≈76.92, K≈166.67, λ≈115.38 GPa.",
        "inputs": {
            "E": 200,
            "nu": 0.3
        },
        "lame_first": 115.384615,
        "bulk_modulus": 166.666667,
        "poisson_ratio": 0.3,
        "shear_modulus": 76.923077,
        "youngs_modulus": 200
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:30.960Z",
        "request_id": "17ef7500-8729-4c23-b159-2f7c606f094e"
    },
    "status": "ok",
    "message": "Interconvert elastic constants",
    "success": true
}
```

#### `GET /v1/wave-speeds` — P/S elastic wave speeds

**Parameters:**
- `k` (query, optional, string) — Bulk modulus K (Pa) Example: `166666666667`
- `g` (query, optional, string) — Shear modulus G (Pa) Example: `76923076923`
- `e` (query, optional, string) — Young's modulus E (Pa)
- `nu` (query, optional, string) — Poisson's ratio ν
- `lambda` (query, optional, string) — Lamé λ (Pa)
- `density` (query, required, string) — Density ρ (kg/m³) Example: `7850`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/elasticmoduli-api/v1/wave-speeds?k=166666666667&g=76923076923&density=7850"
```

**Response:**
```json
{
    "data": {
        "note": "Longitudinal (P) and shear (S) wave speeds: vp = √((K + 4G/3)/ρ), vs = √(G/ρ). Supply moduli in pascals and density in kg/m³ to get m/s. Steel (≈5860 m/s P, ≈3130 m/s S).",
        "inputs": {
            "G": 76923076923,
            "K": 166666666667,
            "density": 7850
        },
        "vp_vs_ratio": 1.870829,
        "p_wave_speed": 5856.3567,
        "s_wave_speed": 3130.3543
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:31.045Z",
        "request_id": "f8fb07a0-2787-4cad-86a4-8d367d7c055d"
    },
    "status": "ok",
    "message": "P/S wave speeds",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/elasticmoduli-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "notes": "Linear isotropic elasticity. This converts between elastic constants; for stress/strain and Young's modulus from a tensile test use a Young's-modulus API.",
        "service": "elasticmoduli-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/convert": "Give any two of E, G, K, nu, lambda; get all five.",
            "GET /v1/wave-speeds": "P- and S-wave speeds from two moduli (in Pa) and density."
        },
        "description": "Isotropic elastic-constant interconversion (Young's E, shear G, bulk K, Poisson's ν, Lamé λ) and seismic/ultrasonic P- and S-wave speeds.",
        "supported_pairs": [
            "E+nu",
            "G+nu",
            "K+nu",
            "E+G",
            "E+K",
            "K+G",
            "G+lambda",
            "K+lambda",
            "lambda+nu"
        ]
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:31.158Z",
        "request_id": "ff6a96d7-2d92-401c-88f2-4408ce33ea46"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/elasticmoduli-api
OpenAPI spec: https://www.oanor.com/api/elasticmoduli-api/openapi.json
