What Thin-Viz does
POST https://tako.com/api/v1/thin_viz/create/ turns your own data into an interactive, embeddable Tako card. One call, one card: you post an array of components, and the response gives you embed_url, image_url, and webpage_url.
- Base URL:
https://tako.com/api/ - Auth: send your API key in the
X-API-Keyrequest header (not a bearer token). Create a key in the Tako console.
Install
Minimal working example
A single line chart. SetTAKO_API_KEY and run.
card_id, title, description, embed_url, image_url, webpage_url, and card_type.
Request fields (CreateCardRequest)
Each entry in
components is a ComponentConfig: component_type (from the enum below) + a free-form config object (plus optional component_variant).
Component types
These are the validcomponent_type values (ComponentTypeEnum):
header · generic_timeseries · categorical_bar · data_table_chart · financial_boxes · table · timeline · pie · histogram · scatter · bubble · choropleth · heatmap · boxplot · treemap · waterfall · sankey · marimekko · person_card · top_level_metric
See the Overview for a worked config example of each.
For stock-style cards, use
generic_timeseries with show_kicker_boxes: true (each dataset with a kicker renders a box above the chart). stock_boxes appears in older examples but is not a ComponentTypeEnum value — prefer generic_timeseries + show_kicker_boxes.Data shapes — know which one a component wants
Most components takedatasets, but a few take a different shape. Getting this wrong is the most common error:
Embedding the card
Drop the returnedembed_url into an iframe (add ?dark_mode=true/false to theme it). For full embedding guidance — dynamic resizing, theme matching, glanceable mode — see Embedding Knowledge Cards.
Preview images (ZDR cards)
ZDR cards don’t persist visualization data, so they have no standing preview image. Setimage_ttl_minutes (1–1440) at creation to get a temporary image_url. Customize it with query params: dark_mode, width, height, hideFooter. After the TTL expires the image endpoint returns 410 Gone. (image_ttl_minutes is ignored for standard cards, which already have persistent images.)
Tips & errors
- Gzip large payloads. For request bodies over ~1 MB, gzip the body (
Content-Encoding: gzip) — Thin-Viz accepts it and it compresses well (up to ~10×). - Auth:
X-API-Keyheader, not a bearer token.
{ "error": "..." } body: