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

# API Authentication

> Learn how to authenticate API requests with the Spaceport SDK.

# API Authentication

The SDK supports API key authentication for backend services and server-side applications. When an API key is provided, it will be automatically included in all HTTP requests to v1 API endpoints.

### Environment Setup

First, set up your environment variables in a `.env` file:

```bash theme={null}
# Copy the example file
cp .env.example .env

# Edit .env and add your API key
SDK_API_KEY=your-directus-jwt-token-or-static-api-key
```
