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

# Quickstart

> Get started quickly with the OcularAI SDK to download your datasets

# Quickstart Guide

This guide will help you quickly incorporate your OcularAI dataset exports into your Vision-Language Model (VLM) training workflow.

## Prerequisites

* Python 3.7+
* A valid OcularAI API key
* Access to at least one workspace on the OcularAI platform

## Step 1: Navigate to OcularAI Foundry

To get started, navigate to the OcularAI Foundry platform, select the required version to incorporate in your work environment.

<img src="https://mintcdn.com/ocularai/FeaFuA3bMytYuXie/images/canvas/approve-all.png?fit=max&auto=format&n=FeaFuA3bMytYuXie&q=85&s=44be12de844abe0cc075971a26d1ea0d" alt="OcularAI Foundry Version Selection" width="534" height="124" data-path="images/canvas/approve-all.png" />

main version page to show user how to create a export from a version

## Step 2: Create an Export

Click on the create export button and navigate to the previous exports tab to select the required export.

<img src="https://mintcdn.com/ocularai/FeaFuA3bMytYuXie/images/canvas/approve-all.png?fit=max&auto=format&n=FeaFuA3bMytYuXie&q=85&s=44be12de844abe0cc075971a26d1ea0d" alt="OcularAI Foundry Version Selection" width="534" height="124" data-path="images/canvas/approve-all.png" />

create export page to show user how he can create a export

You'll get a customized snippet that you can use to download the dataset.

## Step 3: Get Your API Key

Configure your API key from OcularAI Foundry platform by navigating to:

**Workspace settings / developers console / API keys**

<img src="https://mintcdn.com/ocularai/FeaFuA3bMytYuXie/images/canvas/approve-all.png?fit=max&auto=format&n=FeaFuA3bMytYuXie&q=85&s=44be12de844abe0cc075971a26d1ea0d" alt="OcularAI Foundry Version Selection" width="534" height="124" data-path="images/canvas/approve-all.png" />

API keys page to show , how to create a api key

## Step 4: Install the SDK

Install the OcularAI SDK using pip:

```bash theme={null}
pip install ocular-ai
```

## Step 5: Download Your Dataset

Here's a simple example of how to download a dataset using the SDK:

```python theme={null}
from ocular import Ocular

# Initialize the SDK with your API key
ocu = Ocular(api_key="YOUR_API_KEY")

# Access your workspace and project
project = ocu.workspace("WORKSPACE_ID").project("PROJECT_ID")

# Get a specific version
version = project.version("VERSION_ID")

# Get an export and download the dataset
export = version.export("EXPORT_ID")
dataset = export.download()

# The dataset variable contains the path to the downloaded dataset
print(f"Dataset downloaded to: {dataset}")
```

You can find the specific IDs for your workspace, project, version, and export in the OcularAI Foundry platform.

## Alternative: Using Direct Download

If you prefer, you can also use cURL to download your dataset directly:

```bash theme={null}
curl -L "https://api.useocular.com/api/v1/versions/{version_id}/exports/{export_id}" \
     -o export.zip && \
     unzip export.zip && \
     rm export.zip
```

Replace `{version_id}` and `{export_id}` with your specific IDs.

<Tip>
  Store your API key in environment variables to avoid hardcoding it in your scripts. The SDK will automatically look for the `OCULAR_API_KEY`  environment variable.
</Tip>
