Dyno Phi
ContentsPython SDKShow

phi.jobs

Submit a model job, follow its progress and wait for results.

phi.jobs.cancel

python
phi.jobs.cancel(job_id=job_id)

Parameters

NameType
job_idrequiredstr

phi.jobs.embeddings

python
phi.jobs.embeddings(job_id=job_id)

Returns JobEmbeddings.

Parameters

NameType
job_idrequiredstr
JobEmbeddings fields and schemaShow

Fields

NameTypeDefault
embeddingsrequired(object)[]
index_urloptionalstring""
job_idrequiredstring
mask_tokenoptionalstring""
mask_token_idoptionalinteger-1
modelrequiredstring
model_idrequiredstring
next_cursoroptionalstring or nullnull
poolingrequiredstring
urls_signedoptionalboolean or nullnull
vocaboptional(string)[]
JSON schema
{
  "type": "object",
  "required": [
    "job_id",
    "model",
    "model_id",
    "pooling",
    "embeddings"
  ],
  "properties": {
    "embeddings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EmbeddingRow"
      }
    },
    "index_url": {
      "type": "string",
      "default": ""
    },
    "job_id": {
      "type": "string"
    },
    "mask_token": {
      "type": "string",
      "default": ""
    },
    "mask_token_id": {
      "type": "integer",
      "default": -1
    },
    "model": {
      "type": "string"
    },
    "model_id": {
      "type": "string"
    },
    "next_cursor": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "pooling": {
      "type": "string"
    },
    "urls_signed": {
      "default": null,
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "vocab": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "$defs": {
    "MutationScore": {
      "type": "object",
      "required": [
        "mutation"
      ],
      "properties": {
        "delta_loglik": {
          "default": null,
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "delta_loglik_vs_reference": {
          "default": null,
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "loglik": {
          "default": null,
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "mutation": {
          "type": "string"
        }
      }
    },
    "EmbeddingRow": {
      "type": "object",
      "required": [
        "name",
        "seq_len"
      ],
      "properties": {
        "cached": {
          "type": "boolean",
          "default": false
        },
        "dtype": {
          "type": "string",
          "default": ""
        },
        "embedding_url": {
          "type": "string",
          "default": ""
        },
        "error": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "layers": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "logits_cached": {
          "type": "boolean",
          "default": false
        },
        "logits_dtype": {
          "type": "string",
          "default": ""
        },
        "logits_shape": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "logits_url": {
          "type": "string",
          "default": ""
        },
        "mutations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MutationScore"
          }
        },
        "name": {
          "type": "string"
        },
        "pooling": {
          "type": "string",
          "default": ""
        },
        "reductions": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "region": {
          "default": null,
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "residues": {
          "type": "string",
          "default": ""
        },
        "seq_len": {
          "type": "integer"
        },
        "shape": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        }
      }
    }
  }
}

phi.jobs.get

python
phi.jobs.get(job_id=job_id)

Returns Job.

Parameters

NameType
job_idrequiredstr
Job fields and schemaShow

Fields

NameTypeDefaultDescription
actor_kindoptionalstring or nullnull
actor_refoptionalstring or nullnull
batch_idoptionalstring or nullnull
completed_atrequiredstring or null
consumed_creditsrequiredinteger
contextoptionalobject or nullnull
created_atrequiredstringformat: date-time
errorrequiredstring or null
error_codeoptionalstring or nullnull
estimated_creditsrequiredinteger
exit_codeoptionalinteger or nullnull
input_manifest_urioptionalstring or nullnull
inputsoptionalobject or nullnull
job_idrequiredstring
job_typerequiredstring
namerequiredstring or null
outputsrequiredobject or null
paramsoptionalobject or nullnull
project_idoptionalstring or nullnull
recommended_actionoptionalstring or nullnull
stagerequiredobject or null
statusrequired"PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ERROR"
summaryoptionalobject or nullnull
system_paramsoptionalobject or nullnull
typical_secondsoptionalinteger or nullnull
user_idrequiredstring
JSON schema
{
  "type": "object",
  "required": [
    "job_id",
    "job_type",
    "name",
    "status",
    "user_id",
    "estimated_credits",
    "consumed_credits",
    "created_at",
    "completed_at",
    "error",
    "stage",
    "outputs"
  ],
  "properties": {
    "actor_kind": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "actor_ref": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "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"
    },
    "error": {
      "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"
        }
      ]
    },
    "input_manifest_uri": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "job_id": {
      "type": "string"
    },
    "job_type": {
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "outputs": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "project_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "recommended_action": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "stage": {
      "anyOf": [
        {
          "$ref": "#/$defs/JobStage"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "RUNNING",
        "COMPLETED",
        "FAILED",
        "CANCELLED",
        "ERROR"
      ]
    },
    "summary": {
      "default": null,
      "anyOf": [
        {
          "$ref": "#/$defs/RunSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "system_params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "typical_seconds": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "user_id": {
      "type": "string"
    }
  },
  "$defs": {
    "JobStage": {
      "type": "object",
      "required": [
        "stage",
        "status",
        "started_at",
        "completed_at",
        "error"
      ],
      "properties": {
        "completed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "error_code": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "exit_code": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "recommended_action": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "stage": {
          "type": "string"
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "RUNNING",
            "COMPLETED",
            "FAILED",
            "CANCELLED",
            "ERROR"
          ]
        }
      }
    },
    "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.jobs.iter

python
phi.jobs.iter()

Returns Iterator[Job].

Parameters

NameTypeDefault
page_sizeoptionalint20
job_typeoptionalJobType | NoneNone
batch_idoptionalstr | NoneNone
Job fields and schemaShow

Fields

NameTypeDefaultDescription
actor_kindoptionalstring or nullnull
actor_refoptionalstring or nullnull
batch_idoptionalstring or nullnull
completed_atrequiredstring or null
consumed_creditsrequiredinteger
contextoptionalobject or nullnull
created_atrequiredstringformat: date-time
errorrequiredstring or null
error_codeoptionalstring or nullnull
estimated_creditsrequiredinteger
exit_codeoptionalinteger or nullnull
input_manifest_urioptionalstring or nullnull
inputsoptionalobject or nullnull
job_idrequiredstring
job_typerequiredstring
namerequiredstring or null
outputsrequiredobject or null
paramsoptionalobject or nullnull
project_idoptionalstring or nullnull
recommended_actionoptionalstring or nullnull
stagerequiredobject or null
statusrequired"PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ERROR"
summaryoptionalobject or nullnull
system_paramsoptionalobject or nullnull
typical_secondsoptionalinteger or nullnull
user_idrequiredstring
JSON schema
{
  "type": "object",
  "required": [
    "job_id",
    "job_type",
    "name",
    "status",
    "user_id",
    "estimated_credits",
    "consumed_credits",
    "created_at",
    "completed_at",
    "error",
    "stage",
    "outputs"
  ],
  "properties": {
    "actor_kind": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "actor_ref": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "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"
    },
    "error": {
      "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"
        }
      ]
    },
    "input_manifest_uri": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "job_id": {
      "type": "string"
    },
    "job_type": {
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "outputs": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "project_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "recommended_action": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "stage": {
      "anyOf": [
        {
          "$ref": "#/$defs/JobStage"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "RUNNING",
        "COMPLETED",
        "FAILED",
        "CANCELLED",
        "ERROR"
      ]
    },
    "summary": {
      "default": null,
      "anyOf": [
        {
          "$ref": "#/$defs/RunSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "system_params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "typical_seconds": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "user_id": {
      "type": "string"
    }
  },
  "$defs": {
    "JobStage": {
      "type": "object",
      "required": [
        "stage",
        "status",
        "started_at",
        "completed_at",
        "error"
      ],
      "properties": {
        "completed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "error_code": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "exit_code": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "recommended_action": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "stage": {
          "type": "string"
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "RUNNING",
            "COMPLETED",
            "FAILED",
            "CANCELLED",
            "ERROR"
          ]
        }
      }
    },
    "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.jobs.list

python
phi.jobs.list()

Returns JobListPage.

Parameters

NameTypeDefault
pageoptionalint1
page_sizeoptionalint20
job_typeoptionalJobType | NoneNone
cursoroptionalstr | NoneNone
batch_idoptionalstr | NoneNone
JobListPage fields and schemaShow

Fields

NameTypeDefault
jobsrequired(object)[]
next_cursoroptionalstring or nullnull
pagerequiredinteger
page_sizerequiredinteger
totalrequiredinteger
JSON schema
{
  "type": "object",
  "required": [
    "jobs",
    "total",
    "page",
    "page_size"
  ],
  "properties": {
    "jobs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Job"
      }
    },
    "next_cursor": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "page": {
      "type": "integer"
    },
    "page_size": {
      "type": "integer"
    },
    "total": {
      "type": "integer"
    }
  },
  "$defs": {
    "JobStage": {
      "type": "object",
      "required": [
        "stage",
        "status",
        "started_at",
        "completed_at",
        "error"
      ],
      "properties": {
        "completed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "error_code": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "exit_code": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "recommended_action": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "stage": {
          "type": "string"
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "RUNNING",
            "COMPLETED",
            "FAILED",
            "CANCELLED",
            "ERROR"
          ]
        }
      }
    },
    "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"
            }
          ]
        }
      }
    },
    "Job": {
      "type": "object",
      "required": [
        "job_id",
        "job_type",
        "name",
        "status",
        "user_id",
        "estimated_credits",
        "consumed_credits",
        "created_at",
        "completed_at",
        "error",
        "stage",
        "outputs"
      ],
      "properties": {
        "actor_kind": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "actor_ref": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "batch_id": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "completed_at": {
          "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"
        },
        "error": {
          "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"
            }
          ]
        },
        "input_manifest_uri": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "inputs": {
          "default": null,
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": true
            },
            {
              "type": "null"
            }
          ]
        },
        "job_id": {
          "type": "string"
        },
        "job_type": {
          "type": "string"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "outputs": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": true
            },
            {
              "type": "null"
            }
          ]
        },
        "params": {
          "default": null,
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": true
            },
            {
              "type": "null"
            }
          ]
        },
        "project_id": {
          "default": null,
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ]
        },
        "recommended_action": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "stage": {
          "anyOf": [
            {
              "$ref": "#/$defs/JobStage"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "RUNNING",
            "COMPLETED",
            "FAILED",
            "CANCELLED",
            "ERROR"
          ]
        },
        "summary": {
          "default": null,
          "anyOf": [
            {
              "$ref": "#/$defs/RunSummary"
            },
            {
              "type": "null"
            }
          ]
        },
        "system_params": {
          "default": null,
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": true
            },
            {
              "type": "null"
            }
          ]
        },
        "typical_seconds": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "user_id": {
          "type": "string"
        }
      }
    }
  }
}

phi.jobs.submit

Submit a job.

python
phi.jobs.submit(job_type=job_type)

Returns JobSubmitResponse.

Parameters

NameTypeDefault
job_typerequiredJobType
inputsoptionaldict[str, Any] | NoneNone
paramsoptionaldict[str, Any] | NoneNone
nameoptionalstr | NoneNone
project_idoptionalstr | NoneNone
project_nameoptionalstr | NoneNone
dataset_idoptionalstr | NoneNone
dataset_nameoptionalstr | NoneNone
idempotency_keyoptionalstr | NoneNone
batch_idoptionalstr | NoneNone
graphoptionaldict[str, Any] | NoneNone
contextoptionaldict[str, Any] | NoneNone
JobSubmitResponse fields and schemaShow

Fields

NameTypeDefault
batch_idoptionalstring or nullnull
estimated_creditsrequiredinteger
estimated_secondsoptionalinteger or nullnull
job_idrequiredstring
job_typerequiredstring
statusrequired"PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ERROR"
status_urlrequiredstring
JSON schema
{
  "type": "object",
  "required": [
    "job_id",
    "status",
    "job_type",
    "estimated_credits",
    "status_url"
  ],
  "properties": {
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimated_credits": {
      "type": "integer"
    },
    "estimated_seconds": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "job_id": {
      "type": "string"
    },
    "job_type": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "RUNNING",
        "COMPLETED",
        "FAILED",
        "CANCELLED",
        "ERROR"
      ]
    },
    "status_url": {
      "type": "string"
    }
  }
}

phi.jobs.wait

python
phi.jobs.wait(job_id=job_id)

Returns Job.

Parameters

NameTypeDefault
job_idrequiredstr
intervaloptionalfloat5
timeoutoptionalfloat | NoneNone
on_updateoptionalCallable[[Job], None] | NoneNone
max_consecutive_errorsoptionalint5
Job fields and schemaShow

Fields

NameTypeDefaultDescription
actor_kindoptionalstring or nullnull
actor_refoptionalstring or nullnull
batch_idoptionalstring or nullnull
completed_atrequiredstring or null
consumed_creditsrequiredinteger
contextoptionalobject or nullnull
created_atrequiredstringformat: date-time
errorrequiredstring or null
error_codeoptionalstring or nullnull
estimated_creditsrequiredinteger
exit_codeoptionalinteger or nullnull
input_manifest_urioptionalstring or nullnull
inputsoptionalobject or nullnull
job_idrequiredstring
job_typerequiredstring
namerequiredstring or null
outputsrequiredobject or null
paramsoptionalobject or nullnull
project_idoptionalstring or nullnull
recommended_actionoptionalstring or nullnull
stagerequiredobject or null
statusrequired"PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ERROR"
summaryoptionalobject or nullnull
system_paramsoptionalobject or nullnull
typical_secondsoptionalinteger or nullnull
user_idrequiredstring
JSON schema
{
  "type": "object",
  "required": [
    "job_id",
    "job_type",
    "name",
    "status",
    "user_id",
    "estimated_credits",
    "consumed_credits",
    "created_at",
    "completed_at",
    "error",
    "stage",
    "outputs"
  ],
  "properties": {
    "actor_kind": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "actor_ref": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "batch_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "completed_at": {
      "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"
    },
    "error": {
      "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"
        }
      ]
    },
    "input_manifest_uri": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "inputs": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "job_id": {
      "type": "string"
    },
    "job_type": {
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "outputs": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "project_id": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "recommended_action": {
      "default": null,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "stage": {
      "anyOf": [
        {
          "$ref": "#/$defs/JobStage"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "PENDING",
        "RUNNING",
        "COMPLETED",
        "FAILED",
        "CANCELLED",
        "ERROR"
      ]
    },
    "summary": {
      "default": null,
      "anyOf": [
        {
          "$ref": "#/$defs/RunSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "system_params": {
      "default": null,
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": true
        },
        {
          "type": "null"
        }
      ]
    },
    "typical_seconds": {
      "default": null,
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "user_id": {
      "type": "string"
    }
  },
  "$defs": {
    "JobStage": {
      "type": "object",
      "required": [
        "stage",
        "status",
        "started_at",
        "completed_at",
        "error"
      ],
      "properties": {
        "completed_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "error_code": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "exit_code": {
          "default": null,
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "recommended_action": {
          "default": null,
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "stage": {
          "type": "string"
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "RUNNING",
            "COMPLETED",
            "FAILED",
            "CANCELLED",
            "ERROR"
          ]
        }
      }
    },
    "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"
            }
          ]
        }
      }
    }
  }
}

From the installed client, phi 0.4.2, 2026-11-23.