DocsPlayground

Playground

Design and tune extractions in the dashboard, then copy the setup into code.

The Playground in the dashboard runs extractions without writing any code. Drop in text or images, define a schema or a prompt, pick an engine, and see the structured output plus its exact cost. It is the fastest way to design and tune a schema before wiring the API into your app.

Playground runs are real jobs — they appear in your job history with source: "playground" and are billed the same way as API jobs.

Two modes

  • Schema mode — provide a JSON Schema and get strict, typed JSON back. Best when you know the fields you want.
  • Prompt mode — give a natural-language global_prompt and a target of markdown, plaintext, or schemaless json. Best for summaries, freeform structuring, or exploration.

Whatever you build in the Playground maps one-to-one to the [POST /jobs/create](/docs/api-reference) body, so you can copy a working setup straight into code.

Writing schemas that steer the model

Veralens uses JSON Schema directly — the schema both shapes the output and steers the model. A few rules make extractions dramatically more reliable:

  • Describe every field. description is the primary steering lever. State what the field means, its units, and the exact format you want in plain language (e.g. *"Issue date in ISO format YYYY-MM-DD, date only"*).
  • **Use enum for classification.** For a document type, status, or any closed set, list the allowed values and the model must pick one.
  • **Describe formats — don't rely on pattern.** Validation keywords like pattern, minLength, maxLength, minimum, and multipleOf are stripped before the schema reaches the model. Put format rules in description instead (e.g. *"Exactly 5 digits"*, *"Phone with country code, e.g. +1 555 123 4567"*).
  • **type, properties, items, required, enum, format** are respected and define the structure.
json
{
  "type": "object",
  "properties": {
    "documentType": {
      "type": "string",
      "description": "Classify the document into exactly one of these types.",
      "enum": ["invoice", "receipt", "contract", "form", "letter", "other"]
    },
    "issueDate": {
      "type": "string",
      "description": "Issue date in ISO format YYYY-MM-DD. Date only, no time."
    },
    "lineItems": {
      "type": "array",
      "description": "Each row on the document.",
      "items": {
        "type": "object",
        "properties": {
          "label": { "type": "string", "description": "Item description as printed." },
          "amount": { "type": "number", "description": "Line amount. Dot as decimal separator." }
        }
      }
    }
  },
  "required": ["documentType"]
}

Dates, currencies, and country codes in your output are normalized to ISO 8601, ISO 4217, and ISO 3166 automatically, so you rarely need post-processing for those.

From Playground to production

  1. Iterate on the schema (or prompt) until the output is right.
  2. Note the engine you used — vera-1.0-high for accuracy, vera-1.0-low for cheaper high-volume runs.
  3. Copy the same sources / schema / target shape into a [POST /jobs/create](/docs/api-reference) call.
  4. Add a [webhook_url](/docs/jobs) or a polling loop to collect results.