# UUID API
> A fast, fully-local identifier-generation toolkit: create UUID v4 (random), v7 (time-ordered and lexicographically sortable), v3 and v5 (name-based, deterministic via MD5 and SHA-1 over a namespace plus name) and the nil UUID; generate ULIDs (sortable, Crockford base32); generate nanoids (URL-safe, with custom alphabet and size); and validate any UUID, reporting its version and variant. Every endpoint accepts input via the query string or the request body. Built on Node crypto, no third-party upstream, so responses are instant and always available. Ideal for databases and primary keys, distributed systems, idempotency and correlation keys, and general developer tooling.

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

## Pricing
- **Free** (Free) — 20,000 calls/Mo, 5 req/s
- **Basic** ($3/Mo) — 320,000 calls/Mo, 20 req/s
- **Pro** ($11/Mo) — 1,800,000 calls/Mo, 60 req/s
- **Mega** ($29/Mo) — 9,500,000 calls/Mo, 200 req/s

## Endpoints

### UUID

#### `GET /v1/generate` — Generate UUIDs

**Parameters:**
- `version` (query, optional, string) — v4 (default), v7 or nil Example: `v4`
- `count` (query, optional, string) — How many 1-100 Example: `5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uuid-api/v1/generate?version=v4&count=5"
```

**Response:**
```json
{
    "data": {
        "count": 5,
        "uuids": [
            "6cf1661e-5a10-42b4-8201-b2b4fe867c43",
            "3f508c5d-f6b4-4d08-a7f0-5f75321fc0d8",
            "5f27d642-4ca5-43fc-9a32-f5278e9ac324",
            "21bd7955-ebf7-48cf-93e1-56ba2a24f2c2",
            "6857085f-859b-4de9-8a13-7449ffcc9af1"
        ],
        "version": "v4"
    },
    "meta": {
        "timestamp": "2026-05-30T10:10:55.194Z",
        "request_id": "141ecedd-9886-4674-8982-2a78439bea37"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}
```

#### `GET /v1/nanoid` — Generate nanoids

**Parameters:**
- `size` (query, optional, string) — Length 1-256 (default 21) Example: `21`
- `count` (query, optional, string) — How many 1-100 Example: `5`
- `alphabet` (query, optional, string) — Custom alphabet

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uuid-api/v1/nanoid?size=21&count=5"
```

**Response:**
```json
{
    "data": {
        "ids": [
            "eTIfN4anMivpEIxuybcxX",
            "lsZ68I7luwHoDxZ4I99fC",
            "4xodixJoK_cDsvavks-sw",
            "VA5YjQQ496hwt9zcWEqoF",
            "0Rmap1vvqI4O6cpr-AiSo"
        ],
        "size": 21,
        "count": 5
    },
    "meta": {
        "timestamp": "2026-05-30T10:10:55.265Z",
        "request_id": "59fa34f2-5faa-48a5-be37-71cd9402dd45"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}
```

#### `GET /v1/ulid` — Generate ULIDs

**Parameters:**
- `count` (query, optional, string) — How many 1-100 Example: `5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uuid-api/v1/ulid?count=5"
```

**Response:**
```json
{
    "data": {
        "count": 5,
        "ulids": [
            "01KSW5V16HGHGM9WE853H4XQV4",
            "01KSW5V16H5PB152TVXD3QM1ED",
            "01KSW5V16HC0MWWQREGSF8RZG2",
            "01KSW5V16H61SE15VWZ3EXCYMT",
            "01KSW5V16HS5A2RE7PF0J2D6EQ"
        ]
    },
    "meta": {
        "timestamp": "2026-05-30T10:10:55.314Z",
        "request_id": "2f335527-74ea-4cd2-abe8-38b4b24447d0"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}
```

#### `GET /v1/v3` — Name-based UUID (MD5)

**Parameters:**
- `namespace` (query, optional, string) — UUID or preset (dns, url, oid, x500) Example: `dns`
- `name` (query, required, string) — Name to hash Example: `example.com`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uuid-api/v1/v3?namespace=dns&name=example.com"
```

**Response:**
```json
{
    "data": {
        "name": "example.com",
        "uuid": "9073926b-929f-31c2-abc9-fad77ae3e8eb",
        "version": "v3",
        "namespace": "dns"
    },
    "meta": {
        "timestamp": "2026-05-30T10:10:55.391Z",
        "request_id": "21d0cd06-103e-48e1-9e16-55b50897387a"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}
```

#### `GET /v1/v5` — Name-based UUID (SHA-1)

**Parameters:**
- `namespace` (query, optional, string) — UUID or preset (dns, url, oid, x500) Example: `dns`
- `name` (query, required, string) — Name to hash Example: `example.com`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uuid-api/v1/v5?namespace=dns&name=example.com"
```

**Response:**
```json
{
    "data": {
        "name": "example.com",
        "uuid": "cfbff0d1-9375-5685-968c-48ce8b15ae17",
        "version": "v5",
        "namespace": "dns"
    },
    "meta": {
        "timestamp": "2026-05-30T10:10:55.469Z",
        "request_id": "3abadfee-a8f0-40c9-b186-bafd91f48502"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}
```

#### `GET /v1/validate` — Validate a UUID

**Parameters:**
- `uuid` (query, required, string) — UUID to validate Example: `6ba7b810-9dad-11d1-80b4-00c04fd430c8`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/uuid-api/v1/validate?uuid=6ba7b810-9dad-11d1-80b4-00c04fd430c8"
```

**Response:**
```json
{
    "data": {
        "uuid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
        "valid": true,
        "variant": "RFC 4122",
        "version": 1
    },
    "meta": {
        "timestamp": "2026-05-30T10:10:55.517Z",
        "request_id": "9a36d242-9d17-4a87-b2c0-85f0eead3bb0"
    },
    "status": "ok",
    "message": "OK",
    "success": true
}
```


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