documentation

Introduction

Why snaptojson exists, and the one idea it is built on: the schema is the prompt.

snaptojson turns a page into the JSON you asked for. You write a JSON Schema, you send an image, you get data that matches that schema, or a validation report that says which field did not.

There is one endpoint, one signature, and no SDK.

Why it exists

Extraction is the easy part. Every vision model will read a receipt. What nobody wants to maintain is the plumbing around it:

  • a prompt per document type, drifting every time the model changes;
  • a model reply that is almost the shape you asked for;
  • no way to tell "the total was missing" from "the model made the total up";
  • one integration per vendor, each with its own retry, polling and auth.

That plumbing is what snaptojson removes. The schema is the prompt, and it is also the contract the answer is checked against.

The problem, in one paragraph

You have documents (invoices, receipts, statements, forms) and you need fields out of them. Today that means writing prompt text, parsing prose, hoping the model returns JSON, validating it yourself, and doing all of it again for the next document type. The failure mode is quiet: a plausible number in the wrong place.

snaptojson replaces the prompt with a schema, so the model is asked for named fields with declared types, and the answer is validated against the same schema before you ever see it. A value the model invents is reported as a violation. It is never silently returned as data.

What you get

Layer What it does
The core Reads the page, validates the reply against your schema, keeps the result and a hash
The console Who is signed in, plus the playground, schema, delivery and usage around a project
A project key One string, handed over once, sent as Authorization: Bearer s2j_…

You can use the console to try a document before a line of integration exists, and you can use the core without the console at all.

The two ideas worth remembering

A project is a tenant. One schema, one credential, one rate limit, one history.

A snap is one read. It is queued, executed once, and ends COMPLETED or FAILED with a result and its violations. The image is not kept; a hash of it is.

Next

link copied