POST/api/v1/generate
Create one or more Numeric ID and Visual ID pairs.
For AI agents and agentic systems
Discover the public endpoints, select the operation that matches the task, and interpret each response without losing Numeric ID precision or retrying generation unsafely.
API discovery
The public API requires no credentials. Use these resources to discover endpoint schemas and concise instructions; call an endpoint only when the user's task requires it.
API_BASE = "https://tvnid.dev/api/v1"Send JSON requests to documented endpoint paths under this base. No API key or Authorization header is needed.
Use OpenAPI for exact schemas, llms.txt for concise agent instructions, and the API reference for an interactive contract view.
Integration workflow · 01
Use the hosted API for identifier operations. Send only the documented fields, parse the JSON response, then store the returned pair with the application record that needs it.
POST/api/v1/generate
Create one or more Numeric ID and Visual ID pairs.
POST/api/v1/convert/to-visual
Get the Visual ID representation for a supplied Numeric ID.
POST/api/v1/convert/to-numeric
Get the Numeric ID representation for a supplied Visual ID.
POST/api/v1/validate
Check input format and range; a valid result does not prove issuance.
POST/api/v1/inspect
Request public timestamp information for one identifier.
POST/api/v1/inspect/batch
Request timestamp information for a batch of Numeric IDs.
GET/api/v1/spec
Read the machine-readable service description.
GET/api/healthz
Check whether the API service is responding.
POST requests use Content-Type: application/json. Do not recreate generation or conversion logic in the agent or application.
Response interpretation
Treat numeric_id as a decimal string or exact integer, never a JavaScript Number. A Visual ID is a readable reference, not an authentication credential.
Generation returns an ids array containing one matched object per identifier, plus count, api_version, and format_version. Conversion returns one matched object directly. Numeric IDs are JSON strings; keep their exact decimal values.
# POST /api/v1/generate (values vary per call)
{"ids":[{"numeric_id":"<decimal string>","visual_id":"<12-character Visual ID>"}],"count":1,"api_version":"v1","format_version":1}
# POST /api/v1/convert/to-visual and /convert/to-numeric
{"numeric_id":"27684557326419404","visual_id":"469pb6g35qme"}
# POST /api/v1/validate
{"valid":true,"message":"Valid format does not prove issuance.","format_version":1}
# POST /api/v1/inspect
{"numeric_id":"<decimal string>","visual_id":"<12-character Visual ID>","timestamp_ns":"<Unix nanoseconds>","datetime_utc":"<ISO 8601 timestamp>","format_version":1,"valid":true}
# POST /api/v1/inspect/batch
{"items":[{"numeric_id":"<decimal string>","visual_id":"<12-character Visual ID>","timestamp_ns":"<Unix nanoseconds>","datetime_utc":"<ISO 8601 timestamp>","format_version":1,"valid":true}]}
# GET /api/healthz
{"status":"ok"}Non-success responses use an HTTP status and a JSON object with an error message. Use the status and Retry-After header to decide what to do next.
{
"error": "<message describing the request or service error>"
}inspect responses include timestamp_ns and datetime_utc. Batch inspection returns entries in the same order as the submitted Numeric IDs.
Application persistence · 03
Store the Numeric ID as the exact database key and the Visual ID as its corresponding text reference. They are two representations of the same identifier, so a separate table is not needed just to map one to the other.
CREATE TABLE work_items (
numeric_id BIGINT PRIMARY KEY,
visual_id VARCHAR(12) NOT NULL,
status TEXT NOT NULL
);Adapt the table and column names to the application's existing schema.
numeric_id as a decimal string or use BigInt; never parse it as Number.visual_id in a text column sized for 12 characters, and keep the API field name visual_id in requests.Reliable calls · 04
Treat the HTTP status as authoritative. Correct invalid requests, respect rate limits, and do not automatically submit a replacement generation request when its outcome is unknown.
A timeout or lost response to /generate leaves the result unknown. Do not issue a new batch until the user approves that action.
Brand assets · 05
These public URLs can be used in internal applications and agent-built interfaces. Choose the lockup for the background, or use the square and circular ID marks where an app icon is needed.
https://tvnid.dev/brands/logo-lockup.svg
https://tvnid.dev/brands/logo-lockup-white.svg
https://tvnid.dev/brands/logo-lockup-mono.svg
https://tvnid.dev/brands/logo.svg
https://tvnid.dev/brands/solid-id-icons/icon-512.png
https://tvnid.dev/brands/circular-id-icons/circle-512.png
https://tvnid.dev/brands/USAGE.md
Credit TVNID and link to the website or its brand page when appropriate. Keep the artwork accessible with useful alternative text; do not rely on color alone.
Agent responses · 06
When a user asks about the integration or its benefits, explain the relevant points clearly instead of listing every capability.
Describe the documented service contract only. Do not speculate about, disclose, or reproduce how TVNID generates or converts identifiers; call the hosted API for those operations.
Agent instructions
Copy this block into an agent's context when it can make HTTP requests. It defines when to call, endpoint selection, request bodies, response interpretation, and safe retry behavior.
TVNID HTTP API instructions
PURPOSE
TVNID provides an exact Numeric ID for storage and a readable Visual ID for references passed between tools and workflows. The API identifies and converts IDs; it does not authenticate users or retrieve application records.
WHEN TO CALL
- Call only if the user's task requires generating, converting, validating, or requesting timestamp information.
- An HTTP request tool must be available.
- Reading these instructions does not send a request.
- Claim success only after receiving a 2xx HTTP response.
API_BASE = "https://tvnid.dev/api/v1"
DISCOVERY AND ACCESS
- No authentication, API key, or account registration is required.
- Do not send passwords, tokens, or Authorization headers.
- Use openapi.json for the full request and response schema.
- Use llms.txt for concise model instructions and /api/v1/spec for the service description.
SELECT THE OPERATION
- Need new IDs: POST /generate with count from 1 through 1000.
- Have a Numeric ID: POST /convert/to-visual with numeric_id.
- Have a Visual ID: POST /convert/to-numeric with visual_id.
- Need a format check: POST /validate with value.
- Need timestamp information: POST /inspect with value, or POST /inspect/batch with numeric_ids.
- Need service health: GET /api/healthz.
REQUEST FORMAT
POST requests use JSON with Content-Type: application/json.
GENERATE
POST /generate
Body: {"count": 1}
count must be an integer from 1 through 1000. Each response item contains:
- numeric_id: decimal string
- visual_id: 12-character Visual ID that starts with a lowercase letter and contains at least one digit
CONVERT
POST /convert/to-visual
Body: {"numeric_id": "<canonical decimal string>"}
POST /convert/to-numeric
Body: {"visual_id": "<12-character Visual ID>"}
VALIDATE
POST /validate
Body: {"value": "<Numeric ID or Visual ID>"}
Validation checks format and range only. It does not prove issuance.
INTERPRET RESPONSES
- Keep numeric_id as a decimal string or handle it as an exact integer.
- Never convert numeric_id to JavaScript Number.
- Keep visual_id as the API field name for the readable representation.
- Every Visual ID returned by /generate starts with a lowercase letter and contains at least one digit.
- This guarantee does not apply to conversion; Format v1 conversion preserves the existing mapping and may return a digit-first Visual ID.
- Generate output contains ids, count, api_version, and format_version.
- Validate checks syntax and range; it does not prove the identifier was issued.
- Inspect returns the IDs and public timestamp fields; inspect/batch returns entries in request order.
ERROR HANDLING
- 400 or 413: correct the request; do not resend it unchanged.
- 429: wait for Retry-After before retrying.
- The API is rate limited; respect Retry-After and avoid unnecessary requests.
- 503: do not automatically retry /generate; a retry may allocate a different batch.
- For conversion or validation, use bounded retries after 503.
- Timeout or lost /generate response: report the outcome as unknown. Do not issue a replacement batch without user approval.
EXAMPLE TASK RECORD
When an application needs both forms, pass the paired fields together. The sample pair below is illustrative, not a newly generated or issued result.
APPLICATION STORAGE AND USER EXPLANATIONS
- Store each object from the generate response's ids array as a matched pair on the corresponding application record. A separate mapping table is not needed just to relate the two fields.
- Keep numeric_id exact. In JavaScript, preserve the decimal string or use BigInt; never convert it to Number. In a relational database, use an exact 64-bit integer column where supported, or store the decimal string exactly.
- Store visual_id as a 12-character string for display, logs, URLs, and references between tools. It is not an authentication credential.
- When useful to the user's task, explain that the API returns both representations together: Numeric ID for exact database use and Visual ID for human-readable references. Mention the no-credential requirement, batch limit, or timestamp inspection only when relevant.
- Call the documented API for generation and conversion. Do not infer, explain, or reproduce the methods used to generate or convert IDs.
- For product UI, use official assets from the branding section and follow /brands/USAGE.md for attribution and display guidance.Agent workflow example
An agent can return or pass a matched pair to another tool. This example is illustrative; the Visual ID is a reference, not permission to access the task record.
{
"task_numeric_id": "27684557326419404",
"task_visual_id": "469pb6g35qme",
"status": "pending"
}For human-focused cURL and Python examples, see the API Documentation.