Skip to main content

Quickstart

Get started with CHRT API in under 5 minutes. This guide will walk you through creating your account, generating API keys, and making your first API call.

Step 1: Create Your Account

  1. Visit chrt.com and click “Sign Up”
  2. Verify your email address
  3. Complete your profile setup

Step 2: Generate API Keys

Keep your secret keys secure! Never expose them in client-side code or public repositories.

Understanding Key Types

CHRT uses two types of API keys:

Public Keys

chrt_pk_…
  • Safe for browser use
  • Origin-restricted
  • Limited scopes

Secret Keys

chrt_sk_…
  • Server-to-server only
  • Full access to scopes
  • One-time reveal

Create Your First Key

  1. Navigate to your Dashboard
  2. Click “Create API Key”
  3. Configure your key:
{
  "name": "My First Key",
  "type": "secret",
  "environment": "test",
  "scopes": ["enc.tiles:read", "interact.identify:read"],
  "description": "Testing CHRT API integration"
}
Start with test keys for development, then create live keys for production.

Step 3: Make Your First API Call

Fetch Chart Tiles

The most common use case is fetching chart tiles for display:
curl "https://nmixhdvexhgizmxlnhqi.supabase.co/functions/v1/validate-api-key" \
  -H "Authorization: Bearer chrt_sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "chrt_sk_test_...",
    "requiredScopes": ["enc.tiles:read"],
    "clientIp": "192.168.1.1",
    "origin": "https://myapp.com"
  }'

Test Interactive Features

Try the chart interaction API:
const response = await chrt.interact.identify({
  lat: 37.7749,
  lng: -122.4194,
  zoom: 12
});

console.log('Chart features:', response.features);

Step 4: Explore Core Features

Now that you have a working setup, explore what CHRT can do:

Next Steps

1

Set Up Development Environment

Install the CHRT SDK for your preferred language
2

Configure Authentication

Learn about API key scopes and restrictions
3

Build Your First Feature

Follow our guides to implement common use cases
4

Go to Production

Create live API keys and deploy your application

Need Help?