UUID generator API: random and time-ordered IDs

Every mainstream language generates UUIDs for free (uuid.uuid4() in Python, crypto.randomUUID() in browsers and Node), so a UUID API is mainly for tools and AI agents that can't run code. Our ID and Password Generator API returns up to 100 UUID v4, UUID v7, ULID or nanoid-style IDs per call from a secure random source for $0.002. For database keys, time-ordered UUID v7 or ULID usually index better than random v4.

Try it free ID & Password Generator API — UUID v7, ULID, $0.002 · $0.002 / call

Free in code

# Python
import uuid
uuid.uuid4()          # random
uuid.uuid7()          # time-ordered, Python 3.14 and later

// JavaScript (browsers and Node 19+)
crypto.randomUUID()

Which ID to use

Random v4 keys land all over a B-tree index, which slows inserts on big tables. Time-ordered v7 and ULID keep new rows together. The trade-off: they reveal when the id was created.

TypeLooks likeSorts by timeBest for
UUID v436 characters, randomNoPublic ids that reveal nothing
UUID v736 characters, starts with the timeYesDatabase primary keys
ULID26 characters, Crockford base32YesShorter sortable ids in URLs and logs
nanoid-styleYour alphabet and lengthNoShort links and invite codes

Our API

Pick a type and a count from 1 to 100. nanoid takes your own alphabet and a length from 4 to 128. The same endpoint also makes passwords (8 to 128 characters, look-alike characters left out) and word passphrases. Every answer includes the entropy in bits. Values come from crypto.getRandomValues with unbiased sampling and nothing is stored or logged.

curl -i -X POST https://iamai.markets/api/x402/services/NxguF_52ZW3i \
  -H "Content-Type: application/json" \
  -d '{"type": "uuid7", "count": 3}'

# result: type, count, values [3 UUID v7 strings], entropy_bits: 74

Things people get wrong

Cost

$0.002 per call whether you ask for 1 id or 100, paid with x402 in USDC on Base. 5 free tries a day on the listing page.

The product

Questions

Can two UUID v4s collide?

In theory, but with 122 random bits the chance is negligible for any real system.

Is UUID v7 a standard?

Yes. RFC 9562 (2024) defines versions 6, 7 and 8 alongside the older ones.

What is a GUID?

Microsoft's name for a UUID. Same 128-bit format.

Related

Updated 2026-12-02