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

# Authentication

> Create an API key and authenticate your requests to the Phylo API

<Note>
  The Phylo API is currently in early access. To request access for your
  organization, contact your Phylo representative or
  [Phylo Support](mailto:support@phylo.bio).
</Note>

## Create an API key

A key acts within the workspace it was created in, with your own permissions in
that workspace.

1. In [Biomni Lab](https://biomni.phylo.bio), open **Settings → API Keys**.
2. Click **Create key**, give it a name (e.g. `Batch analysis pipeline`), and
   optionally an expiration.

<Warning>
  Treat your API key like a password. Anyone with it can act as you within that
  workspace.
</Warning>

## Base URL

For the self-serve platform, use:

```
https://api.phylo.bio/v1
```

If you're an Enterprise customer, contact your Phylo representative for your
API base URL.

## Authenticate a request

Send the key as a **bearer token** in the `Authorization` header:

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.phylo.bio/v1/projects \
    -H "Authorization: Bearer $PHYLO_API_KEY"
  ```

  ```python Python theme={null}
  import os, requests

  BASE = "https://api.phylo.bio/v1"
  headers = {"Authorization": f"Bearer {os.environ['PHYLO_API_KEY']}"}

  resp = requests.get(f"{BASE}/projects", headers=headers)
  resp.raise_for_status()
  print(resp.json())
  ```
</CodeGroup>

## Revoke a key

From **Settings → API Keys**, **Revoke** disables a key immediately and
permanently.

Keys can carry an expiration. An expired key stops working automatically.

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/api/quickstart">
    Key → project → task → results, end to end.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/api/errors">
    Status codes, error handling, and retries.
  </Card>
</CardGroup>
