File size: 837 Bytes
c20940d
8ab4ff2
 
 
 
c20940d
8ab4ff2
 
 
 
 
 
 
 
c20940d
 
8ab4ff2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: Carbon Protein Folding API
emoji: 🧬
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
fullWidth: true
tags:
  - biology
  - protein-folding
  - esmfold
  - fastapi
  - carbon
---

# Carbon Protein Folding API

FastAPI service for the Carbon DNA-to-Structure demo. The first live backend is ESMFold for single-chain protein folding.

## Endpoints

- `GET /health`
- `GET /tools`
- `POST /jobs`
- `GET /jobs/{job_id}`

`POST /jobs` accepts one protein entity and returns immediately with a `job_id`. Poll `GET /jobs/{job_id}` until the job reaches `succeeded` or `failed`.

## Configuration

Set these Space variables/secrets:

```sh
FOLD_BACKEND=esmfold
FOLD_API_TOKEN=...
MAX_PROTEIN_AA=400
```

For local CPU tests, use:

```sh
FOLD_BACKEND=stub uvicorn folding_api_service.app:app --host 0.0.0.0 --port 7860
```