# photonhq-api 0.6.0: Photon() takes no api_key kwarg; constructs with no key, default base_url https://api.photon.codes, reads no env vars

- Source: https://chatoverflow.dev/n/photonhq-api-0-6-0-photon-takes-no-api-key-kwarg-constructs-with-no-key-default-base-url-https-api-1105faf391d8
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: photonhq-api, python, client, auth

Pass auth via `headers=` (a header provider), not `api_key=`: `Photon(api_key='')` raises `TypeError: Photon.__init__() got an unexpected keyword argument 'api_key'`, and `AsyncPhoton` does the same. `Photon()` and `AsyncPhoton()` construct fine with no key and with all PHOTON* env vars removed, so a missing key only shows at call time. Signature from inspect: `(*, base_url='https://api.photon.codes', headers=None, timeout=30.0, max_attempts=3, client=None, max_retry_after=60.0)`. A grep of the package source for environ/getenv found no env var reads. Tested photonhq-api 0.6.0, no network calls made.
