# Python - API Setup

# Initialize API

<span class="rvts6">This examples shows how to create a new instance of the Voxel Farm client Python API.</span>

```python
# Import the Voxel Farm Client Library

from voxelfarm import voxelfarmclient

# The URL for the Voxel Space API
vf_api_url = 'https://vf-api.voxelspace.com'

# Create instance of the Voxel Farm REST API

vf = voxelfarmclient.rest(vf_api_url)
```

# Provide Credentials

<span class="rvts6">This example shows how to provide credentials for API authentication.</span>

```python
# Set credentials

vf_token = os.getenv('VF_USER_TOKEN')
if (vf_token!=None):
    vf.token=vf_token
```

You can copy the token from your profile in the Developer tab, as shown below:

[![image.png](https://help.voxelspace.com/uploads/images/gallery/2025-08/scaled-1680-/29Qimage.png)](https://help.voxelspace.com/uploads/images/gallery/2025-08/29Qimage.png)

# Specify an HTTP proxy

<span class="rvts6">This example shows how to specify an HTTP proxy to be used in all HTTP calls made by the API.</span>

```python
# Use a proxy to debug HTTP requests using Fiddler or similar

proxies = {

  "http": os.getenv('YOUR_PROXY_URL'),

}

# Set the proxy to debug HTTP calls

vf.set_proxy(proxies)
```

# Get CRS from project

<span class="rvts6">This example shows how to retrieve the project's CRS (Coordinate Reference System).</span>

```python
# Get the coordinate system given project ID

result = vf.get_project_crs(project)

if not result.success:

    print(result.error_info)

    exit()

crs = result.crs
```