Install the esm package
To runesm locally, download the PyPI package. You can also call the API directly over HTTP without it, but the package provides a simpler way to access the API and additional useful libraries.
SequenceStructureForgeInferenceClient, and for ESM3 use ESM3ForgeInferenceClient. See Get started for each model and Tutorials for code snippets that demonstrate how to use the esm SDK.
Operations
Example: send a request
Every operation uses the base URLhttps://biohub.ai and authenticates with your API key in an Authorization: Bearer header. Send a JSON body with Content-Type: application/json.
First, store your API key in the BIOHUB_API_KEY environment variable of your terminal session. Don’t paste the key into shared code or chats. Then send the request. The bash example runs in macOS and Linux terminals. On Windows, use the PowerShell example. PowerShell aliases curl to a different command, so the example calls curl.exe.
- bash
- PowerShell
Response formats
Responses are JSON by default. Most operations also support Python pickle responses, which can reduce payload size for tensors and arrays. Theesm Python SDK requests pickle automatically. See Response formats.
Input limits
Onfold and fold_all_atom, ESMFold2 models accept inputs up to 768 tokens. For inputs up to 4096 tokens, or to run many predictions asynchronously, use Batch folding.