Import your data into Tako using the Tako Connect API to unlock AI-powered analysis and visualization capabilities.
Connect Your Data
Tako supports two methods for bringing your data:
Upload a local file
Connect to a hosted file via URL
Follow the guide below to upload or connect your data with Tako
Upload Local Files via API
First, generate a presigned url using the GET /file_upload_url endpoint. Then you can POST your file to the url
Step 1: Request Upload URL
curl --request GET \
--url 'https://trytako.com/api/v1/beta/file_upload_url?file_name=<your_file_name>' \
--header 'content-type: application/json' \
--header 'x-api-key: <your_api_key>'
Sample Response
{
"url" : "https://tako-byod-files-production.s3.amazonaws.com/" ,
"fields" : {
"Content-Type" : "text/csv" ,
"key" : "byod/10a2b16e-7116-4023-9f0e-d61f99cedd89/<your_file_name>" ,
"x-amz-algorithm" : "" ,
"x-amz-credential" : "" ,
"x-amz-date" : "" ,
"policy" : "" ,
"x-amz-signature" : ""
},
"key" : "byod/10a2b16e-7116-4023-9f0e-d61f99cedd89/<your_file_name>"
}
Step 2: Upload Your File
Use the url and fields from the response to upload your file using a multipart/form-data request.
curl -X POST "https://tako-byod-files-production.s3.amazonaws.com/" \
-F "Content-Type=text/csv" \
-F "key=byod/10a2b16e-7116-4023-9f0e-d61f99cedd89/<your_file_name>" \
-F "x-amz-algorithm=" \
-F "x-amz-credential=" \
-F "x-amz-date=" \
-F "policy=" \
-F "x-amz-signature=" \
-F "file=@/path/to/your/local/file"
Connect External Files via URL
If your data is hosted elsewhere (e.g., S3, Dropbox, Google Drive), you can register it with Tako using the POST /file_connector endpoint.
curl --request POST \
--url https://trytako.com/api/v1/beta/file_connector \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"file_id": "<string>",
"file_url": "<string>"
}'
If the original file is updated , call the file_connector endpoint again with the same file_id and updated file_url to propagate changes to Tako.
Query Tako with Your Data
Once your file is uploaded or connected, use the POST /visualize endpoint to generate insights and visualizations.
In the body, include the file_id from the response of /file_upload_url or /file_connector. Optionally, include a natural language query.
Query: Timeseries graph comparing Tokyo Balls’ and Tako Bell’s monthly revenue (total + tip)
Zero Data Retention (ZDR) Embeds
Zero Data Retention lets you render charts without persisting your data on Tako servers. You send the visualization payload at render time, either via our lightweight widget or by posting directly to the embed endpoint.
How it works
You generate a card via the visualize API as usual and receive a card_id and a visualization_data object.
To render: you either
use the TakoZDREmbed widget to create an iframe and POST the visualization_data for you, or
POST the visualization_data directly to the embed URL with an HTML <form> that targets an <iframe>.
Data is not stored by Tako; it exists only in your request and the user’s browser.
Include the widget in your app (serve the file from your app or a CDN):
< script src = "zdr_embed_widget.js" ></ script >
Create a container where the chart will render:
< div id = "my-zdr-chart" ></ div >
Render using your card_id and visualization_data:
const chart = window . TakoZDREmbed . render ({
containerId: "my-zdr-chart" ,
takoUrl: "https://trytako.com" , // or your self-hosted Tako URL
cardId: "YOUR_CARD_ID" ,
visualizationData: {
viz_config: { /* chart config */ },
data: { /* chart data */ }
},
width: "100%" ,
height: "600px"
});
Full ZDR Embed Widget (copy-paste)
Option B: Direct POST to the embed (no widget)
Use a hidden <form> that posts your visualization_data JSON to the embed endpoint, targeting an <iframe>.
<!-- Replace EMBED_URL_GOES_HERE with your embed URL: e.g. https://trytako.com/embed/<CARD_ID>/ -->
< div style = "margin: 16px 0;" >
< button id = "zdr-render-btn" > Render ZDR Embed </ button >
</ div >
< iframe
name = "zdr-embed-frame"
id = "zdr-embed-frame"
style = "width: 100%; height: 600px; border: none;"
></ iframe >
< form
id = "zdr-embed-form"
method = "POST"
action = "EMBED_URL_GOES_HERE"
target = "zdr-embed-frame"
style = "display: none;"
>
< input
type = "hidden"
name = "visualization_data"
id = "zdr-visualization-data"
value = '{}'
/>
</ form >
< script >
// Paste your visualization_data JSON in the object below
const zdrVisualizationData = {
// viz_config: { /* chart config */ },
// data: { /* chart data */ }
};
document . getElementById ( 'zdr-render-btn' ). addEventListener ( 'click' , function () {
// Set the JSON blob
document . getElementById ( 'zdr-visualization-data' ). value = JSON . stringify ( zdrVisualizationData );
// Submit to render in the iframe
document . getElementById ( 'zdr-embed-form' ). submit ();
});
</ script >
End-to-end flow
Call POST /v1/beta/visualize with your data and query.
Extract card_id and visualization_data from the response.
Render with either the widget or direct form-post approach shown above.