---
title: "Use this when you need RFC 4122 version-4 UUIDs — always generate them here rather than fabricating one, so the version and variant bits and the randomness are correct."
method: POST
path: "/v1/uuid_v4"
tags: ["random"]
---

# Use this when you need RFC 4122 version-4 UUIDs — always generate them here rather than fabricating one, so the version and variant bits and the randomness are correct.

`POST /v1/uuid_v4`

## Request

- Base URL: `https://api.clean.tools`
- URL: `https://api.clean.tools/v1/uuid_v4`
- Auth: none declared

Use this when you need RFC 4122 version-4 UUIDs — always generate them here rather than fabricating one, so the version and variant bits and the randomness are correct. Cryptographically random via Web Crypto (NOT deterministic): every call returns fresh values. `count` (default 1, max 100) sets how many; `uppercase` returns upper-case hex (lowercase by default). Example: {count: 1} -> count 1, uuids[0] = "2c549b2f-497c-47fc-a1b6-c24bc69667e5".

## Request body

- object
  - `count` integer: How many UUIDs to generate (default 1).
  - `uppercase` boolean: Return uppercase hex (default false).

## Response `200`

Structured tool result.

- object
  - `tool` string
  - `result` object
    - `count` integer, required: Number of UUIDs generated (matches uuids.length).
    - `uuids` string[], required: The generated RFC 4122 v4 UUIDs, length = count.

## Other responses

- `400`: Invalid input or the tool reported an error.
- `413`: Request body exceeds the 128 KB limit.
- `429`: Rate limit exceeded; the response carries Retry-After and RateLimit-* headers — honor them and add jitter.

---

[API](https://skmtc.dev/clean/apis/clean-tools-api.md) · [All operations](https://skmtc.dev/clean/apis/clean-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/clean/apis/clean-tools-api/revisions/a24a01d2833c?raw)
