Docs
Everything the site does, the API does too: send a brief, get a sheet of variants, pick one, build the pack. Your key goes in the Authorization header; every render also needs an Idempotency-Key header, so a retried request is charged once.
curl https://vendorvisuals.com/v1/pick \
-H "Authorization: Bearer $VV_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name":"Halden Coffee","colours":["#1f4d3a","#e9b44c"],"family":"studio","seed":"4127"}' The answer lists the distinct variants, each with its seed and a link to its image. Build the pack of the one you like with the same brief and that seed:
curl https://vendorvisuals.com/v1/build \
-H "Authorization: Bearer $VV_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name":"Halden Coffee","colours":["#1f4d3a","#e9b44c"],"family":"studio","seed":"<seed from the sheet>"}' Keys and credit
There are no accounts. POST /v1/keys makes a key after a small proof of work (POST /v1/pow/challenge gives the puzzle: find a counter whose SHA-256 of tag:counter starts with the stated number of zero bits). The site does this for you.
Keep the key. Save this key now. It is shown once and cannot be recovered: there is no email, no account and no reissue. A lost or stolen key cannot be recovered, and its whole balance is lost with it.
A new key holds 3 free pick sheets. Building a pack needs a key that has topped up at least once (POST /v1/topup, $5 to $500 each; no limit on the balance). Each render is charged before it runs and refunded at once if it fails. A request costs the same whether it is rendered fresh or served from the store of packs already made.
Endpoints
| Call | What it does |
|---|---|
GET /v1/catalogue | Families, builds, fields, limits and prices. No key needed. |
POST /v1/pick | A sheet of the distinct variants of the Open Graph card, $0.10. |
POST /v1/build | The pack as a zip with manifest.json and pack.json, $2.40 for every build. |
GET /v1/balance | The credit left on your key and what it buys. |
POST /v1/topup | Opens a hosted checkout: {"amountMinor": 2000, "acceptTerms": true}. amountMinor is the credit; add "code" to apply a discount code, and the answer carries chargedMinor, what the checkout charges. |
POST /v1/topup/quote | The price of a top-up with or without a code, nothing bought: {"amountMinor": 2000, "code": "LAUNCH25"}. The key is optional here. |
POST /v1/keys | Makes a key from a solved proof of work. |
The brief
| Field | Rule |
|---|---|
name | Required. Up to 40 characters. Latin only (Basic Latin and Latin-1); other scripts are refused by the input check. |
tagline | Optional. Up to 48 characters. |
colours | 1 to 3 colours as #rrggbb; the first is the brand colour. |
family | One of ledger, field, studio, night. |
monogram | Optional, one or two letters or digits. Derived from the name when absent. |
seed | Optional, up to 64 of A to Z, a to z, 0 to 9, . : _ -. A random one is chosen when absent. Same brief and seed, same files. |
builds | Build only: a subset of the build keys below. All of them when absent. |
Loki does no similarity search: assets are original constructions, never a clearance.
Builds
| Key | What | Price |
|---|---|---|
cards.og | Open Graph card, 1200 by 630 | $0.30 |
cards.x_card | X card, 1200 by 600 | $0.30 |
cards.square | Square post, 1080 by 1080 | $0.30 |
cards.story | Story, 1080 by 1920 | $0.30 |
cards.banner | Banner, 1500 by 500 | $0.30 |
cards.wide | Wide card, 1920 by 1080 | $0.30 |
icons | Icon set | $0.60 |
Errors
Every error is JSON with an error code and a message to show a person.
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_input | A field broke a rule; `field` names it and `message` says what to change. Nothing was charged. |
| 400 | idempotency_key_required | Every render needs an Idempotency-Key header. |
| 401 | invalid_api_key | No key, or one the server does not know. |
| 402 | insufficient_credit | The balance is below the price. Top up and retry. |
| 402 | topup_required | Free credit covers pick sheets; a key must top up once before it builds a pack. |
| 409 | request_in_flight | The same request is still running. Retry with the same Idempotency-Key. |
| 422 | design_refused | A design gate refused the output (for example a name that fits no size). The charge was put back. |
| 422 | idempotency_key_reused | The Idempotency-Key was used for a different body. |
| 429 | engine_busy | The render queue is full. Retry after the Retry-After seconds. |
| 500 | render_failed | The engine failed. The charge was put back; retry. |
| 501 | not_implemented | The engine is not live on this deployment. |
The manifest
Every pack holds manifest.json: the engine and catalogue versions, every file with its size and BLAKE3 hash, and the Merkle root of each Loki build. pack.json records the brief and seed. provenance/ holds each build exactly as the engine wrote it. This excerpt is from the manifest of VendorVisuals' own identity pack:
{
"engine": {
"name": "loki",
"semantics": 1,
"version": "0.1.0"
},
"recipe": {
"blake3": "4dc539a242c4bda075a9c19ef6d473806b596722215188794eb9ecad9b991258",
"name": "brand/vendorvisuals/a/identity"
},
"merkle": {
"alg": "rfc9162-blake3",
"leaves": 37,
"root": "115e0209475843b0f83b2879708d4eb461c5a5774323c731611eaaecf6e67b71"
},
"files": [
{
"path": "og.png",
"bytes": 47073,
"media": "image/png",
"blake3": "80dc7978e2898c6c6847469e5d72aa744ad74079160c4a4c7074a6261b3d1751"
}
]
} Checking a pack
Hash each file with BLAKE3 and compare it with its line in manifest.json. With the Loki engine, loki verify provenance/<build> --rebuild rebuilds a build from its recipe, seed and bindings and compares every byte and the Merkle root. A pack changed after it was made fails one of the two.