Vireo docs
Vireo / Docs / Introduction

Vireo Decide documentation

Everything you need to call Vireo Decide from your application: how the model works, how to authenticate, the full API reference, and practical guides for taking it to production.

Last updated 18 Nov 2026·API version 2026-11-01·
Getting started

Introduction#

Vireo Decide is a decision model. You send it a piece of input, such as a support ticket, an invoice, a product listing or a log line, together with a schema that lists the fields you want back. For every field the model returns a value and a probability that the value is correct.

Unlike a general-purpose language model, Vireo Decide never produces free text. Each field is resolved by scoring the allowed values directly, so the response always conforms to your schema, and all fields in a request are computed in a single parallel pass. In practice this makes it faster and considerably cheaper than generating JSON with an LLM, and the probabilities are calibrated well enough to automate on.

When to use Vireo Decide

  • Classification and routing: ticket triage, intent detection, content moderation, lead qualification.
  • Extraction into fixed fields: pulling dates, amounts, categories or flags out of unstructured text.
  • Scoring: risk levels, priority, sentiment, relevance.

It is not designed for open-ended writing, conversation, summarisation or multi-step planning. For those tasks, use a general-purpose model and consider Vireo Decide for the routing and validation steps around it.

Getting started

Quickstart#

This guide takes you from a new account to a working request. You will need Python 3.9 or later, or Node.js 18 or later.

  1. Create an API keySign in to the Vireo Console and open API keys. Create a key and store it somewhere safe. Keys are only shown once.
  2. Install the SDK
    pip install vireo
    npm install @vireo/sdk
  3. Set your key as an environment variable
    shell
    export VIREO_API_KEY="vr_live_..."
  4. Make your first decision
    from vireo import Vireo
    from pydantic import BaseModel
    from typing import Literal
    
    class Triage(BaseModel):
        is_refund_request: bool
        urgency: Literal["low", "medium", "high"]
        team: Literal["billing", "support", "sales"]
    
    client = Vireo()
    result = client.decide(
        model="decide-1.2",
        input="I was charged twice for my November invoice. Please refund one.",
        schema=Triage,
    )
    
    print(result.team.value, result.team.p)   # billing 0.93
    import { Vireo } from "@vireo/sdk";
    import { z } from "zod";
    
    const Triage = z.object({
      is_refund_request: z.boolean(),
      urgency: z.enum(["low", "medium", "high"]),
      team: z.enum(["billing", "support", "sales"]),
    });
    
    const client = new Vireo();
    const result = await client.decide({
      model: "decide-1.2",
      input: "I was charged twice for my November invoice. Please refund one.",
      schema: Triage,
    });
    
    console.log(result.team.value, result.team.p); // billing 0.93
    curl https://api.usevireo.dev/v1/decide \
      -H "Authorization: Bearer $VIREO_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "decide-1.2",
        "input": "I was charged twice for my November invoice. Please refund one.",
        "schema": {
          "is_refund_request": { "type": "boolean" },
          "urgency": { "enum": ["low", "medium", "high"] },
          "team": { "enum": ["billing", "support", "sales"] }
        }
      }'
  5. Act on the resultUse the probability to decide whether to proceed automatically. See Confidence thresholds for a recommended approach.
TIP

The Developer plan includes 50M free input tokens each month. Requests made with a vr_test_ key are free and rate limited to 20 requests per second.

Getting started

Authentication#

The API uses bearer token authentication. Include your key in the Authorization header of every request. All requests must be made over HTTPS; plain HTTP requests are rejected.

http
Authorization: Bearer vr_live_8f2c...e41a
Key prefixEnvironmentBilling
vr_live_ProductionBilled per input token
vr_test_DevelopmentFree, limited to 20 requests per second

Scoped keys

Keys can be restricted to specific endpoints, models or IP ranges. We recommend creating a separate key per service so that a leaked key can be revoked without affecting other systems.

WARN

Never expose a live key in client-side code or a public repository. If a key is leaked, revoke it immediately from the Console. We automatically revoke keys that we detect in public GitHub repositories and notify the account owner.

Core concepts

Schemas and decisions#

A schema describes the fields you want back. You can pass a JSON Schema object directly, or let the SDK convert a Pydantic model or Zod object for you. Each field becomes one decision.

Supported field types

TypeJSON SchemaNotes
Boolean{"type": "boolean"}Returns true or false.
Enum{"enum": [...]}Up to 512 options. Option names are used as part of the input, so make them descriptive.
Integer{"type": "integer", "minimum": 0, "maximum": 10}Bounded range required, up to 1,000 values.
Number{"type": "number"}Extracted from the input text. Probability reflects extraction confidence.
Multi-label{"type": "array", "items": {"enum": [...]}}Each option receives an independent probability.
Span{"type": "string", "x-vireo": "span"}Returns a substring of the input, such as a name or order ID.

Field descriptions

Adding a description to a field gives the model additional context and typically improves accuracy by a few points on ambiguous fields. Keep descriptions short and concrete.

schema.json
{
  "urgency": {
    "enum": ["low", "medium", "high"],
    "description": "high = customer cannot use the product or is losing money"
  }
}

A request can contain up to 256 fields. Fields are resolved independently, so adding fields increases cost only through the extra schema tokens, not through additional generation.

Core concepts

Probabilities and calibration#

Every field in a response includes p, the probability that the returned value is correct. A model is calibrated when these probabilities match observed accuracy: across all answers reported at 0.80, roughly 80% should be right.

Vireo Decide is trained with RLCP (reinforcement learning for calibrated prediction), which rewards the model for accurate probabilities rather than only for correct answers. On our internal evaluation suite, its expected calibration error is 1.8%, compared with 9% to 24% for verbalised confidence from general-purpose LLMs.

Full distributions

Set "return_distribution": true to receive the probability of every option, not only the top one. This is useful for ranking, for showing alternatives to a human reviewer, or for combining decisions in your own code.

response.json
"team": {
  "value": "billing",
  "p": 0.93,
  "distribution": { "billing": 0.93, "support": 0.06, "sales": 0.01 }
}
NOTE

Calibration holds on data similar to what the model was trained and evaluated on. If your inputs are unusual, for example very short, heavily abbreviated or in a niche domain, measure calibration on a labelled sample before relying on it. See Evaluating accuracy.

Core concepts

Confidence thresholds#

The most common pattern is to set a threshold per field. Results above the threshold are acted on automatically; results below it are sent to a human or to a fallback system.

python
THRESHOLDS = {"team": 0.90, "urgency": 0.80}

def route(ticket):
    r = client.decide(model="decide-1.2", input=ticket.body, schema=Triage)
    if all(r[f].p >= t for f, t in THRESHOLDS.items()):
        return assign(ticket, team=r.team.value, urgency=r.urgency.value)
    return review_queue.push(ticket, suggestion=r)

Choosing a threshold

  1. Label 300 to 500 representative examples.
  2. Run them through Vireo Decide and record each field's value and probability.
  3. For each candidate threshold, compute two numbers: the share of items that would be automated, and the accuracy of those automated items.
  4. Pick the lowest threshold that meets your accuracy target. Revisit it monthly as you collect more review data.

The Console includes a threshold explorer that draws this curve for you from any evaluation run.

Core concepts

Determinism and versioning#

Given the same model version, input, schema and seed, Vireo Decide returns identical values and probabilities. This makes results easy to cache, test and audit.

Model identifiers come in two forms. A pinned identifier such as decide-1.2-20261101 never changes. An alias such as decide-1.2 points to the latest pinned release of that minor version and may be updated with bug fixes. For production, we recommend pinning.

IdentifierTypeStatus
decide-1.2-20261101PinnedCurrent
decide-1.2AliasPoints to 20261101
decide-1.1-20260715PinnedSupported until 31 May 2027

Deprecated versions remain available for at least six months after the deprecation notice, which is sent by email and listed in the changelog.

API reference

Create a decision#

POSThttps://api.usevireo.dev/v1/decide

Resolves every field in the schema for a single input and returns the values with their probabilities.

Request body

ParameterDescription
modelrequiredstringModel identifier, for example decide-1.2.
inputrequiredstring | objectThe text to decide on, or an object whose string values are concatenated with their keys as headings. Maximum 64,000 tokens.
schemarequiredobjectA map of field names to JSON Schema definitions. Up to 256 fields.
instructionsstringOptional guidance applied to all fields, such as company policy or definitions. Maximum 4,000 tokens.
return_distributionbooleanReturn the probability of every option. Defaults to false.
seedintegerSeed for reproducible results. Defaults to 0.
metadataobjectUp to 16 key-value pairs stored with the request log, useful for tracing. Not used by the model.

Response

200 OK
{
  "id": "dec_01JD8Q4Z7M2N5P",
  "object": "decision",
  "model": "decide-1.2-20261101",
  "created": 1795619234,
  "fields": {
    "is_refund_request": { "value": true,      "p": 0.97 },
    "urgency":           { "value": "high",    "p": 0.81 },
    "team":              { "value": "billing", "p": 0.93 }
  },
  "usage": { "input_tokens": 2047, "schema_tokens": 38 },
  "latency_ms": 108
}
API reference

Create a batch#

POSThttps://api.usevireo.dev/v1/batches

Submits up to 100,000 inputs for asynchronous processing at 50% of the standard price. Batches complete within 24 hours and usually within 30 minutes.

ParameterDescription
modelrequiredstringModel identifier.
schemarequiredobjectShared schema applied to every item.
itemsrequiredarrayObjects with a unique custom_id and an input. Alternatively pass input_file_id for a JSONL upload.
webhook_urlstringHTTPS endpoint that receives a signed batch.completed event.
python
batch = client.batches.create(
    model="decide-1.2",
    schema=Triage,
    items=[{"custom_id": t.id, "input": t.body} for t in tickets],
    webhook_url="https://example.com/hooks/vireo",
)
print(batch.id, batch.status)   # bat_01JD8R... queued
API reference

Retrieve a batch#

GEThttps://api.usevireo.dev/v1/batches/{batch_id}

Returns the status of a batch. When status is completed, the output_file_id can be downloaded as JSONL, one decision per line in the original order.

StatusMeaning
queuedAccepted and waiting for capacity.
runningItems are being processed. progress reports completed and total counts.
completedAll items finished. Failed items are listed in error_file_id.
cancelledCancelled by the user. Completed items are still billed and returned.
API reference

List models#

GEThttps://api.usevireo.dev/v1/models

Returns the models available to your organisation, with their context length, pricing and deprecation date if one has been announced.

200 OK
{
  "data": [
    { "id": "decide-1.2-20261101", "context_tokens": 64000, "input_price_per_m": 0.038, "deprecated_at": null },
    { "id": "decide-1.1-20260715", "context_tokens": 32000, "input_price_per_m": 0.045, "deprecated_at": "2026-11-30" }
  ]
}
API reference

Errors#

Errors use conventional HTTP status codes and return a JSON body with a machine-readable type, a human-readable message and, where relevant, the param that caused the problem.

400 Bad Request
{
  "error": {
    "type": "invalid_schema",
    "message": "Field 'priority' uses type 'string' without enum or span.",
    "param": "schema.priority",
    "request_id": "req_7Hk2Lq9"
  }
}
StatusTypeWhat to do
400invalid_request, invalid_schemaFix the request. Do not retry unchanged.
401authentication_errorCheck that the key is present, valid and not revoked.
403permission_deniedThe key's scope does not allow this endpoint or model.
413input_too_largeShorten the input or split it into several requests.
429rate_limitedRetry after the number of seconds in the Retry-After header.
500, 503server_error, overloadedRetry with exponential backoff. The SDKs do this automatically, up to three times.

Include the request_id when contacting support. It lets us find the request in our logs even when zero data retention is enabled.

API reference

Rate limits#

Limits are applied per organisation and reported on every response through the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.

PlanRequests per secondInput tokens per minuteBatch queue
Developer202M10,000 items
Production2,000400M5M items
EnterpriseCustomCustomCustom

If you expect a sudden increase in traffic, such as a launch or a backfill, contact us at least two business days in advance and we will raise your limits temporarily.

Guides

Migrating from an LLM#

Most teams arrive with a working prompt that asks a general-purpose model to return JSON. Moving that workload to Vireo Decide usually takes a few days and follows the same steps.

  1. Turn the output format into a schemaEvery key your prompt asks for becomes a field. Free-text fields with a small set of realistic values should become enums. Fields that genuinely need generated text, such as a reply draft, should stay with the LLM.
  2. Move instructions into descriptionsDefinitions that apply to a single field go into that field's description. Policies that apply to every field go into instructions.
  3. Run both systems in shadow modeSend production traffic to both for one to two weeks, keep using the LLM's output, and log both results.
  4. Compare against labels, not against the LLMAgreement with the old system is a poor metric if the old system was wrong. Label a sample of disagreements and measure both models against those labels.
  5. Set thresholds and switch overChoose thresholds as described in Confidence thresholds, then route traffic to Vireo Decide. Keep the LLM as a fallback for low-confidence items if that suits your workflow.
Guides

Evaluating accuracy#

Before going live, measure performance on your own data. Public benchmarks rarely reflect the details of a specific workflow.

  • Sample size: 300 labelled examples per field is enough to estimate accuracy within about ±3 points. Use more for rare classes.
  • Representative data: draw examples from recent production traffic rather than hand-picking them.
  • Per-field metrics: report accuracy, calibration error and automation rate at your chosen threshold for each field separately.

Upload a labelled CSV or JSONL file in the Console under Evaluations and the report, including a reliability diagram and threshold curve, is generated automatically.

Guides

Production checklist#

Click items to mark them as done. Your progress is saved in this browser.

  • Pin a model version instead of using an alias.
  • Store the API key in a secrets manager, never in source code.
  • Use a separate scoped key for each service.
  • Handle 429 and 5xx responses with backoff (built into the SDKs).
  • Log request_id and probabilities for every decision.
  • Choose thresholds from a labelled evaluation, not intuition.
  • Route low-confidence items to a review queue or fallback.
  • Set up a usage alert in the Console.
  • Enable zero data retention if your data is sensitive.
Resources

SDKs and libraries#

LanguagePackageInstall
Pythonvireopip install vireo
TypeScript / Node.js@vireo/sdknpm install @vireo/sdk
Gogithub.com/vireo-ai/vireo-gogo get github.com/vireo-ai/vireo-go

All official SDKs handle authentication, retries, timeouts and pagination, and convert native schema types (Pydantic, Zod, Go structs) to JSON Schema. Community libraries for Ruby, Java and Rust are listed on our GitHub organisation.

Resources

Data and security#

  • No training on your data. API inputs and outputs are never used to train or improve our models.
  • Retention. By default, request logs are kept for 30 days for abuse monitoring and debugging. With zero data retention enabled, inputs and outputs are not written to disk.
  • Encryption. TLS 1.2 or later in transit, AES-256 at rest.
  • Compliance. SOC 2 Type II audited annually. A Data Processing Agreement is available for GDPR.
  • Regions. Choose us or eu per project. Requests are processed only in the selected region.

To report a security issue, email security@usevireo.dev. We respond within one business day.

Resources

Changelog#

18 Nov 2026 · decide-1.2-20261101Vireo Decide 1.2 generally available

Added the batch endpoint at 50% of the standard price. Median latency reduced by 31%. Nested list fields are now supported. Expected calibration error improved from 2.4% to 1.8%.

30 Sep 2026Go SDK 1.0

First stable release of vireo-go with struct-tag schema generation.

12 Aug 2026EU region

Projects can now be created in the EU region. Existing projects remain in the US.

15 Jul 2026 · decide-1.1-20260715Vireo Decide 1.1

Context window increased to 32k tokens. Added span fields and return_distribution.