Crypto & Security 1 credit COMPUTE

UUID v4 API

Generate RFC 4122 compliant UUID v4 identifiers via REST API. Each UUID is a 128-bit random value formatted as xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. Generated using Node.js crypto.randomUUID() — cryptographically random, not Math.random().

Try it live →

How it works

POST an empty JSON object (or any input) and receive a new UUID v4. Each call generates a fresh UUID using the system CSPRNG. The API also supports batch generation — request up to 100 UUIDs in a single call.

Use cases

API Reference

POST https://slopshop.gg/v1/crypto-uuid
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Input parameters

ParameterTypeRequiredDescription
input / data string required The input data to hash or process

Example response

{
  "data": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000"
  },
  "meta": {
    "credits_used": 1,
    "engine": "real",
    "ms": 4
  }
}

Examples

Three real-world scenarios showing how developers use UUID v4 in production.

Example 1
Database primary key
Generate a UUID to use as a primary key before inserting a new record.
curl -X POST https://slopshop.gg/v1/crypto-uuid \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Example 2
Idempotency key for payment
Create a unique key to prevent duplicate payment processing.
curl -X POST https://slopshop.gg/v1/crypto-uuid \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Example 3
Distributed trace ID
Generate a correlation ID to trace a request across microservices.
curl -X POST https://slopshop.gg/v1/crypto-uuid \
  -H "Authorization: Bearer $SLOPSHOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Code examples

curl

curl -X POST https://slopshop.gg/v1/crypto-uuid \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "your data here"}'

Python

import requests

response = requests.post(
    "https://slopshop.gg/v1/crypto-uuid",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"input": "your data here"}
)
result = response.json()
print(result["data"])

Node.js

const response = await fetch("https://slopshop.gg/v1/crypto-uuid", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ input: "your data here" })
});
const { data } = await response.json();
console.log(data);

CLI

# Install the Slopshop CLI
npm install -g slopshop

# Set your API key
export SLOPSHOP_KEY=your_api_key

# Call crypto-uuid
slop crypto-uuid '{"input": "your data here"}'

Pricing

Credits per call
1
credits
Cost per call
$0.001
at Starter tier
Tier
COMPUTE
Pure compute

Credits are purchased in bundles starting at $1 for 1,000 credits. All compute APIs like this one use 1 credit per call — that's $0.001. See all pricing tiers.

Related APIs in Crypto & Security

View the full API catalog · Try in playground · Documentation