Skip to content

Quickstart

This guide walks you through creating a dataset, adding a table, inserting data, and running your first query.

  1. Set up your API token

    Export your token as an environment variable:

    Terminal window
    export API_TOKEN="cat_tok_..."
  2. Get your team ID

    Get your teams

    Terminal window
    curl https://api.catalyzed.ai/teams \
    -H "Authorization: Bearer $API_TOKEN"

    Note the teamId from the response.

  3. Create a dataset

    Create dataset

    Terminal window
    curl -X POST https://api.catalyzed.ai/datasets \
    -H "Authorization: Bearer $API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "teamId": "YOUR_TEAM_ID",
    "name": "My First Dataset"
    }'

    Note the datasetId from the response.

  4. Create a table

    Create table

    Terminal window
    curl -X POST https://api.catalyzed.ai/dataset-tables \
    -H "Authorization: Bearer $API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "datasetId": "YOUR_DATASET_ID",
    "tableName": "users",
    "fields": [
    {"name": "id", "arrowType": "utf8", "nullable": false},
    {"name": "name", "arrowType": "utf8", "nullable": false},
    {"name": "email", "arrowType": "utf8", "nullable": false},
    {"name": "created_at", "arrowType": "timestamp", "nullable": false}
    ],
    "primaryKeyColumns": ["id"]
    }'

    Note the tableId from the response.

  5. Insert data

    Insert rows

    Terminal window
    curl -X POST "https://api.catalyzed.ai/dataset-tables/YOUR_TABLE_ID/rows?mode=append" \
    -H "Authorization: Bearer $API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '[
    {"id": "1", "name": "Alice", "email": "[email protected]", "created_at": "2024-01-15T10:00:00Z"},
    {"id": "2", "name": "Bob", "email": "[email protected]", "created_at": "2024-01-15T11:00:00Z"},
    {"id": "3", "name": "Charlie", "email": "[email protected]", "created_at": "2024-01-15T12:00:00Z"}
    ]'
  6. Query your data

    Query the table

    Terminal window
    curl -X POST https://api.catalyzed.ai/queries \
    -H "Authorization: Bearer $API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "sql": "SELECT * FROM users ORDER BY created_at DESC",
    "tables": {"users": "YOUR_TABLE_ID"}
    }'

You’ve created a dataset, table, and run your first query! Here’s what to explore next:

  • Tables - Learn about schemas, indexes, and advanced querying
  • Files - Upload CSV, JSON, or PDF files for processing
  • Pipelines - Automate workflows with AI-powered pipelines
  • API Reference - Explore all available endpoints