# RFdiffusion

RFdiffusion is a protein structure generation tool based on diffusion models. It can efficiently design novel protein backbones under various constraints, and supports functional segment embedding, protein complex design, and symmetrical protein construction. It helps researchers quickly explore the protein folding space and generate novel structures and functions that do not exist in nature.

## 基础信息

| 项目 | 值 |
|------|-----|
| Base URL | `https://sciminer.tech/console/api` |
| API Endpoint | `/v1/internal/tools/invoke` |
| Content-Type | `application/json` |
| Authentication | `X-Auth-Token: <YOUR_API_KEY>` |

## 1. Partial Diffusion Gpu

**Tool Name:** `partial_diffusion_gpu_partial_diffusion_gpu_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `input_pdb` | `file` | ✓ | Input protein structure file (PDB/mmCIF) whose backbone will be partially redesigned (required)<br/>file suffix: `pdb`, `cif` |  |
| `diffused_residues` | `string` | ✓ | Residue ranges to be structurally modified, selected with the residue-selection plugin. Format: 'ChainID: start-end; ...' (e.g. 'A: 1-172; B: 1-18,30-34') |  |
| `partial_T` | `number` | ✗ | Number of diffusion steps (1-50). A higher value introduces greater structural variation |  |
| `num_designs` | `number` | ✗ | Number of design results to generate (i.e. how many distinct designs will be output). Only the first 100 designs are shown in the result viewer and bundled into the zip |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFdiffusion",
    "tool_name": "partial_diffusion_gpu_partial_diffusion_gpu_post",
    "parameters": {
    "input_pdb": "<INPUT_PDB_FILE_ID>",
    "diffused_residues": "<DIFFUSED_RESIDUES>",
    "partial_T": 10,
    "num_designs": 10
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 2. Binder Design Gpu

**Tool Name:** `binder_design_gpu_binder_design_gpu_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `noise_scale_ca` | `select` | ✗ | Noise scale for backbone CA positions during diffusion. '0' = higher precision, '1' = more diversity | `0`, `1` |
| `noise_scale_frame` | `select` | ✗ | Noise scale for local residue frames during diffusion. '0' = higher precision, '1' = more diversity | `0`, `1` |
| `input_pdb` | `file` | ✓ | Target protein structure file (PDB/mmCIF) to design a binder against (required)<br/>file suffix: `pdb`, `cif` |  |
| `diffused_residues` | `string` | ✗ | Residue ranges for structural redesign, selected with the residue-selection plugin. Format: 'ChainID: start-end' (e.g. 'B: 1-14'). Needed when constraining the secondary structure of target-chain segments |  |
| `peptide_helix` | `string` | ✗ | Peptide segment to adopt a helical structure (inpaint_str_helix), selected with the residue-selection plugin. Format: 'ChainID: start-end' (e.g. 'B: 1-14') |  |
| `peptide_strand` | `string` | ✗ | Peptide segment to adopt a beta-strand structure (inpaint_str_strand), selected with the residue-selection plugin. Format: 'ChainID: start-end' (e.g. 'B: 1-14') |  |
| `peptide_loop` | `string` | ✗ | Peptide segment to rebuild as a loop or coil (inpaint_str_loop), selected with the residue-selection plugin. Format: 'ChainID: start-end' (e.g. 'B: 1-14') |  |
| `target_chains` | `string` | ✗ | Chain IDs of the target protein (e.g. 'A,B') |  |
| `hotspot_res` | `string` | ✗ | Hotspot residues on the target protein, selected with the residue-selection plugin. Format: 'ChainID: residue numbers' (e.g. 'A: 56,62,78') |  |
| `binder_length` | `string` | ✓ | Desired binder length range (e.g. '70-150') |  |
| `num_designs` | `number` | ✗ | Number of designs to generate |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFdiffusion",
    "tool_name": "binder_design_gpu_binder_design_gpu_post",
    "parameters": {
    "noise_scale_ca": "<NOISE_SCALE_CA>",
    "noise_scale_frame": "<NOISE_SCALE_FRAME>",
    "input_pdb": "<INPUT_PDB_FILE_ID>",
    "diffused_residues": "<DIFFUSED_RESIDUES>",
    "peptide_helix": "<PEPTIDE_HELIX>",
    "peptide_strand": "<PEPTIDE_STRAND>",
    "peptide_loop": "<PEPTIDE_LOOP>",
    "target_chains": "<TARGET_CHAINS>",
    "hotspot_res": "<HOTSPOT_RES>",
    "binder_length": "<BINDER_LENGTH>",
    "num_designs": 10
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 3. Motif Scaffolding Design Gpu

**Tool Name:** `motif_scaffolding_design_gpu_motif_scaffolding_design_gpu_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `input_pdb` | `file` | ✓ | Input structure file (PDB/mmCIF) containing the motif (and target protein) to scaffold (required)<br/>file suffix: `pdb`, `cif` |  |
| `motif_fragment` | `string` | ✓ | Motif to preserve during design, selected with the residue-selection plugin. Format: 'ChainID: start-end; ...' (e.g. 'A: 1-172; B: 1-18,30-34') |  |
| `scaffold_template` | `string` | ✓ | Scaffold template defining linker and motif layout (e.g. 'B: 0-70/m1/0-70'), where m1/m2... refer to motifs in the order they appear in motif_fragment |  |
| `target_protein` | `string` | ✗ | Fixed target region during design, selected with the residue-selection plugin. Format: 'ChainID: start-end' (e.g. 'A: 1-172'). Only use for chains that are completely fixed and contain no motif |  |
| `substrate_molecule` | `string` | ✗ | Substrate molecule for enzyme design (e.g. 'LLK'). Providing it switches the task to enzyme design |  |
| `design_length` | `string` | ✗ | Total sequence length range of the designed scaffold (e.g. '40-90') |  |
| `num_designs` | `number` | ✗ | Number of designs to generate |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFdiffusion",
    "tool_name": "motif_scaffolding_design_gpu_motif_scaffolding_design_gpu_post",
    "parameters": {
    "input_pdb": "<INPUT_PDB_FILE_ID>",
    "motif_fragment": "<MOTIF_FRAGMENT>",
    "scaffold_template": "<SCAFFOLD_TEMPLATE>",
    "target_protein": "<TARGET_PROTEIN>",
    "substrate_molecule": "<SUBSTRATE_MOLECULE>",
    "design_length": "<DESIGN_LENGTH>",
    "num_designs": 10
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 4. Peptide Design Gpu

**Tool Name:** `peptide_design_gpu_peptide_design_gpu_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `design_cyclic_peptide` | `select` | ✗ | Whether to design the peptide as a cyclic (circular) structure | `True`, `False` |
| `input_pdb` | `file` | ✗ | Optional target protein structure file (PDB/mmCIF). Provide it when designing a peptide binder against a target<br/>file suffix: `pdb`, `cif` |  |
| `target_chains` | `string` | ✗ | Target protein chain IDs. Must be provided together with hotspot residues (e.g. 'A') |  |
| `hotspot_res` | `string` | ✗ | Hotspot residues on the target protein, selected with the residue-selection plugin. Format: 'ChainID: start-end; ...' (e.g. 'A: 1-172; B: 1-18,30-34') |  |
| `peptide_length` | `string` | ✓ | Length range of the designed peptide (e.g. '70-150'). Multiple peptides: one range per line |  |
| `num_designs` | `number` | ✗ | Number of designs to generate |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFdiffusion",
    "tool_name": "peptide_design_gpu_peptide_design_gpu_post",
    "parameters": {
    "design_cyclic_peptide": "<DESIGN_CYCLIC_PEPTIDE>",
    "input_pdb": "<INPUT_PDB_FILE_ID>",
    "target_chains": "<TARGET_CHAINS>",
    "hotspot_res": "<HOTSPOT_RES>",
    "peptide_length": "<PEPTIDE_LENGTH>",
    "num_designs": 10
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 5. Symmetric Oligomer Design Gpu

**Tool Name:** `symmetric_oligomer_design_gpu_symmetric_oligomer_design_gpu_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `symmetry_type` | `select` | ✓ | Type of symmetry to design (cyclic, dihedral, or polyhedral) | `c2`, `c3`, `c4`, `c6`, `d2`, `d4`, `tetrahedral` |
| `design_length` | `number` | ✓ | Length of one monomeric subunit. Total sequence length will be this value times the number of symmetric subunits |  |
| `num_designs` | `number` | ✗ | Number of designs to generate |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFdiffusion",
    "tool_name": "symmetric_oligomer_design_gpu_symmetric_oligomer_design_gpu_post",
    "parameters": {
    "symmetry_type": "<SYMMETRY_TYPE>",
    "design_length": "",
    "num_designs": 10
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## 6. Unconditional Generate Gpu

**Tool Name:** `unconditional_generate_gpu_unconditional_generate_gpu_post`

**Method:** `POST`

### 参数

| 参数名 | 类型 | 必需 | 说明 | 枚举值 |
|--------|------|------|------|--------|
| `design_type` | `select` | ✗ | Design mode: 'MonomerDesignBase' (plain generation), 'MonomerDesignROG' (radius-of-gyration guiding potential), 'MonomerDesignContacts' (intra-monomer contacts guiding potential) | `MonomerDesignBase`, `MonomerDesignROG`, `MonomerDesignContacts` |
| `design_length` | `string` | ✓ | Length range of the generated backbone, e.g. '120-150' |  |
| `num_designs` | `number` | ✗ | Number of designs to generate |  |

### 示例代码

#### Python

```python
import requests

BASE_URL = "https://sciminer.tech/console/api"
API_KEY = "<YOUR_API_KEY>"
endpoint = "/v1/internal/tools/invoke"

# If the invoked API includes FILE-type parameters, upload the file first to obtain a `file_id`,
# then fill the corresponding field in `parameters` with the returned `file_id`.
# File upload example (form-data, parameter name is `file`):

# files = {'file': open('path/to/your_file.ext', 'rb')}
# upload_url = f"{BASE_URL}/v1/internal/tools/file"
# resp_upload = requests.post(upload_url, files=files, headers={"X-Auth-Token": f"{API_KEY}"}, timeout=60)
# resp_upload.raise_for_status()
# file_id = resp_upload.json().get("file_id")
# print(f"File uploaded successfully, file_id: {file_id}")
# # Then set the `file_id` in the corresponding field of `payload['parameters']`, for example: payload['parameters']["your_file_param_name"] = file_id

headers = {
    "X-Auth-Token": f"{API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "provider_name": "RFdiffusion",
    "tool_name": "unconditional_generate_gpu_unconditional_generate_gpu_post",
    "parameters": {
    "design_type": "<DESIGN_TYPE>",
    "design_length": "<DESIGN_LENGTH>",
    "num_designs": 10
},
    # The job name is an optional parameter.
    #"job_name": "xxx",
}

# Step 1: Submit the task.
# Call the /invoke endpoint to start the task and obtain a task_id.
print("1. Submitting task...")
resp_submit = requests.post(f"{BASE_URL}{endpoint}", json=payload, headers=headers, timeout=30)
resp_submit.raise_for_status()
task_id = resp_submit.json().get("task_id")
print(f"Task ID: {task_id}")

# Step 2: Poll for the result.
# Use the task_id obtained above to call the /result endpoint to check status and fetch the result.
# If this tool takes a long time, you can increase the max_retries parameter or after exceeding the maximum number of times, you can use the task_id to re-request.
status_url = f"https://sciminer.tech/console/api/v1/internal/tools/result"
max_retries = 300
status = "PENDING"
for i in range(max_retries):
    print(f"Polling status (attempt {i+1}/{max_retries})...")
    resp_status = requests.get(
        status_url,
        params={"task_id": task_id},
        headers=headers,
        timeout=10
    )
    resp_status.raise_for_status()
    
    result = resp_status.json()
    status = result.get("status")
    print(f"Status: {status}")
    
    if status == "SUCCESS":
        print("✅ Task completed successfully！")
        print(f"Result: {result.get('result')}")
        break
    elif status == "FAILURE":
        print(f"❌ Task failed: {result.get('result')}")
        break
    else:
        # Wait 2 seconds before retrying
        import time
        time.sleep(2)
else:
    print("⏱️  Maximum retry attempts reached. The task is still running.")
```


---

## User Interface URL

> When the user needs a tool recommendation, output the URL.

**URL:** <https://sciminer.tech/utility/tool/RFdiffusion>
