# Dog & Cat Age API
> Pet-age conversion as an API, computed locally and deterministically. The dog endpoint converts a dog’s age in years to a human-equivalent age three ways: the modern epigenetic model from the 2019 UCSD DNA-methylation study, human = 16·ln(dog_age) + 31 (valid from age 1), which makes a 1-year-old dog about 31, a 4-year-old about 53 and a 10-year-old about 68 human years; the American Kennel Club size-based table for small, medium, large and giant breeds, interpolated between yearly anchor points so a large breed ages faster late in life; and the old ×7 rule of thumb for comparison. The cat endpoint converts a cat’s age, counting 15 human years in the first year, 24 by the second, and four per year after that, so a 10-year-old cat is about 56. Ages are in years and decimals are allowed. Everything is computed locally and deterministically, so it is instant and private. Ideal for pet, veterinary, animal-shelter, pet-insurance and lifestyle app developers, dog-years and pet-profile widgets, and fun tools. These are estimates for general guidance, not veterinary advice. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 2 endpoints. This is pet-to-human age; for human body metrics use a BMI or body-fat 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/dogage-api/..."
```

## Pricing
- **Free** (Free) — 7,500 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 75,000 calls/Mo, 6 req/s
- **Pro** ($10/Mo) — 330,000 calls/Mo, 15 req/s
- **Mega** ($31/Mo) — 1,750,000 calls/Mo, 40 req/s

## Endpoints

### PetAge

#### `GET /v1/cat` — Cat age to human years

**Parameters:**
- `age` (query, required, string) — Cat age (years) Example: `10`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dogage-api/v1/cat?age=10"
```

**Response:**
```json
{
    "data": {
        "note": "Cat aging: 15 human years in the first year, 24 by the second, then +4 per year. A 10-year-old cat is about 56 human years.",
        "inputs": {
            "age": 10
        },
        "human_age": 56
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:20.545Z",
        "request_id": "98627fd4-eba3-4f1b-9d66-aec807b9e83d"
    },
    "status": "ok",
    "message": "Cat age",
    "success": true
}
```

#### `GET /v1/dog` — Dog age to human years

**Parameters:**
- `age` (query, required, string) — Dog age (years) Example: `4`
- `size` (query, optional, string) — small, medium, large or giant Example: `medium`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/dogage-api/v1/dog?age=4&size=medium"
```

**Response:**
```json
{
    "data": {
        "note": "Epigenetic model (2019 UCSD): human = 16·ln(dog_age) + 31, valid for dog_age ≥ 1. The AKC table varies by size (small/medium/large/giant); the ×7 rule is the old rule of thumb. A 4-year-old dog is about 53 human years by the epigenetic model.",
        "inputs": {
            "age": 4,
            "size": "medium"
        },
        "human_age_akc": 32,
        "human_age_epigenetic": 53.18,
        "human_age_traditional": 28
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:20.657Z",
        "request_id": "5ef1c1b5-595c-41ea-909f-191cc11889b6"
    },
    "status": "ok",
    "message": "Dog age",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Ages in years (decimals allowed). The epigenetic dog formula is defined for ages ≥ 1; the AKC size table interpolates between yearly anchors. Estimates for fun and general guidance, not veterinary advice.",
        "sizes": [
            "small",
            "medium",
            "large",
            "giant"
        ],
        "service": "dogage-api",
        "endpoints": {
            "GET /v1/cat": "Cat age → human years.",
            "GET /v1/dog": "Dog age → human years (epigenetic model, AKC size table, and ×7 rule).",
            "GET /v1/meta": "This document."
        },
        "description": "Pet age conversion: dog and cat years to human-equivalent years."
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:20.775Z",
        "request_id": "317bf48e-b4ba-402b-838c-8a32c9a270ae"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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