apyhub
DEVELOPER TOOLS · SECURITY & PRIVACY

Generate IDs In Batch API

What it does

Identifier Batch Generator creates batches of UUIDs, ULIDs, NanoIDs, hex strings, or short tokens from a single request. Send a format, plus optional size and count, and get back a structured JSON response suitable for fixtures, seed data, test records, or client-side temporary IDs.

Use count to control how many identifiers you want, from 1 to 1000. Use size when generating nanoid, hex, or token values to set the length; it defaults to 21. The format field accepts uuid4, uuid7, ulid, nanoid, hex, or token, so you can match the identifier style your system already expects.

This is a good fit for backend jobs, test setup scripts, and internal tooling where you need many unique values without writing your own generator. Keep your integration simple: choose the identifier type, set the batch size, and consume the JSON response in the same workflow that needs the IDs.

POST
Generate UUID, ULID, NanoID, or short tokens in a batch.
http://localhost:8080/creightonnick0/generate-id-batch
QUICKSTARTGUIDE

Quickstart

Generate a batch of IDs with the default format by sending the required JSON fields.

curl -X POST "http://localhost:8080/creightonnick0/generate-id-batch" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"size":21,"count":5,"format":"ulid"}'

What you'll get back

Returns the requested format, the count generated, the full list of identifiers, and the first identifier for convenience.

{
  "format": "ulid",
  "count": 5,
  "ids": [
    "01J8X3ZK9M4P6QAY7B2R8VN0EW",
    "01J8X3ZK9NBTF5C1D9SXH3GJ4K",
    "01J8X3ZK9P7RT2M8VQ6YB0NC5W",
    "01J8X3ZK9Q3HS9K4WD1XF7RM2B",
    "01J8X3ZK9R8YN6T5PC2VG9WH3M"
  ],
  "first": "01J8X3ZK9M4P6QAY7B2R8VN0EW"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body
Length for nanoid/hex/token (default 21)
How many to generate (1-1000, default 1)
uuid4 | uuid7 | ulid | nanoid | hex | token

About this endpoint

What it does

Generates a batch of identifiers in the format you choose. You can control how many are returned and, for formats that use variable-length identifiers, the length used for generation.

Request Body

ParameterTypeMandatoryDescription
sizeIntegerNoLength for nanoid, hex, or token identifiers. Default: 21.
countIntegerNoHow many identifiers to generate. Allowed range: 1-1000. Default: 1.
formatStringNoIdentifier format to generate. Allowed values: uuid4, uuid7, ulid, nanoid, hex, token.

Response

FieldTypeDescription
formatStringThe identifier format that was generated.
countIntegerThe number of identifiers returned.
idsArray of StringThe generated identifiers.
firstStringThe first identifier in ids, provided as a convenience for single-ID use cases.

Body

Name
Type
Description
bodyOPTIONAL
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.