# Easing API
> Evaluate animation easing and timing functions. The sample endpoint computes any of the 31 standard Penner easings — easeInOutCubic, easeOutBounce, easeInOutElastic, easeInBack, easeOutExpo, easeInOutSine and the rest — the four CSS keywords (ease, ease-in, ease-out, ease-in-out), or your own CSS cubic-bezier(x1,y1,x2,y2) timing function, solved exactly with Newton-Raphson. Ask for a single progress value t, or pass steps=N to get a ready-made table of {t, value} points for building keyframes, sprite timelines, scroll animations and interpolation lookup tables. The list endpoint returns every supported easing name with the cubic-bezier for the CSS keywords. Eased values may overshoot below 0 or above 1 for back, elastic and bounce, exactly as designers expect. Ideal for motion design, game and UI animation, CSS and canvas/WebGL tooling, charting and data-viz transitions, and anywhere you need a precise timing curve without pulling in a library. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This computes the curve values; to convert colours or build gradients use the colour and gradient APIs.

## 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/easing-api/..."
```

## Pricing
- **Free** (Free) — 1,835 calls/Mo, 2 req/s
- **Starter** ($3/Mo) — 11,350 calls/Mo, 8 req/s
- **Pro** ($23/Mo) — 164,500 calls/Mo, 20 req/s
- **Mega** ($61/Mo) — 865,000 calls/Mo, 50 req/s

## Endpoints

### Easing

#### `GET /v1/list` — List easings

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

**Response:**
```json
{
    "data": {
        "css": [
            {
                "name": "ease",
                "bezier": [
                    0.25,
                    0.1,
                    0.25,
                    1
                ]
            },
            {
                "name": "ease-in",
                "bezier": [
                    0.42,
                    0,
                    1,
                    1
                ]
            },
            {
                "name": "ease-out",
                "bezier": [
                    0,
                    0,
                    0.58,
                    1
                ]
            },
            {
                "name": "ease-in-out",
                "bezier": [
                    0.42,
                    0,
                    0.58,
                    1
                ]
            }
        ],
        "count": 35,
        "usage": "Pass ?easing=<name> or ?bezier=x1,y1,x2,y2 to /v1/sample, with ?t=0..1 or ?steps=N.",
        "penner": [
            "linear",
            "easeInSine",
            "easeOutSine",
            "easeInOutSine",
            "easeInQuad",
            "easeOutQuad",
            "easeInOutQuad",
            "easeInCubic",
            "easeOutCubic",
            "easeInOutCubic",
            "easeInQuart",
            "easeOutQuart",
            "easeInOutQuart",
            "easeInQuint",
            "easeOutQuint",
            "easeInOutQuint",
            "easeInExpo",
            "easeOu
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/sample` — Sample an easing

**Parameters:**
- `easing` (query, optional, string) — Named easing (default linear) — see /v1/list Example: `easeOutBounce`
- `bezier` (query, optional, string) — Custom cubic-bezier x1,y1,x2,y2 (overrides easing)
- `t` (query, optional, string) — Single progress 0..1 Example: `0.5`
- `steps` (query, optional, string) — Sample over N steps (returns N+1 points)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/easing-api/v1/sample?easing=easeOutBounce&t=0.5"
```

**Response:**
```json
{
    "data": {
        "t": 0.5,
        "type": "penner",
        "value": 0.765625,
        "easing": "easeOutBounce"
    },
    "meta": {
        "timestamp": "2026-06-03T09:25:06.001Z",
        "request_id": "5e642b7a-4af7-4620-abb2-7db59c343c0b"
    },
    "status": "ok",
    "message": "Sample an easing",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "name": "Easing API",
        "notes": "Progress t and CSS-bezier x are clamped to 0..1; eased values may overshoot below 0 or above 1 for back/elastic/bounce. cubic-bezier x1,x2 must be within 0..1 (CSS rule). Nothing is stored.",
        "version": "v1",
        "endpoints": [
            {
                "path": "/v1/sample",
                "params": {
                    "t": "single progress 0..1",
                    "steps": "sample over N steps instead of a single t (returns N+1 points)",
                    "bezier": "custom cubic-bezier as x1,y1,x2,y2 (overrides easing)",
                    "easing": "named easing (default linear) — see /v1/list"
                },
                "returns": "the eased value, or a table of {t,value} samples"
            },
            {
                "path": "/v1/list",
                "params": [],
                "returns": "all supported named easings (CSS keywords + Penner)"
            },
            {
                "path": "/v1/meta",
                "params": [],
                "returns": "this document"
            }
        ],
        "description": "Evaluate animation easing and timing functions. Sample any of the 31 standard Penner easings (easeInOutCubic, easeOutBounce, easeInOutElastic, easeInBack…), the four CSS keywords (ease, ease-in, ease-out, ease-in-out), or your own CSS cubic-bezier(x1,y1,x2,y2) — at a single progress t, or as a ready-made table over N steps for building keyf
…(truncated, see openapi.json for full schema)
```


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