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

CallWhat it does
GET /v1/catalogueFamilies, builds, fields, limits and prices. No key needed.
POST /v1/pickA sheet of the distinct variants of the Open Graph card, $0.10.
POST /v1/buildThe pack as a zip with manifest.json and pack.json, $2.40 for every build.
GET /v1/balanceThe credit left on your key and what it buys.
POST /v1/topupOpens 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/quoteThe price of a top-up with or without a code, nothing bought: {"amountMinor": 2000, "code": "LAUNCH25"}. The key is optional here.
POST /v1/keysMakes a key from a solved proof of work.

The brief

FieldRule
nameRequired. Up to 40 characters. Latin only (Basic Latin and Latin-1); other scripts are refused by the input check.
taglineOptional. Up to 48 characters.
colours1 to 3 colours as #rrggbb; the first is the brand colour.
familyOne of ledger, field, studio, night.
monogramOptional, one or two letters or digits. Derived from the name when absent.
seedOptional, 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.
buildsBuild 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

KeyWhatPrice
cards.ogOpen Graph card, 1200 by 630$0.30
cards.x_cardX card, 1200 by 600$0.30
cards.squareSquare post, 1080 by 1080$0.30
cards.storyStory, 1080 by 1920$0.30
cards.bannerBanner, 1500 by 500$0.30
cards.wideWide card, 1920 by 1080$0.30
iconsIcon set$0.60

Errors

Every error is JSON with an error code and a message to show a person.

StatusCodeMeaning
400bad_inputA field broke a rule; `field` names it and `message` says what to change. Nothing was charged.
400idempotency_key_requiredEvery render needs an Idempotency-Key header.
401invalid_api_keyNo key, or one the server does not know.
402insufficient_creditThe balance is below the price. Top up and retry.
402topup_requiredFree credit covers pick sheets; a key must top up once before it builds a pack.
409request_in_flightThe same request is still running. Retry with the same Idempotency-Key.
422design_refusedA design gate refused the output (for example a name that fits no size). The charge was put back.
422idempotency_key_reusedThe Idempotency-Key was used for a different body.
429engine_busyThe render queue is full. Retry after the Retry-After seconds.
500render_failedThe engine failed. The charge was put back; retry.
501not_implementedThe 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.