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

# Biohub Platform API

> Get an API key, install the `esm` Python package, and explore the Protein Models, Batch, and ESM Atlas APIs on the Biohub Platform.

The Biohub Platform API gives you programmatic access to hosted protein models, asynchronous batch jobs, and the ESM Atlas.
Every API uses the base URL `https://biohub.ai`.

## Get an API key

The Protein Models API and the Batch API authenticate requests with an API key.
The documentation uses the terms API key and API token interchangeably.

**1. Open the Developer Console**

Go to the [Biohub Platform Developer Console](https://biohub.ai/developer-console/api-keys).

**2. Sign in or create an account**

Sign in with your Biohub account.
If you don't have an account, create one.

**3. Create a key**

Under API Keys, create a new key.
Copy the key and store it somewhere secure, such as the `BIOHUB_API_KEY` environment variable.
Don't paste the key into shared code or chats.

Send the key in an `Authorization: Bearer` header with each HTTP request:

```bash theme={null}
curl https://biohub.ai/api/v1/fold \
  -H "Authorization: Bearer $BIOHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "esmfold2-fast-2026-05", "sequence": "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ"}'
```

## Use the esm Python package

The `esm` package on PyPI is a Python SDK for the Biohub Platform API.
You can call the API directly over HTTP, but the package wraps the endpoints in model clients and adds libraries for working with protein sequences and structures.
The package also requests compact pickle [response formats](https://docs.biohub.ai/api/protein/models/response-formats.md) automatically.

```bash theme={null}
pip install esm
```

Connect a client to the model you want to use and pass your API key as the token:

```python theme={null}
from esm.sdk.forge import ESMCForgeInferenceClient

client = ESMCForgeInferenceClient(model="esmc-6b-2024-12", url="https://biohub.ai", token="<your API key>")
```

For ESMFold2, use `SequenceStructureForgeInferenceClient`.
For ESM3, use `ESM3ForgeInferenceClient`.
See [Get started](https://docs.biohub.ai/learn/getting-started.md) to set up each model and the [Tutorials](https://docs.biohub.ai/learn/tutorials/esmc) for examples.

## Available APIs

> [card] [Protein Models](https://docs.biohub.ai/api/protein/models/overview.md)
>
> Run on-demand inference with ESMC, ESMFold2, and ESM3, including folding, logits and embeddings, encoding, decoding, generation, and inverse folding.

> [card] [Batch API](https://docs.biohub.ai/api/protein/models/batch_overview.md)
>
> Submit large or long-running jobs asynchronously, such as folding inputs up to 4096 tokens, then track progress and retrieve results.

> [card] [ESM Atlas](https://docs.biohub.ai/api/protein/atlas/overview.md)
>
> Query predicted protein structures, clusters, sparse autoencoder (SAE) features, and similarity search through public REST endpoints that don't require an API key.


## Related topics

- [ESM3](https://docs.biohub.ai/models/esm3.md)
- [Biohub MCP folding tools](https://docs.biohub.ai/biohub-mcp/folding-tools.md)
- [ESMFold2](https://docs.biohub.ai/models/esmfold2.md)
- [ESMC](https://docs.biohub.ai/models/esmc.md)
- [FAQ](https://docs.biohub.ai/learn/faq.md)
