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
| Method | Path | Auth | What it does |
|---|---|---|---|
| POST | /api/auth/register | public | Create an account (username + password, 8+ characters; optional name and email). |
| POST | /api/auth/login | public | Username (or the account's email) + password: a session token and the session cookie. |
| POST | /api/auth/change-password | Bearer token | Change Password |
| POST | /api/auth/logout | public | Clears the session cookie; an opaque API token sent as the bearer is revoked. |
| GET | /api/auth/me | Bearer token | 200 when fully logged in; 401 not_authenticated / password_change_required otherwise. |
| GET | /api/auth/tokens | Bearer token | Your API tokens (metadata only; a token can't be shown again). |
| POST | /api/auth/tokens | Bearer token | Create an API token; it is shown once, only its SHA-256 digest is stored. |
| DELETE | /api/auth/tokens/{token_id} | Bearer token | Revoke one of your API tokens. |
| GET | /api/me | Bearer token | The signed-in user and the orgs they belong to (with their role). |
| PATCH | /api/me | Bearer token | Set your display name and/or email (you can also sign in with your email; "" clears it). |
| GET | /api/orgs | Bearer token | Organizations you belong to. |
| POST | /api/orgs | Bearer token | Create an organization; you become its owner and admin. |
| GET | /api/orgs/{org_id} | Bearer token | An organization and its members (members only). |
| PATCH | /api/orgs/{org_id} | Bearer token | Rename an organization (admin only). |
| GET | /api/orgs/{org_id}/members | Bearer token | Members of an organization (members only). |
| POST | /api/orgs/{org_id}/accounts | Bearer token | Create an account for a collaborator, already a member (or admin) of the org (admin only). |
| DELETE | /api/orgs/{org_id}/members/{user_id} | Bearer token | Remove a member from the org and its teams (admin only; not the owner, not yourself). |
| PATCH | /api/orgs/{org_id}/members/{user_id} | Bearer token | Change 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 token | Delete 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 token | Change a member's email (admin only; the owner's only by the owner). 409 if taken. |
| POST | /api/orgs/{org_id}/teams | Bearer token | Create a team in an organization (admin only). |
| GET | /api/orgs/{org_id}/teams | Bearer token | Teams of an organization (members only). |
| POST | /api/orgs/{org_id}/teams/{team_id}/members | Bearer token | Assign an org member to a team (admin only). |
| GET | /api/orgs/{org_id}/teams/{team_id}/members | Bearer token | Members of a team (org members only). |
| GET | /ping | public | Liveness check. |
| GET | /api/tutorial | public | The tutorial sections as JSON ({id, title, body, video_slot}). |
| GET | /api/admin/summary | Bearer token | Usage over the last `days` days: totals, per-day series, top endpoints and per-user activity. |
| GET | /api/admin/live | Bearer token | Who is active in the last 5 minutes, request rates, and the 50 latest requests. |
| GET | /health | public | Health |
| GET | /datasets | Bearer token | Selectable datasets, default first. |
| GET | /config | Bearer token | Dataset spec for the UI: inputs, labels, popup fields. |
| GET | /properties | Bearer token | Properties |
| POST | /predict | Bearer token | Predict |
| POST | /predict/reasoning | Bearer token | Plain-language explanation (deepseek-v4-pro) of an estimate this user just got from |
| GET | /api/share | public | Public API base URL + a ready-to-copy curl for POST /predict. |
Full request/response schemas: /docs. A guided walkthrough: /tutorial.