NewKimi K3.1 Pro is now availableTry it now
Structured Data Extraction

Structured Data Extraction & HTML-to-JSON Inference

Extract clean, strictly typed JSON from messy HTML and long web documents using Inference.net's Schematron V2 Small and Schematron V2 Turbo models. Purpose-trained for schema-first extraction up to 128K tokens with 100% JSON Schema adherence over a standard OpenAI-compatible API.

  • Schema-first extraction: pass Pydantic or Zod schemas via `response_format` with 100% JSON adherence
  • Two tuned tiers: `inference-net/schematron-v2-small` (highest quality) and `schematron-v2-turbo` (highest throughput)
  • Long-context HTML handling up to 128K tokens — robust against noisy real-world markup
  • Scales cleanly from real-time `/v1` extraction to 1M-page JSONL Batch API and Group API webhooks
Capabilities & Specs

Built for production reliability

Technical specifications and benefits for Structured Data Extraction & HTML-to-JSON Inference
CapabilitySpecificationHow it helps
Schematron V2 Small`inference-net/schematron-v2-small`Highest extraction quality approaching frontier-model accuracy on complex schemas.
Schematron V2 Turbo`inference-net/schematron-v2-turbo`Optimized for maximum throughput and lowest per-page extraction cost at scale.
Context windowUp to 128K tokensHandles long, noisy real-world HTML documents without brittle CSS selectors.
Schema adherence100% strict JSON modeStrict JSON Schema enforcement via OpenAI SDK `response_format` (Zod or Pydantic).
Bulk extraction scaleSync, Group, and Batch readyPairs directly with synchronous `/v1`, Group API (50 reqs), or Batch API (1M JSONL).
Quickstart

Extract typed JSON from messy HTML with Zod

Keep temperature at 0 and strip <script>/<style> tags with lxml or an HTML cleaner before sending.

typescript
import OpenAI from "openai";
import { zodResponseFormat } from "openai/helpers/zod";
import { z } from "zod";

const openai = new OpenAI({
  baseURL: "https://api.inference.net/v1",
  apiKey: process.env.INFERENCE_API_KEY,
});

const Product = z.object({
  name: z.string().describe("Exact product title on the page."),
  price: z.number().describe("Primary listed price."),
  tags: z.array(z.string()).describe("Product category tags."),
});

const resp = await openai.chat.completions.parse({
  model: "inference-net/schematron-v2-small",
  temperature: 0,
  messages: [{ role: "user", content: cleanedHtml }],
  response_format: zodResponseFormat(Product, "product"),
});
Documentation & Guides

Guides and references

FAQ

Frequently asked questions.

Quick answers to help you get started

Use `inference-net/schematron-v2-small` when you need the highest extraction accuracy on complex nested schemas or very long pages. Use `inference-net/schematron-v2-turbo` when maximum throughput and lowest cost at scale are the priority.

Get Started

Ship on Inference.net today

Start self-serve with an API key, explore live model pricing, or talk with our team about dedicated capacity and custom SLAs.