# phi.runs

Read runs, follow their stages and resume a failed run.

## phi.runs.backbone_uris

```python
phi.runs.backbone_uris(run_id=run_id)
```

Returns `builtins.list[str]`.

| Parameter | Type | Default | Required |
|---|---|---|---|
| `run_id` | `str \| uuid.UUID` |  | Required |
| `pipeline_node_id` | `str \| None` | `None` | Optional |

## phi.runs.cancel

```python
phi.runs.cancel(run_id=run_id)
```

| Parameter | Type | Required |
|---|---|---|
| `run_id` | `str \| uuid.UUID` | Required |

## phi.runs.dag

```python
phi.runs.dag(run_id=run_id)
```

Returns `RunDagResponse`.

| Parameter | Type | Required |
|---|---|---|
| `run_id` | `str \| uuid.UUID` | Required |

### RunDagResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "run_id",
    "pipeline_type",
    "overall_status",
    "nodes",
    "edges"
  ],
  "properties": {
    "edges": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DagEdge"
      }
    },
    "nodes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DagNode"
      }
    },
    "overall_status": {
      "type": "string"
    },
    "pipeline_type": {
      "type": "string"
    },
    "run_id": {
      "type": "string",
      "format": "uuid"
    }
  },
  "$defs": {
    "DagEdge": {
      "type": "object",
      "required": [
        "from_node",
        "to_node"
      ],
      "properties": {
        "from_node": {
          "type": "string"
        },
        "to_node": {
          "type": "string"
        }
      }
    },
    "DagNode": {
      "type": "object",
      "required": [
        "id",
        "stage_type",
        "batch_index",
        "status"
      ],
      "properties": {
        "batch_index": {
          "type": "integer"
        },
        "completed_at": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "error_code": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "exit_code": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "type": "string"
        },
        "k8s_job_name": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "progress_pct": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "recommended_action": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "stage_type": {
          "type": "string"
        },
        "started_at": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string"
        }
      }
    }
  }
}
```

## phi.runs.estimate

Price a run. The response is the amount a submit would reserve.

```python
phi.runs.estimate(project_id=project_id, submit=submit)
```

Returns `RunEstimateResponse`.

| Parameter | Type | Required |
|---|---|---|
| `project_id` | `str \| uuid.UUID` | Required |
| `submit` | `RunSubmit \| RunEstimate` | Required |

### RunEstimate fields and schema

```json
{
  "type": "object",
  "properties": {
    "inputs": {
      "type": "object",
      "additionalProperties": true
    },
    "num_designs": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "type": "object",
      "additionalProperties": true
    },
    "pipeline_type": {
      "type": "string",
      "default": "BINDER_DESIGN"
    }
  }
}
```

### RunEstimateResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "pipeline_type",
    "estimated_credits",
    "breakdown"
  ],
  "properties": {
    "breakdown": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/QuoteLine"
      }
    },
    "estimated_credits": {
      "type": "integer"
    },
    "pipeline_type": {
      "type": "string"
    }
  },
  "$defs": {
    "QuoteLine": {
      "type": "object",
      "required": [
        "stage",
        "unit",
        "count",
        "cents"
      ],
      "properties": {
        "cents": {
          "type": "integer"
        },
        "count": {
          "type": "integer"
        },
        "stage": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        }
      }
    }
  }
}
```

### RunSubmit fields and schema

```json
{
  "type": "object",
  "required": [
    "inputs"
  ],
  "properties": {
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "context": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "dataset_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "idempotency_key": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "$ref": "#/$defs/RunInputs"
    },
    "name": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "type": "object",
      "additionalProperties": true
    },
    "pipeline_type": {
      "type": "string",
      "default": "BINDER_DESIGN"
    }
  },
  "$defs": {
    "RunInputs": {
      "type": "object",
      "properties": {
        "backbone_cifs_gcs_prefix": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "backbone_gcs_prefix": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "backbone_uris": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "binder_chain_id": {
          "type": "string",
          "default": "A"
        },
        "binder_pdbs": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "design_set": {
          "default": null,
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": true
            },
            {
              "type": "null"
            }
          ]
        },
        "design_spec_entry": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "design_spec_files": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": true
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "design_spec_gcs_prefix": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "design_spec_yaml": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "sequences": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object",
                    "additionalProperties": true
                  }
                ]
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "source_pipeline_node_id": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "source_run_id": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "target_chain_id": {
          "type": "string",
          "default": "A"
        },
        "target_cif": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "target_cif_uri": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "target_pdb": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "target_pdb_uri": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}
```

## phi.runs.get

```python
phi.runs.get(run_id=run_id)
```

Returns `RunResponse`.

| Parameter | Type | Required |
|---|---|---|
| `run_id` | `str \| uuid.UUID` | Required |

### RunResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "id",
    "pipeline_type",
    "status",
    "estimated_credits",
    "consumed_credits",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "consumed_credits": {
      "type": "integer"
    },
    "context": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "dataset_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "error_code": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimated_credits": {
      "type": "integer"
    },
    "exit_code": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "input_manifest_uri": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "pipeline_type": {
      "type": "string"
    },
    "project_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "recommended_action": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "source_run_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string"
    },
    "summary": {
      "default": null,
      "anyOf": [
        {
          "$ref": "#/$defs/RunSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "RunHeadline": {
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "pass_count": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "type": "number"
        }
      }
    },
    "RunSummary": {
      "type": "object",
      "properties": {
        "duration_seconds": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "headline": {
          "default": null,
          "anyOf": [
            {
              "$ref": "#/$defs/RunHeadline"
            },
            {
              "type": "null"
            }
          ]
        },
        "sample_count": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}
```

## phi.runs.iter

```python
phi.runs.iter(project_id=project_id)
```

Returns `Iterator[RunResponse]`.

| Parameter | Type | Default | Required |
|---|---|---|---|
| `project_id` | `str \| uuid.UUID` |  | Required |
| `page_size` | `int` | `20` | Optional |
| `batch_id` | `str \| None` | `None` | Optional |
| `source_run_id` | `str \| uuid.UUID \| None` | `None` | Optional |

### RunResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "id",
    "pipeline_type",
    "status",
    "estimated_credits",
    "consumed_credits",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "consumed_credits": {
      "type": "integer"
    },
    "context": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "dataset_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "error_code": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimated_credits": {
      "type": "integer"
    },
    "exit_code": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "input_manifest_uri": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "pipeline_type": {
      "type": "string"
    },
    "project_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "recommended_action": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "source_run_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string"
    },
    "summary": {
      "default": null,
      "anyOf": [
        {
          "$ref": "#/$defs/RunSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "RunHeadline": {
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "pass_count": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "type": "number"
        }
      }
    },
    "RunSummary": {
      "type": "object",
      "properties": {
        "duration_seconds": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "headline": {
          "default": null,
          "anyOf": [
            {
              "$ref": "#/$defs/RunHeadline"
            },
            {
              "type": "null"
            }
          ]
        },
        "sample_count": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}
```

## phi.runs.list

A project's runs. `source_run_id` narrows them to the runs sourced from one run.

```python
phi.runs.list(project_id=project_id)
```

Returns `CursorList[RunResponse]`.

| Parameter | Type | Default | Required |
|---|---|---|---|
| `project_id` | `str \| uuid.UUID` |  | Required |
| `page` | `int` | `1` | Optional |
| `page_size` | `int` | `20` | Optional |
| `cursor` | `str \| None` | `None` | Optional |
| `batch_id` | `str \| None` | `None` | Optional |
| `source_run_id` | `str \| uuid.UUID \| None` | `None` | Optional |

### RunResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "id",
    "pipeline_type",
    "status",
    "estimated_credits",
    "consumed_credits",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "consumed_credits": {
      "type": "integer"
    },
    "context": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "dataset_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "error_code": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimated_credits": {
      "type": "integer"
    },
    "exit_code": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "input_manifest_uri": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "pipeline_type": {
      "type": "string"
    },
    "project_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "recommended_action": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "source_run_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string"
    },
    "summary": {
      "default": null,
      "anyOf": [
        {
          "$ref": "#/$defs/RunSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "RunHeadline": {
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "pass_count": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "type": "number"
        }
      }
    },
    "RunSummary": {
      "type": "object",
      "properties": {
        "duration_seconds": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "headline": {
          "default": null,
          "anyOf": [
            {
              "$ref": "#/$defs/RunHeadline"
            },
            {
              "type": "null"
            }
          ]
        },
        "sample_count": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}
```

## phi.runs.pipelines

Named pipelines this deployment accepts; job types come from JobsResource.

```python
phi.runs.pipelines()
```

Returns `PipelinesResponse`.

### PipelinesResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "pipelines"
  ],
  "properties": {
    "pipelines": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PipelineTypeResponse"
      }
    }
  },
  "$defs": {
    "CatalogPrice": {
      "type": "object",
      "required": [
        "credits",
        "count",
        "unit"
      ],
      "properties": {
        "count": {
          "type": "integer"
        },
        "credits": {
          "type": "integer"
        },
        "unit": {
          "type": "string"
        }
      }
    },
    "StagePricing": {
      "type": "object",
      "required": [
        "stage",
        "unit",
        "cents",
        "gpu"
      ],
      "properties": {
        "basket": {
          "type": "integer",
          "default": 1
        },
        "cap": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "cents": {
          "type": "integer"
        },
        "gpu": {
          "type": "string"
        },
        "included": {
          "type": "integer",
          "default": 0
        },
        "per": {
          "type": "integer",
          "default": 1
        },
        "stage": {
          "type": "string"
        },
        "start_cents": {
          "type": "integer",
          "default": 0
        },
        "unit": {
          "type": "string"
        }
      }
    },
    "PipelineTypeResponse": {
      "type": "object",
      "required": [
        "pipeline_type",
        "credit_cost",
        "available_as_job",
        "default_params",
        "available",
        "gate_reason",
        "environments"
      ],
      "properties": {
        "available": {
          "type": "boolean"
        },
        "available_as_job": {
          "type": "boolean"
        },
        "catalog_price": {
          "default": null,
          "anyOf": [
            {
              "$ref": "#/$defs/CatalogPrice"
            },
            {
              "type": "null"
            }
          ]
        },
        "credit_cost": {
          "type": "integer"
        },
        "default_params": {
          "type": "object",
          "additionalProperties": true
        },
        "environments": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "gate_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "pipeline_type": {
          "type": "string"
        },
        "pricing": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StagePricing"
          }
        },
        "rate_revision": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "typical_seconds": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}
```

## phi.runs.resume

Resume a FAILED run. The server rejects any other status with 409.

```python
phi.runs.resume(run_id=run_id)
```

Returns `RunSubmitResponse`.

| Parameter | Type | Required |
|---|---|---|
| `run_id` | `str \| uuid.UUID` | Required |

### RunSubmitResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "run_id",
    "status"
  ],
  "properties": {
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "dataset_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimated_credits": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "run_id": {
      "type": "string"
    },
    "source_run_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string"
    },
    "status_url": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
```

## phi.runs.submit

```python
phi.runs.submit(project_id=project_id, submit=submit)
```

Returns `RunSubmitResponse`.

| Parameter | Type | Required |
|---|---|---|
| `project_id` | `str \| uuid.UUID` | Required |
| `submit` | `RunSubmit` | Required |

### RunSubmit fields and schema

```json
{
  "type": "object",
  "required": [
    "inputs"
  ],
  "properties": {
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        {
          "type": "null"
        }
      ]
    },
    "context": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "dataset_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "idempotency_key": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "$ref": "#/$defs/RunInputs"
    },
    "name": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "type": "object",
      "additionalProperties": true
    },
    "pipeline_type": {
      "type": "string",
      "default": "BINDER_DESIGN"
    }
  },
  "$defs": {
    "RunInputs": {
      "type": "object",
      "properties": {
        "backbone_cifs_gcs_prefix": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "backbone_gcs_prefix": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "backbone_uris": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "binder_chain_id": {
          "type": "string",
          "default": "A"
        },
        "binder_pdbs": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "design_set": {
          "default": null,
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": true
            },
            {
              "type": "null"
            }
          ]
        },
        "design_spec_entry": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "design_spec_files": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": true
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "design_spec_gcs_prefix": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "design_spec_yaml": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "sequences": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object",
                    "additionalProperties": true
                  }
                ]
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "source_pipeline_node_id": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "source_run_id": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "target_chain_id": {
          "type": "string",
          "default": "A"
        },
        "target_cif": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "target_cif_uri": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "target_pdb": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "target_pdb_uri": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}
```

### RunSubmitResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "run_id",
    "status"
  ],
  "properties": {
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "dataset_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimated_credits": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "run_id": {
      "type": "string"
    },
    "source_run_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string"
    },
    "status_url": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  }
}
```

## phi.runs.timeline

```python
phi.runs.timeline(run_id=run_id)
```

Returns `RunTimelineResponse`.

| Parameter | Type | Required |
|---|---|---|
| `run_id` | `str \| uuid.UUID` | Required |

### RunTimelineResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "run_id",
    "pipeline_type",
    "overall_status",
    "stages"
  ],
  "properties": {
    "overall_status": {
      "type": "string"
    },
    "pipeline_type": {
      "type": "string"
    },
    "run_id": {
      "type": "string",
      "format": "uuid"
    },
    "stages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StageResponse"
      }
    }
  },
  "$defs": {
    "StageEventResponse": {
      "type": "object",
      "required": [
        "event_type",
        "occurred_at"
      ],
      "properties": {
        "event_type": {
          "type": "string"
        },
        "message": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "occurred_at": {
          "type": "string",
          "format": "date-time"
        },
        "progress_pct": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "StageResponse": {
      "type": "object",
      "required": [
        "stage",
        "pipeline_node_id",
        "stage_order",
        "status"
      ],
      "properties": {
        "completed_at": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "error_code": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StageEventResponse"
          }
        },
        "exit_code": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "pipeline_node_id": {
          "type": "string"
        },
        "recommended_action": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "stage": {
          "type": "string"
        },
        "stage_order": {
          "type": "integer"
        },
        "started_at": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string"
        }
      }
    }
  }
}
```

## phi.runs.wait

```python
phi.runs.wait(run_id=run_id)
```

Returns `RunResponse`.

| Parameter | Type | Default | Required |
|---|---|---|---|
| `run_id` | `str \| uuid.UUID` |  | Required |
| `interval` | `float` | `5` | Optional |
| `timeout` | `float \| None` | `None` | Optional |
| `on_update` | `Callable[[RunResponse], None] \| None` | `None` | Optional |
| `stages` | `bool` | `False` | Optional |
| `max_consecutive_errors` | `int` | `5` | Optional |

### RunResponse fields and schema

```json
{
  "type": "object",
  "required": [
    "id",
    "pipeline_type",
    "status",
    "estimated_credits",
    "consumed_credits",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "consumed_credits": {
      "type": "integer"
    },
    "context": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "dataset_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "error_code": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimated_credits": {
      "type": "integer"
    },
    "exit_code": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "input_manifest_uri": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "pipeline_type": {
      "type": "string"
    },
    "project_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "recommended_action": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "source_run_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string"
    },
    "summary": {
      "default": null,
      "anyOf": [
        {
          "$ref": "#/$defs/RunSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "RunHeadline": {
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string"
        },
        "pass_count": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "type": "number"
        }
      }
    },
    "RunSummary": {
      "type": "object",
      "properties": {
        "duration_seconds": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "headline": {
          "default": null,
          "anyOf": [
            {
              "$ref": "#/$defs/RunHeadline"
            },
            {
              "type": "null"
            }
          ]
        },
        "sample_count": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    }
  }
}
```


---
Source: https://dynophi.com/docs/sdk/runs. From the installed client, phi 0.4.2, 2026-11-23.
