Skip to main content
The Protein Models API runs inference on ESMC, ESMFold2, and ESM3. For larger or longer-running workloads, use the Batch API.

Install the esm package

To run esm 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.
To begin using the esm package, create an API key and connect to the model you want to use:
For ESMFold2 use 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

Send a JSON body with Content-Type: application/json and authenticate with your API key:
See each operation’s page for its request fields and response schema.

Response formats

Responses are JSON by default. Most operations also support Python pickle responses, which can reduce payload size for tensors and arrays. The esm Python SDK requests pickle automatically. See Response formats.

Input limits

On fold 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.

On-demand or batch