Endpoints
All under https://api.kaleidr.com/inference-api/b2b/v1/. Authenticate with the
platform key (auth & scopes). Streaming endpoints return
text/event-stream (wire contract).
Chat (ai scope)
| Method | Path | Body | Returns |
|---|---|---|---|
| POST | /chat/control/stream | { messages[], location?, map_zoom?, lang?, session_id? } | SSE |
| POST | /chat/summary/stream | { type: "poi" | "building", … } | SSE |
| POST | /chat/button/stream | popup-chat body | SSE |
| POST | /chat/control/route | { places[], profile, raw_query } | JSON route |
| GET | /retrieval/poi/enrich | ?lat&lon&name&category&… | JSON |
Design (design scope)
| Method | Path | Body | Returns |
|---|---|---|---|
| POST | /design/analyze | dataset sample | JSON recommendation (metered) |
| POST | /design/apply-direct | parsed dataset + roles | JSON partial MapSpec |
| GET | /design/styles | — | style catalog |
| GET | /design/samples | — | worked-sample catalog |
| GET | /design/themes | — | theme-pack catalog |
Example
curl -N https://api.kaleidr.com/inference-api/b2b/v1/chat/control/stream \
-H "X-Api-Key: kld_sk_live_…" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{"messages":[{"role":"user","content":"cafes near the Louvre"}]}'
No / bad key → 401. Valid key without the route's scope → 403
(insufficient_scope). Over quota → 429. See Errors.