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:

  1. Upload a local file
  2. 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

Request
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

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.

Upload File
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.

File Connector
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: Show me the total number of taxi passengers per day in NYC