GridZen · Reviewed 2026-10-09

Decision API quickstart: local development

Run a local account verification request to inspect GridZen’s event contract and starter policy. The example uses synthetic data and local-baseline, which makes no external calls. A country mismatch returns review with score 45 for this onboarding example; this is a development policy result, not a fraud prediction.

Run the local service

Use Python 3.10 or later, install requirements.txt in a virtual environment and run uvicorn app.main:app --reload. Send the example to localhost:8000. Development authentication depends on your local configuration; when a decision key is configured, include X-API-Key. Do not send this development example to an unapproved public or pilot endpoint.

Read the result

The request declares MX and expected_country ID. local-baseline emits identifier_present=true and country_context_match=false. The starter policy adds 45 for the mismatch for this onboarding example. It returns review, risk_score=45 and country_context_mismatch. Trace IDs and timestamps vary on every evaluation.

Next integration step

Use the response reference to handle policy decisions separately from HTTP failures. For real signals, scope an approved adapter, credentials and permitted data with the pilot team. Public documentation does not issue a production API key or imply an open live sandbox.

Need help with the workspace?

Open the help center

GridZen for developers

Build and test your decision workflow

Move from the Decision API contract to an assistant-guided prototype, then review synthetic outcomes before scoping an authorized evaluation.

Public tools provide research and synthetic tests. Real evaluation requires separately approved provider access.

Executable synthetic example

python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/uvicorn app.main:app --reload

# In another terminal:
curl http://localhost:8000/api/v1/decisions/onboarding \
  -H "Content-Type: application/json" \
  -d '{
  "event": "onboarding",
  "subject": {
    "email": "person@example.com"
  },
  "context": {
    "country": "MX",
    "expected_country": "ID",
    "consent_reference": "synthetic-test-1"
  },
  "providers": [
    "local-baseline"
  ]
}'

Selected response fields; trace ID, timestamps, evidence and audit note are omitted here.

{
  "event": "onboarding",
  "decision": "review",
  "risk_score": 45,
  "reason_codes": [
    "country_context_mismatch"
  ],
  "providers_used": [
    "local-baseline"
  ]
}

Try GridZen now

Try free without an account Integration guide

Sources and scope

Based on the alpha contract and source implementation. Live route availability requires separate confirmation.

Continue reading