
UUID/Nanoid Generator API
Development
Generate unique identifiers instantly with various algorithms. Create UUIDs, CUIDs, ULIDs, and NanoIDs for secure, sortable, and scalable applications.
Authentication
All API requests require a valid API key passed in the Authorization header as a Bearer token.
Rate Limit
100 requests per minute
Endpoints
1 endpoint available
Overview
The UUID/Nanoid Generator API generates and validates unique identifiers using various algorithms.
Supported ID Types
- UUID v1: Timestamp + MAC address based
- UUID v3: MD5 hash of namespace + name
- UUID v4: Random (most commonly used)
- UUID v5: SHA-1 hash of namespace + name
- UUID v6: Reordered v1 for sortability
- UUID v7: Unix timestamp based, sortable
- CUID: Collision-resistant for distributed systems
- ULID: Lexicographically sortable
- NanoID: Compact, URL-friendly
Validation Support
- UUID (any version)
- ULID
- CUID
Endpoints
POST
/v1/tools/uuid-generatorGenerate or validate unique identifiers
Request Body
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
| operation | string | Required | Operation: "generate" or "validate" |
| type | string | Required | ID type: "uuidv1", "uuidv3", "uuidv4", "uuidv5", "uuidv6", "uuidv7", "cuid", "ulid", "nanoid" (for generate), or "uuid", "ulid", "cuid" (for validate) |
| count | number | Optional | Number of IDs to generate (1-100, default 1). Only 1 for time-based/namespace types (v1, v3, v5, v6, v7) |
| id | string | Optional | ID to validate (required for "validate" operation) |
Response Example
{
"success": true,
"data": {
"operation": "generate",
"type": "uuidv4",
"ids": [
"550e8400-e29b-41d4-a716-446655440000",
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
],
"count": 2
}
}Error Codes
400
Bad Request - Invalid type or missing required parameters401
Unauthorized - Invalid or missing API key429
Too Many Requests - Rate limit exceeded500
Internal Server ErrorCode Examples
# Generate UUIDs
curl -X POST https://api.opentools.ca/v1/tools/uuid-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "generate",
"type": "uuidv4",
"count": 5
}'
# Validate a UUID
curl -X POST https://api.opentools.ca/v1/tools/uuid-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "validate",
"type": "uuid",
"id": "550e8400-e29b-41d4-a716-446655440000"
}'