x402AgentTools

๐Ÿ†”UUID Generator / Validator

Generate cryptographically random UUIDv4s or time-sortable UUIDv7s from a real CSPRNG, and validate any UUID's format, version and variant bits.

Worked examples

Generate v4

GET /api/v1/dev/uuid?op=generate&version=v4

Result: 3743daba-a3b4-4409-b1f1-44f690af32c4

Generate v7 (sortable)

GET /api/v1/dev/uuid?op=generate&version=v7

Result: 01a0ecc1-a3ae-74bd-9b41-b43b89e04482

Validate a UUID

GET /api/v1/dev/uuid?op=validate&value=123e4567-e89b-42d3-a456-426614174000

Result: โœ“ Valid UUID (version 4, RFC 9562/4122)

Machine API (x402)

$0.001 / call

This tool is also a JSON API for AI agents. Requests without payment receive 402 Payment Required plus instructions; agents pay USDC on Base via the x402 protocol โ€” no accounts, no API keys.

GET /api/v1/dev/uuid?op=generate&version=v4 HTTP/1.1
Host: agenttools-hub.vercel.app

โ†’ 402 (payment required, instructions in headers)
โ†’ 200 (after X-PAYMENT header; JSON body below)

{
  "tool": "dev/uuid",
  "input": {"op":"generate","version":"v4"},
  "result": { "value": null, "answer": "004b3b32-1c8f-4a23-bb6d-91af0882dc2b" }
}

Agent docs: /llms.txt ยท OpenAPI spec ยท integration guide

About this tool

Identifiers from a real CSPRNG: v4 for pure randomness, v7 when IDs should sort by creation time (databases, distributed logs). Validation checks structure, version nibble and RFC variant bits โ€” not just a regex.

Frequently asked questions

v4 or v7?

v4 when randomness should leak nothing; v7 when IDs double as sort keys โ€” it embeds the millisecond timestamp, making B-tree inserts sequential.

Are generated UUIDs unique?

v4 has 122 random bits โ€” collision odds are negligible for any realistic volume. v7 uniqueness rests on the timestamp plus 74 random bits.

Related tools