# Material Fatigue API
> Mechanical-fatigue engineering maths as an API, computed locally and deterministically. The stress-cycle endpoint decomposes a cyclic load given by its maximum and minimum stress into the alternating stress σa = (σmax − σmin)/2, the mean stress σm = (σmax + σmin)/2, the stress range and the stress ratio R = σmin/σmax, and names the loading (fully reversed at R = −1, repeated at R = 0). The criteria endpoint computes the infinite-life safety factor against fatigue using the three classic mean-stress theories — Goodman (1/n = σa/Se + σm/Sut, standard and safe), Soderberg (uses the yield strength, conservative) and Gerber (a parabola, least conservative) — from the alternating and mean stress, the endurance limit Se, the ultimate strength Sut and an optional yield strength. The endurance-limit endpoint estimates the corrected endurance limit Se = ka·kb·kc·kd·ke·Se' from the ultimate strength, with Se' = 0.5·Sut for steel and the Marin modifying factors for surface finish, size, load type, temperature and reliability. Stresses and strengths use any one consistent unit (MPa is typical). Everything is computed locally and deterministically, so it is instant and private. Ideal for mechanical, structural, automotive and aerospace-design app developers, durability and safety-factor tools, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is fatigue and endurance; for static stress transformation use a Mohr-circle API and for column buckling a buckling 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/fatigue-api/..."
```

## Pricing
- **Free** (Free) — 2,100 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 37,000 calls/Mo, 6 req/s
- **Pro** ($26/Mo) — 245,000 calls/Mo, 15 req/s
- **Mega** ($78/Mo) — 1,680,000 calls/Mo, 40 req/s

## Endpoints

### Fatigue

#### `GET /v1/criteria` — Fatigue safety factors

**Parameters:**
- `stress_amplitude` (query, required, string) — Alternating stress σa Example: `125`
- `mean_stress` (query, required, string) — Mean stress σm Example: `75`
- `endurance_limit` (query, required, string) — Endurance limit Se Example: `200`
- `ultimate_strength` (query, required, string) — Ultimate strength Sut Example: `400`
- `yield_strength` (query, optional, string) — Yield strength Sy Example: `300`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fatigue-api/v1/criteria?stress_amplitude=125&mean_stress=75&endurance_limit=200&ultimate_strength=400&yield_strength=300"
```

**Response:**
```json
{
    "data": {
        "note": "Mean-stress criteria for infinite life. Goodman is standard/safe, Soderberg conservative (uses yield), Gerber least conservative (parabola). A safety factor below 1 predicts fatigue failure.",
        "inputs": {
            "mean_stress": 75,
            "yield_strength": 300,
            "endurance_limit": 200,
            "stress_amplitude": 125,
            "ultimate_strength": 400
        },
        "infinite_life": true,
        "yield_safety_factor": 1.5,
        "gerber_safety_factor": 1.477248,
        "goodman_safety_factor": 1.230769,
        "soderberg_safety_factor": 1.142857
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:33.667Z",
        "request_id": "d283ad05-50b1-4ff9-b254-e1f28de82c70"
    },
    "status": "ok",
    "message": "Fatigue criteria",
    "success": true
}
```

#### `GET /v1/endurance-limit` — Corrected endurance limit

**Parameters:**
- `ultimate_strength` (query, required, string) — Ultimate strength Sut (MPa) Example: `400`
- `surface_factor` (query, optional, string) — Surface ka Example: `1`
- `size_factor` (query, optional, string) — Size kb Example: `1`
- `load_factor` (query, optional, string) — Load kc Example: `1`
- `temperature_factor` (query, optional, string) — Temperature kd Example: `1`
- `reliability_factor` (query, optional, string) — Reliability ke Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fatigue-api/v1/endurance-limit?ultimate_strength=400&surface_factor=1&size_factor=1&load_factor=1&temperature_factor=1&reliability_factor=1"
```

**Response:**
```json
{
    "data": {
        "note": "Se' = 0.5·Sut for steel (capped at 700 MPa above Sut ≈ 1400 MPa). The Marin factors ka·kb·kc·kd·ke correct for surface finish, size, load type, temperature and reliability.",
        "inputs": {
            "load_factor": 1,
            "size_factor": 1,
            "surface_factor": 1,
            "ultimate_strength": 400,
            "reliability_factor": 1,
            "temperature_factor": 1
        },
        "corrected_endurance_limit": 200,
        "rotating_beam_endurance_limit": 200
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:33.775Z",
        "request_id": "9a6949c1-79dc-43a0-a981-b1b950326a38"
    },
    "status": "ok",
    "message": "Endurance limit",
    "success": true
}
```

#### `GET /v1/stress-cycle` — Stress cycle

**Parameters:**
- `stress_max` (query, required, string) — Maximum stress Example: `200`
- `stress_min` (query, required, string) — Minimum stress Example: `-50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fatigue-api/v1/stress-cycle?stress_max=200&stress_min=-50"
```

**Response:**
```json
{
    "data": {
        "note": "Alternating stress σa = (σmax − σmin)/2 and mean stress σm = (σmax + σmin)/2. R = σmin/σmax: −1 is fully reversed, 0 is repeated.",
        "inputs": {
            "stress_max": 200,
            "stress_min": -50
        },
        "mean_stress": 75,
        "loading_type": "fluctuating",
        "stress_range": 250,
        "stress_ratio_R": -0.25,
        "stress_amplitude": 125,
        "amplitude_ratio_A": 1.666667
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:33.871Z",
        "request_id": "cff9df14-34b9-4632-8fe2-b7eccf1b4636"
    },
    "status": "ok",
    "message": "Stress cycle",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Stresses and strengths in any one consistent unit (MPa typical). Mean-stress criteria treat compressive mean stress as non-damaging (σm clamped at 0). Marin factors default to 1.",
        "service": "fatigue-api",
        "formulae": {
            "gerber": "(n·σa)/Se + (n·σm/Sut)² = 1",
            "goodman": "1/n = σa/Se + σm/Sut",
            "soderberg": "1/n = σa/Se + σm/Sy"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/criteria": "Goodman, Soderberg and Gerber safety factors for infinite life.",
            "GET /v1/stress-cycle": "Alternating and mean stress, range and stress ratio from max/min stress.",
            "GET /v1/endurance-limit": "Corrected endurance limit from Sut and the Marin modifying factors."
        },
        "description": "Mechanical fatigue calculator: stress cycle (alternating/mean/ratio), mean-stress safety factors (Goodman, Soderberg, Gerber) and the Marin-corrected endurance limit."
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:33.960Z",
        "request_id": "7222a7db-90f8-4ee5-8911-6e5e78dd8f4f"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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