AI and memory

ai.sandbox.evaluate

Evaluate a supplied fixture against saved or draft automation settings without writing anything. kind routing classifies an email fixture; kind matching scores a receipt against bank candidates; kind document reads a real file exactly as the inbox does (file {filename, mimeType, contentBase64}, up to 2 MB: a receipt, invoice or statement as a PDF, image, office or text document, or an original .eml email, which is classified first): every page is turned into images with logos and signature graphics set aside, read twice with vision and settled by the stronger model when the readings disagree, and checked as the books would take it. It returns the classifier answer, the facts, the vision check, the entry or flags for each document, and the parts read. kind record reads a kept-record file (file as for document, recordKind tax_document, company_document or other) exactly as Tax › Records reads one, with the same pages, model, prompt and schema, and returns its fields, warnings, model, prompt version and parts; for a company record also describesCompany, wouldFill (filled, nothing_new, other_company or needs_admin) and the profile fields it fills or differs on. kind email runs the email-sorting classifier on an email already in the company inbox (messageId), rebuilt from what was stored when it arrived, and returns the new decision with what was decided at the time (example.stored). kind receipt runs the matcher on a receipt entry (entryId) against its current bank and card candidates (draft may also set autoApply). Both accept the same draft model and thresholds as routing and matching. Nothing is saved. Use it to test the pipeline without the dashboard, and to test custom models before saving them.

GETPOST/api/v1/accounting/ai.sandbox.evaluate

Permissions

accounting:read

Who can call it

admin

Retries

Safe to retry: it only reads

MCP

accounting_ai_sandbox_evaluate

Fields

Shape 1: kind: "routing"

  • kind"routing"Required

    Which kind of record or job this is.

  • mailboxKeystring

    at most 40 characters · Default "accounting"

  • fixtureobjectRequired

    No other fields

  • useSavedConfigboolean

    Default true

  • draftobject

    No other fields · Default {}

Shape 2: kind: "matching"

  • kind"matching"Required

    Which kind of record or job this is.

  • fixtureobjectRequired

    No other fields

  • useSavedConfigboolean

    Default true

  • draftobject

    No other fields · Default {}

Shape 3: kind: "document"

  • kind"document"Required

    Which kind of record or job this is.

  • fileobjectRequired

    No other fields

  • documentKindenum
    receiptinvoicecredit_notestatementotherunknown
  • useSavedConfigboolean

    Default true

  • draftobject

    No other fields · Default {}

Shape 4: kind: "record"

  • kind"record"Required

    Which kind of record or job this is.

  • recordKindenumRequired
    tax_documentcompany_documentother
  • fileobjectRequired

    No other fields

Shape 5: kind: "email"

  • kind"email"Required

    Which kind of record or job this is.

  • messageIdstring (ID)Required

    The ID of the related record.

  • useSavedConfigboolean

    Default true

  • draftobject

    No other fields · Default {}

Shape 6: kind: "receipt"

  • kind"receipt"Required

    Which kind of record or job this is.

  • entryIdstring (ID)Required

    The ID of an accounting entry, from entries.list or attention.mine.

  • useSavedConfigboolean

    Default true

  • draftobject

    No other fields · Default {}

Example

curl https://app.getoatmilk.com/api/v1/accounting/ai.sandbox.evaluate \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "routing",
  "fixture": {
    "subject": "example",
    "text": "example",
    "senderDomain": "example",
    "attachmentNames": [
      "Synthetic Ventures Inc."
    ]
  }
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/ai.sandbox.evaluate
curl https://app.getoatmilk.com/api/v1/accounting/ai.sandbox.evaluate \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "routing",
  "fixture": {
    "subject": "example",
    "text": "example",
    "senderDomain": "example",
    "attachmentNames": [
      "Synthetic Ventures Inc."
    ]
  }
}'

More in AI and memory.