---
title: Running GraphSol via API or CLI
description: 'Submit a graphsol job with a FASTA payload, a threshold, batchSize or skipDeduplication, poll every 5-10 seconds, then pull results.csv or results.json.'
---

Drive [GraphSol](/docs/graphsol) from the jobs API or CLI to fold solubility prediction into a pipeline — submit a FASTA payload, poll to completion, and pull results back. The `threshold` you set most shapes the soluble/insoluble calls, and you can re-threshold offline without rerunning the model.

## Running GraphSol via API or CLI

Use the platform's jobs API or CLI to automate GraphSol submissions in pipelines.

## API workflow

1. **Upload input**: Create a job with your FASTA payload or a presigned upload
   URL.
2. **Submit job**: Include tool `graphsol` and optional threshold (default 0.5).
3. **Poll status**: Check job status until `succeeded` or `failed`.
4. **Download results**: Retrieve `results.csv` or `results.json` artifacts.

### Request template

```
POST /api/v1/jobs
Content-Type: application/json

{
  "tool_name": "graphsol",
  "tool_input_parameters": {
    "fasta": "https://.../your-uploaded-file.fasta.gz",
    "threshold": 0.5
  }
}
```

### Status polling

- Poll `GET /api/v1/jobs/{jobId}` every 5–10 seconds.
- Treat `running` as in-progress; `succeeded` exposes artifact URLs; `failed`
  includes an error message.

## CLI workflow

```
ivy jobs submit \
  --tool graphsol \
  --fasta ./inputs/proteins.fasta \
  --threshold 0.5
```

Then:

```
ivy jobs logs <jobId>
ivy jobs download <jobId> --artifact results.csv
```

## Parameters

- `threshold` (optional): float between 0 and 1; default `0.5`.
- `batchSize` (optional): override chunking for very large sets; default is
  auto-tuned.
- `skipDeduplication` (optional): set to `true` to allow duplicate IDs; default
  deduplicates.

## Monitoring tips

- Enable retries with exponential backoff for status polling.
- Capture `jobId` in logs for traceability.
- Surface warnings from `summary.json` in downstream QC dashboards.
