Read forms into typed fields without a template per layout
Superlinked gives your agent one API to turn invoices and scanned forms into typed fields your system can post.
| field | type | returned |
|---|---|---|
| form_tracking_number | string | "ACME-12345" |
| part_number | string | "PW54667" |
| status_work | string | "See Block 12" |
| block_13a_approved_design_data_checked | boolean | false |
| block_14a_other_regulation_checked | boolean | true |
| signature_date | string | "30 Apr 2008" |
Every reply matched the schema on the first call, tick boxes included
Aviation release certificate
- form_tracking_number
-
"ACME-12345" - part_number
-
"PW54667" - block_13a_approved_design_data_checked
-
false - block_14a_other_regulation_checked
-
true - signature_date
-
"30 Apr 2008" - organization_name
-
"Acme Airplane Company, 110 Aviation Place, Somewhere, OK (PC62)"expected: "Acme Airplane Company"
Block 14a is ticked for another regulation and block 13a is empty; both arrive as booleans. The organization came back with its address attached.
Certificate of analysis
- certified_values[2].element
-
"Chromium (Cr)"expected: "Chromium" - certified_values[2].symbol
-
"Cr" - certified_values[2].mass_fraction_percent
-
17.803 - certified_values[2].expanded_uncertainty_percent
-
0.099 - certified_values[13].coverage_factor_k
-
2.45 - srm_number
-
"SRM 1155a"expected: "1155a"
All 42 certified numbers and all 14 symbols match, and the reference table lower on the page stays out of the answer. The schema asked for element and symbol separately; on all 14 rows the model wrote the printed cell into element and the symbol into symbol, so the name carries the symbol twice. A field description, or one normalization pass after the call, settles it.
Receipt photographed sideways
- merchant
-
"WALMART" - purchase_date
-
"07/25/21" - total
-
7.47expected: 191.13 - subtotal
-
6.97expected: 178.67 - items_sold
-
21expected: 77 - store_address
-
"200 N MAIN ST\nBAYARD WY 84713-129"expected: "2000 N WALNUT ST CAMERON MO 64429"
Schema-valid JSON, invented values. The reply carries a different store’s address and phone, 7.47 for a 191.13 total and 21 items for 77. Rotate the page before the call, or check the total against the lines.
180 of 223 fields exact across all 8 recorded documents, in 9 calls. The 5 documents not shown sit in the evidence record, the weakest being DEI electricity bill, Greece, 2015 at 12 of 22.
One call turns a scanned invoice into JSON your ledger can post
from pathlib import Pathimport jsonfrom sie_sdk import SIEClientclient = SIEClient( api_key="API keysk-sie-…", base_url="https://api.superlinked.com",)schema = json.loads("""schema{ "type": "object", "properties": { "invoice_number": { "type": "string" }, "invoice_date": { "type": "string" }, "customer_id": { "type": "string" }, "amount_due": { "type": "number" }, "currency": { "type": "string" }, "due_date": { "type": "string" } }, "required": ["invoice_number", "invoice_date", "customer_id", "amount_due", "currency", "due_date"]}""")image = {"data": Path(filePNGwolters-kluwer-invoice.pngbrowse).read_bytes(), "format": "png"}result = client.generate( "modelQwen/Qwen3.8-27B-FP8", "Extract the document fields described by the JSON schema. Return only the JSON object.", max_new_tokens=512, images=[image], grammar={"json_schema": schema, "strict": True},)print(json.loads(result["text"]))import { readFile } from 'node:fs/promises';
import { SIEClient } from '@superlinked/sie-sdk';
const client = new SIEClient('https://api.superlinked.com', {
apiKey: 'sk-sie-…',
});
const schema = {
"type": "object",
"properties": {
"invoice_number": { "type": "string" },
"invoice_date": { "type": "string" },
"customer_id": { "type": "string" },
"amount_due": { "type": "number" },
"currency": { "type": "string" },
"due_date": { "type": "string" }
},
"required": ["invoice_number", "invoice_date", "customer_id", "amount_due", "currency", "due_date"]
};
const image = await readFile("wolters-kluwer-invoice.png");
const result = await client.generate(
'Qwen/Qwen3.8-27B-FP8',
"Extract the document fields described by the JSON schema. Return only the JSON object.",
{
maxNewTokens: 512,
images: [image],
grammar: { json_schema: schema, strict: true },
},
);
console.log(JSON.parse(result.text));document_image=$(base64 < 'wolters-kluwer-invoice.png' | tr -d '\n')
curl https://api.superlinked.com/v1/generate/Qwen__Qwen3.8-27B-FP8 \
-H "Authorization: Bearer sk-sie-…" \
-H "Content-Type: application/json" \
-d "{\"prompt\":\"Extract the document fields described by the JSON schema. Return only the JSON object.\",\"max_new_tokens\":512,\"images\":[{\"data\":\"$document_image\",\"format\":\"png\"}],\"grammar\":{\"json_schema\":{\"type\":\"object\",\"properties\":{\"invoice_number\":{\"type\":\"string\"},\"invoice_date\":{\"type\":\"string\"},\"customer_id\":{\"type\":\"string\"},\"amount_due\":{\"type\":\"number\"},\"currency\":{\"type\":\"string\"},\"due_date\":{\"type\":\"string\"}},\"required\":[\"invoice_number\",\"invoice_date\",\"customer_id\",\"amount_due\",\"currency\",\"due_date\"]},\"strict\":true}}"Build the "Doc field extraction" capability into my app using the Superlinked Inference Engine (SIE).
Context
- SIE is an OpenAI-style inference API. Python SDK: `from sie_sdk import SIEClient`; TypeScript: `@superlinked/sie-sdk`.
- Base URL: https://api.superlinked.com (or my regional endpoint). Auth: Bearer key from env `SIE_API_KEY` (never hard-code it).
- Model: Qwen/Qwen3.8-27B-FP8 (SIE primitive: /generate). Keep the model id configurable.
Task
- Input: an uploaded document plus the JSON schema for its fields.
- Behaviour: parse the document, then return fields matching the JSON schema
- Call the selected SIE primitive once per request and map the response into your domain type.
Deliverables
- A typed client wrapper, an application-level function for this task, error handling for timeouts/empty input, and unit tests with a stubbed client.
- Wire it into my existing stack (ask me which framework if unclear) and add a short usage example.{
"amount_due": 3900,
"currency": "USD",
"customer_id": "UCSFD00005",
"due_date": "11 Sep 2016",
"invoice_date": "8/12/2016",
"invoice_number": "000277511"
}- Parses the document before extracting typed fields
Document extraction quality and latency
Deploy your way
Managed Cloud
Full compute toolkit for your agents with zero ops.
- No idle GPUs, pay for what you use
- Fits your stack: SDK, API, CLI, MCP
- Zero lock-in, self-host the same stack
- SOC 2 Type 2, US or EU data residency
no credit card required
Self-host with K8s
Easy & scalable deployment in your own cloud.
- Terraform to your cloud in minutes
- Apache-2.0, same engine as Cloud
- Scales to zero, no bill between jobs
- Per-tenant pools, no noisy neighbors
Deploy SIE to our AWS account with the superlinked/sie/aws Terraform module. Docs: superlinked.com/docs/deploymentDeploy SIE to our GCP project with the superlinked/sie/google Terraform module. Docs: superlinked.com/docs/deploymentDeploy SIE to our Azure AKS cluster via helm install. Requirements: superlinked.com/docs/deployment Run locally
Run the same models on your own machine.
- Runs on NVIDIA GPU or Apple Silicon
- One command, no Docker or cluster
- All 100+ Cloud models, fully offline
- Same SDK and IDs, no code changes
pip install "sie-server[local]" && sie-server servepip install "sie-server[local]" && sie-server serve --device cuda