> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snowleopard.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

This documentation is specific to the [Snow Leopard Playground](https://try.snowleopard.ai/). The Playground is free to use and allows you to get a sense of Snow Leopard. Get started by uploading your own SQLite datafile. See our [FAQ](https://www.snowleopard.ai/faq) for more details on the Playground, supported datatypes etc.

<Note>
  Already an enterprise customer? See [Enterprise documentation](/enterprise/getting-started) for details on how to use Snow Leopard with your AI Agent.
</Note>

To build AI agents on Snow Leopard's Playground APIs you need to:

1. Create [API keys](#authentication) for authentication
2. Get the [Playground Datafile ID](#getting-your-datafile-id) for the SQLite database you want to use with your agent
3. Use our [SDKs or the API](#using-the-api) directly

See below for details.

### Authentication

All API endpoints are authenticated using API Keys, also known as Bearer Tokens.

You can generate a key/token from your [Snow Leopard account](https://auth.snowleopard.ai/account) page.

<Note>
  Generate a [new API Key](https://auth.snowleopard.ai/account/api_keys)
</Note>

### Getting your Datafile ID

<Note>
  Don't have your own data? Use one of our [sample datasets](https://github.com/SnowLeopard-AI/playground_datasets) to get started.
</Note>

To retrieve your datafile id, find the desired SQLite file on [your datafiles page](https://try.snowleopard.ai/datafiles) and click the `Copy ID` button in the `File ID` column. This will copy the file ID, which you can then use in the API calls to fetch live data from the SQLite datafile.

### Using the API

There are currently **multiple ways** of interacting with the Snow Leopard API:

1. Python SDK ([pypi](https://pypi.org/project/snowleopard/))
2. TypeScript SDK ([npm](https://www.npmjs.com/package/@snowleopard-ai/client))
3. REST endpoints

<CodeGroup>
  ```python Python theme={null}
  from snowleopard import SnowLeopardClient

  client = SnowLeopardClient(api_key="{api_key}")
  response = client.retrieve(
      datafile_id="{datafile_id}",
      user_query="How many superheroes are there?"
  )
  print(response.data)
  ```

  ```python Python Async theme={null}
  from snowleopard import AsyncSnowLeopardClient

  async def main():
      client = AsyncSnowLeopardClient(api_key="{api_key}")
      response = await client.retrieve(
          datafile_id="{datafile_id}",
          user_query="How many superheroes are there?"
      )
      print(response.data)
  ```

  ```typescript TypeScript theme={null}
  import { SnowLeopardClient } from '@snowleopard-ai/client';

  const client = new SnowLeopardClient({
      apiKey: 'your-api-key'
  });

  const response = await client.retrieve({
      datafileId: 'your-datafile-id',
      userQuery: 'How many superheroes are there?'
  });

  console.log(response.data);
  await client.close();
  ```

  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.snowleopard.ai/datafiles/{datafile_id}/retrieve \
    --header 'Authorization: Bearer {api_key}' \
    --header 'Content-Type: application/json' \
    --data '{"userQuery": "How many superheroes are there?"}'
  ```
</CodeGroup>
