Share this API

Everything someone needs to call Suelo Casa: the base URL and a curl session they can paste into a terminal.

Public base URL
https://pricepredai.interdataresearch.ai

Try it: copy, paste, run

Creates an account, logs in, creates a 30-day API token (kept in $TOKEN), lists the datasets, reads one dataset's inputs and listings, then predicts a price. It asks for the password instead of putting it in the snippet. Needs curl and python3 (only to read tokens out of the JSON).

BASE_URL=https://pricepredai.interdataresearch.ai
SC_USER=ada                                   # pick a username
read -rsp 'Password (8+ characters): ' SC_PASS; echo

# 1. Create an account (a second run answers 409: already exists)
curl -sS -X POST "$BASE_URL/api/auth/register" \
  -H 'Content-Type: application/json' \
  -d "{\"username\":\"$SC_USER\",\"password\":\"$SC_PASS\",\"name\":\"$SC_USER\"}"

# 2. Log in: a 7-day session token
SESSION=$(curl -sS -X POST "$BASE_URL/api/auth/login" \
  -H 'Content-Type: application/json' \
  -d "{\"username\":\"$SC_USER\",\"password\":\"$SC_PASS\"}" \
  | python3 -c 'import json,sys; print(json.load(sys.stdin)["token"])')

# 3. Create a 30-day API token (shown once; only its hash is stored)
TOKEN=$(curl -sS -X POST "$BASE_URL/api/auth/tokens" \
  -H "Authorization: Bearer $SESSION" \
  -H 'Content-Type: application/json' \
  -d '{"name":"cli","expires_in_days":30}' \
  | python3 -c 'import json,sys; print(json.load(sys.stdin)["token"])')

# 4. Datasets, then one dataset's inputs and listings
curl -sS "$BASE_URL/datasets" -H "Authorization: Bearer $TOKEN"
curl -sS "$BASE_URL/config?dataset=venezuela" -H "Authorization: Bearer $TOKEN"
curl -sS "$BASE_URL/properties?dataset=venezuela" -H "Authorization: Bearer $TOKEN" | head -c 400; echo

# 5. Predict a price
curl -sS -X POST "$BASE_URL/predict" \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"dataset":"venezuela","lat":10.47415,"lon":-66.86117,"operation":0,"property_kind":0,"area_m2":120,"beds":3,"baths":2,"age":26,"parking":2}'

Signed in on the map? Its Share API panel (GET /api/share) gives a ready-made POST /predict curl carrying a token for you. Manage tokens on the Tokens page.

Endpoints

MethodPathAuthWhat it does
POST/api/auth/registerpublicCreate an account (username + password, 8+ characters; optional name and email).
POST/api/auth/loginpublicUsername (or the account's email) + password: a session token and the session cookie.
POST/api/auth/change-passwordBearer tokenChange Password
POST/api/auth/logoutpublicClears the session cookie; an opaque API token sent as the bearer is revoked.
GET/api/auth/meBearer token200 when fully logged in; 401 not_authenticated / password_change_required otherwise.
GET/api/auth/tokensBearer tokenYour API tokens (metadata only; a token can't be shown again).
POST/api/auth/tokensBearer tokenCreate an API token; it is shown once, only its SHA-256 digest is stored.
DELETE/api/auth/tokens/{token_id}Bearer tokenRevoke one of your API tokens.
GET/api/meBearer tokenThe signed-in user and the orgs they belong to (with their role).
PATCH/api/meBearer tokenSet your display name and/or email (you can also sign in with your email; "" clears it).
GET/api/orgsBearer tokenOrganizations you belong to.
POST/api/orgsBearer tokenCreate an organization; you become its owner and admin.
GET/api/orgs/{org_id}Bearer tokenAn organization and its members (members only).
PATCH/api/orgs/{org_id}Bearer tokenRename an organization (admin only).
GET/api/orgs/{org_id}/membersBearer tokenMembers of an organization (members only).
POST/api/orgs/{org_id}/accountsBearer tokenCreate an account for a collaborator, already a member (or admin) of the org (admin only).
DELETE/api/orgs/{org_id}/members/{user_id}Bearer tokenRemove a member from the org and its teams (admin only; not the owner, not yourself).
PATCH/api/orgs/{org_id}/members/{user_id}Bearer tokenChange a member's email (admin only; the owner's only by the owner). 409 if taken.
DELETE/api/orgs/{org_id}/accounts/{account_id}Bearer tokenDelete a member's account (admin only; not the owner, not yourself): they leave the org and
PATCH/api/orgs/{org_id}/accounts/{user_id}Bearer tokenChange a member's email (admin only; the owner's only by the owner). 409 if taken.
POST/api/orgs/{org_id}/teamsBearer tokenCreate a team in an organization (admin only).
GET/api/orgs/{org_id}/teamsBearer tokenTeams of an organization (members only).
POST/api/orgs/{org_id}/teams/{team_id}/membersBearer tokenAssign an org member to a team (admin only).
GET/api/orgs/{org_id}/teams/{team_id}/membersBearer tokenMembers of a team (org members only).
GET/pingpublicLiveness check.
GET/api/tutorialpublicThe tutorial sections as JSON ({id, title, body, video_slot}).
GET/api/admin/summaryBearer tokenUsage over the last `days` days: totals, per-day series, top endpoints and per-user activity.
GET/api/admin/liveBearer tokenWho is active in the last 5 minutes, request rates, and the 50 latest requests.
GET/healthpublicHealth
GET/datasetsBearer tokenSelectable datasets, default first.
GET/configBearer tokenDataset spec for the UI: inputs, labels, popup fields.
GET/propertiesBearer tokenProperties
POST/predictBearer tokenPredict
POST/predict/reasoningBearer tokenPlain-language explanation (deepseek-v4-pro) of an estimate this user just got from
GET/api/sharepublicPublic API base URL + a ready-to-copy curl for POST /predict.

Full request/response schemas: /docs. A guided walkthrough: /tutorial.