flatland API

Hosted API quickstart.

For an existing API key: connect your agent, build a model and check what changes the result.

Looking for the desktop application? Start with flatland desk. Connecting your own agent to desk needs no flatland account or API key; the person reviews proposed changes in desk.

This guide uses the separate hosted client. It keeps model files on your computer and sends the model to the hosted engine for computation. desk computes locally.

Connect your agent.

Use Node.js 22 or later with the published setup package, version 1.4.2, your flatland API key, and Claude Code or Cursor. A desk account is a separate access path; it isn’t an API key. If you need help with your key, write to support.

Setup command
npx flatland-setup@1.4.2 fl_live_YOUR_KEY_HERE

Setup validates the key, configures the detected clients to use the local MCP bridge, and checks the connection. Read its results before continuing. Open a new Claude Code session, or restart Cursor, after setup. To check an existing setup:

Check setup
npx flatland-setup@1.4.2 --verify

For another MCP client, use the published bridge with command npx and arguments ["-y", "flatland-client@0.1.4", "mcp"]. It reads the key saved by setup; you can instead supply FLATLAND_API_KEY through your client’s environment configuration. Keep the key out of prompts and shared configuration.

Build a first model.

Ask your agent to read the tool instructions and create this model. These are three assumptions and two calculated drivers. The result is an annualized run rate from one month’s assumptions, not a twelve-month forecast.

Starter model prompt
Call flatland_init, then create a model named saas_starter.

Add these assumptions:
- price_per_seat: $49 per month
- seats_sold: 200
- monthly_growth_rate: 8%

Add these calculated drivers:
- monthly_revenue = seats_sold * price_per_seat
- annual_revenue = monthly_revenue * 12

Solve the model. Show its formulas and calculated values.
Identify assumptions that are not used in a formula.

Monthly revenue should be $9,800 and the annualized run rate $117,600. The growth assumption is deliberately unused: neither formula refers to it. Changing its value cannot change these results.

Ask the agent to save the model, show its saved location, and reopen it. Inspect the reopened assumptions and formulas before continuing.

Compare a scenario.

Scenario prompt
Run a scenario called more_seats with seats_sold set to 250.
Compare monthly_revenue and annual_revenue against base.
Keep the base assumptions unchanged.

Monthly revenue becomes $12,250, an increase of $2,450. The annualized run rate becomes $147,000, an increase of $29,400. Only the seat count changed; the formulas stayed the same.

Find what changes the result.

Sensitivity prompt
Run sensitivity on annual_revenue in the base scenario.
Perturb each assumption by 20% in each direction,
one assumption at a time. Explain which formulas cause the result.

Moving either price or seats down by 20% gives $94,080; moving either up by 20% gives $141,120. Both have elasticity 1: a 1% change in either produces a 1% change in this result, holding the other assumptions fixed.

Moving monthly growth from 8% to 6.4% or 9.6% leaves annual revenue at $117,600. Its elasticity is 0 because no formula uses it. This says what the model captures, not that growth is unimportant to the business. Connect it to a time-based formula before interpreting its effect.

A repeatable calculation does not establish that the assumptions are true. Inspect what is missing before using the model to decide what to do.

Continue from the model.

Reopen the saved model when an assumption changes. If you want a terminal agent, follow the separate CLI guide. For the desktop application and its own-agent connection, use the desk guide.

For help, email info@flatlandfi.com with the step you reached and the error, leaving out API keys and private model content.