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

# Authentication

> All Law4Devs API endpoints require an API key.

## API Key Required

Every request to the Law4Devs API must include a valid API key. Pass it via the `X-API-Key` header:

```bash theme={null}
curl -H "X-API-Key: YOUR_API_KEY" \
  https://api.law4devs.eu/v1/frameworks
```

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    from law4devs import Law4DevsClient

    client = Law4DevsClient(api_key="YOUR_API_KEY")
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import { Law4DevsClient } from 'law4devs';

    const client = new Law4DevsClient({ apiKey: 'YOUR_API_KEY' });
    ```
  </Tab>

  <Tab title="PHP">
    ```php theme={null}
    use Law4Devs\Client;

    $client = new Client(apiKey: 'YOUR_API_KEY');
    ```
  </Tab>
</Tabs>

<Warning>
  Never hardcode your API key in source code. Use environment variables.
</Warning>

## Environment Variables

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    import os
    from law4devs import Law4DevsClient

    client = Law4DevsClient(api_key=os.environ["LAW4DEVS_API_KEY"])
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={null}
    import { Law4DevsClient } from 'law4devs';

    const client = new Law4DevsClient({
      apiKey: process.env.LAW4DEVS_API_KEY!,
    });
    ```
  </Tab>

  <Tab title="PHP">
    ```php theme={null}
    use Law4Devs\Client;

    $client = new Client(apiKey: getenv('LAW4DEVS_API_KEY'));
    ```
  </Tab>
</Tabs>

Get your API key at [law4devs.eu](https://law4devs.eu).
