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 a schema that gets what you want

Veralens uses JSON Schema directly. The schema is both the shape of the output and the instruction. A few rules make extractions dramatically more reliable:

  • Describe every field. description is your strongest control. State what the field means, its units, and the exact form 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 you get one of them back.
  • **Describe string formats in description, not in pattern.** pattern, minLength and maxLength are not enforced. Put the rule in description instead (e.g. "Exactly 5 digits").
  • Numeric constraints are guarantees. multipleOf, minimum and maximum hold on the value you receive, so multipleOf: 0.01 reliably pins money to two decimals.
  • format does real work.** Decoded QR codes and barcodes, ISO dates, ISO country and currency codes, E.164 phones, checksum-verified IBANs. See Schemas & formats for the full table.
  • 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 are normalized to ISO 8601, ISO 4217, and ISO 3166, so you rarely need post-processing for those. A value that does not resolve comes back exactly as printed rather than guessed. Full list in Schemas & formats.

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.