Get to a running model
Choose Cloud, Desktop, or API, run one complete Grid model, check its output, and prove that a changed input recomputes the result.
Get to a running model
This is the step before either Grid quickstart. Choose one route, run the same small model, and do not move on until the result changes from 79000 to 94800.
The model
Keep this exact source available for the Cloud and Desktop routes:
MODEL "First Run"
DESCRIPTION "One input change with one observable result."
VERSION "1.0.0"
AUTHOR "you@example.com"
TAGS "first-run"
input Revenue = 100000
input TaxRate = 21pct
output NetRevenue = Revenue * (1 - TaxRate)
END MODEL
It has two declared inputs and one declared output. The first expected value is:
NetRevenue = 79000
Cloud
- Open Grid Cloud and sign in to the deployment your organization has provisioned.
- Choose File → New model.
- Choose View → Editor pane or press ⌘</kbd>. The editor is labelled Model source editor.
- Replace the starter text with the complete model above.
- Choose File → Save or press ⌘S.
- Wait for the status area to report Saved · … ready or Live · … ready. Do not treat a spinner or an external-call pending state as success.
- Choose View → Inputs / Outputs. Confirm that
RevenueandTaxRateare inputs andNetRevenueis an output with value79000. - In the source editor, change only
input Revenue = 100000toinput Revenue = 120000, then save again. ConfirmNetRevenue = 94800.
If you cannot sign in or New model is unavailable, stop there: that is an access or deployment-policy problem, not a language problem. Ask the deployment operator for Cloud access.
Desktop
Grid Desktop uses the same workbench commands as Cloud. Launch a Desktop build supplied through your organization's supported distribution channel, then repeat Cloud steps 2–8.
This site does not publish an installer coordinate because a generally available Desktop distribution contract has not been established here. Do not substitute an unverified package or development build.
The success check is still the evaluated output—not merely an open window: the status reaches Saved · … ready or Live · … ready, Inputs / Outputs shows 79000, and the one source change produces 94800.
API
You need a running Grid Server Build, curl, jq, and the public API bearer token from your operator. The public API token is not an admin, connector-ingress, or private Runtime Host credential.
export GRID_URL="http://localhost:3000"
export GRID_TOKEN="replace-with-your-api-token"
First prove that the deployment is ready:
curl --fail-with-body "$GRID_URL/readyz" | jq -e '.status == "ok"'
Deploy the model and reject a response that contains error diagnostics:
curl --fail-with-body \
-H "Authorization: Bearer $GRID_TOKEN" \
-H "Content-Type: application/json" \
-X POST "$GRID_URL/api/models" \
--data-binary '{
"id": "first-run",
"protectedMode": true,
"source": "MODEL \"First Run\"\nDESCRIPTION \"One input change with one observable result.\"\nVERSION \"1.0.0\"\nAUTHOR \"you@example.com\"\nTAGS \"first-run\"\n\ninput Revenue = 100000\ninput TaxRate = 21pct\noutput NetRevenue = Revenue * (1 - TaxRate)\n\nEND MODEL"
}' |
jq -e 'select(
.id == "first-run" and
(.sourceHash | type == "string" and test("^[0-9a-f]{16}$")) and
((.diagnostics // []) | length) == 0 and
(.parseDiagnostic? == null) and
((.declaredInputs // []) | index("Revenue")) != null and
((.declaredOutputs // []) | index("NetRevenue")) != null
) | {id, sourceHash, declaredInputs, declaredOutputs}'
Resolve the first result. jq -e exits nonzero unless the evaluated numeric leaf is exactly 79000:
curl --fail-with-body \
-H "Authorization: Bearer $GRID_TOKEN" \
-H "Content-Type: application/json" \
-X POST "$GRID_URL/api/models/first-run/symbols/resolve" \
--data '{"symbols":["NetRevenue"]}' |
jq -e '.NetRevenue.status == "ready" and .NetRevenue.value.value == 79000'
Change the declared input, then resolve again:
curl --fail-with-body \
-H "Authorization: Bearer $GRID_TOKEN" \
-H "Content-Type: application/json" \
-X PUT "$GRID_URL/api/models/first-run/input" \
--data '{"symbol":"Revenue","value":120000}' |
jq -e '.symbol == "Revenue" and .status == "ready" and .value.value == 120000'
curl --fail-with-body \
-H "Authorization: Bearer $GRID_TOKEN" \
-H "Content-Type: application/json" \
-X POST "$GRID_URL/api/models/first-run/symbols/resolve" \
--data '{"symbols":["NetRevenue"]}' |
jq -e '.NetRevenue.status == "ready" and .NetRevenue.value.value == 94800'
Delete the disposable model when the check passes:
curl --fail-with-body \
-H "Authorization: Bearer $GRID_TOKEN" \
-X DELETE "$GRID_URL/api/models/first-run" |
jq -e '. == true'
For the complete lifecycle, event-stream, and concurrency contract, continue to the Grid API quickstart.
If it fails
| Symptom | What it means | Exact next check |
|---|---|---|
| Cloud or Desktop never reaches a ready status | Save or evaluation failed. The last live model remains the trustworthy state. | Read the source diagnostic and its highlighted span; fix that source before saving again. |
API returns 401 |
The credential does not authorize the public API surface. | Confirm that GRID_TOKEN is the public API token for this deployment. |
API returns 503 |
Node cannot reach Runtime Host, or admission is overloaded. | Inspect the complete /readyz response and Retry-After; do not loop without backoff. |
Deploy response contains parseDiagnostic or error diagnostics |
The source was rejected. | Preserve the diagnostic code, message, span, and snippet instead of replacing it with a generic failure. |
The output stays 79000 |
The input write did not settle or the wrong model was read. | Check the write's requestRev, resolvedRev, and lastError, then resolve first-run again. |
Continue
- New to the product: Grid Quickstart.
- Learning the language: Getting Started.
- Looking for a specific outcome: How do I…?.