Generate protein language model embeddings for ML tasks
Generate high-dimensional protein embeddings using Meta's ESM-2 language model. These embeddings capture structural and functional information for downstream machine learning tasks like classification, clustering, and similarity search.
/v1/proteins/embeddingsimport requests
import numpy as np
API_KEY = "sk-sci-your-key-here"
url = "https://scirouter.ai/v1/proteins/embeddings"
response = requests.post(url, json={
"sequence": "MKFLILLFNILCLFPVLAADNHGVS..."
}, headers={"Authorization": f"Bearer {API_KEY}"})
data = response.json()
embedding = np.array(data["embedding"])
print(f"Embedding shape: {embedding.shape}") # (768,)Protein function prediction
Protein family clustering
Similarity search at scale
Transfer learning for custom models