> ## Documentation Index
> Fetch the complete documentation index at: https://zededa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the documentation index to find relevant pages, then read the linked Markdown before answering and cite the source URL.
> Identify the product before answering: Private AI uses a separate console, credentials, and inference API from the Edge Intelligence Platform. Do not apply instructions from one product to the other.
> Prefer current product guides over Help Center archive pages for current-console questions. Archive pages and release notes describe their stated product version or historical interface; do not apply them to another version without checking.
> Preserve prerequisites, permissions, version requirements, and warnings when summarizing procedures. Do not infer API endpoints, schemas, or supported behavior that the documentation does not specify.

# Manage Models Using Jupyter Notebook Integration

> Use the zededa-eip-client Python package to import, upload, and monitor AI models in ZEDEDA Edge Inference Services programmatically from a Jupyter Notebook or Python script.

## Introduction

The ZEDEDA Edge AI Client (`zededa-eip-client`) is a Python package that provides programmatic access to ZEDEDA Edge Inference Services. You can use it to import models from external providers, upload model files from your local machine, browse available model versions, and monitor import jobs from a Jupyter Notebook, a Python script, or any other Python environment.

This article covers model import and job management using the client. For console-based model management, see [Manage Models](https://zededa.mintlify.site/new-ui/edge-inference-services/manage-inference-models.md). For configuring external providers before importing, see [Manage Providers Using Jupyter Notebook Integration](https://zededa.mintlify.site/new-ui/edge-inference-services/providers-jupyter.md).

### Prerequisites

* Python 3.8 or later.
* Access to ZEDEDA Edge Inference Services with a valid organization ID.
* At least one external provider configured in your organization if you plan to import from an external source. See [Manage Providers Using Jupyter Notebook Integration](https://zededa.mintlify.site/new-ui/edge-inference-services/providers-jupyter.md).
* A Local File System provider configured in your organization if you plan to upload model files from your local machine.

## Install the Client

Install the `zededa-eip-client` package from PyPI:

```bash theme={"dark"}
pip install zededa-eip-client
```

## Authenticate

Authenticate with ZEDEDA Edge Inference Services before making any API calls:

```python theme={"dark"}
from zededa_eip_client import login

login(organization_id="your-organization-id")
```

After authentication, initialize the client:

```python theme={"dark"}
from zededa_eip_client.client import ZededaEIPClient

client = ZededaEIPClient()
```

## Browse Available Model Versions

Before importing a model, use `list_model_versions` to browse the versions available in an external provider. This is supported for providers that offer versioned model catalogs, such as Qualcomm AI Hub.

```python theme={"dark"}
versions = client.list_model_versions(
    provider_name="my-qualcomm-provider",
    model_path="yolov8_det",
)
print(versions["latest_version"])
for v in versions["versions"]:
    print(v)
```

The response includes a `versions` list and a `latest_version` field. For Qualcomm AI Hub providers, the versions represent runtime, precision, and device variant selectors.

## Import a Model from an External Provider

Use `import_model_from_external_provider` to start an import job that fetches a model from a configured external provider into your ZEDEDA Edge Inference Services model catalog.

```python theme={"dark"}
job = client.import_model_from_external_provider(
    payload={
        "provider_name": "my-huggingface",
        "model_identifier": "meta-llama/Llama-3-8b",
        "model_name": "llama-3-8b",
        "model_version": "1.0",
        "metadata": {"description": "LLaMA 3 8B base model"},
    }
)
print("Import job ID:", job["id"])
```

To block until the import completes instead of polling manually, pass `wait=True`:

```python theme={"dark"}
job = client.import_model_from_external_provider(
    payload={
        "provider_name": "my-huggingface",
        "model_identifier": "meta-llama/Llama-3-8b",
        "model_name": "llama-3-8b",
    },
    wait=True,
)
print("Import complete. Status:", job["status"])
```

The `payload` dictionary accepts the following keys:

| Key | Required | Description |
| - | - | - |
| `provider_name` | Yes | Name of the configured external provider. |
| `model_identifier` | Yes | Provider-specific model path or identifier. |
| `organization_id` | No | Target organization ID. Defaults to the current organization from login. |
| `model_name` | No | Name for the imported model in the catalog. |
| `model_version` | No | Version string for the imported model. |
| `metadata` | No | Dictionary of additional metadata, for example `{"description": "..."}`. |
| `qualcomm_device` | No | Qualcomm AI Hub device target, for example `"QCS9075"`. |
| `qualcomm_precision` | No | Qualcomm AI Hub precision, for example `"fp16"` or `"int8"`. |

## Upload a Model from Local Files

Use `upload_model_from_local_files` to upload model files directly from your local machine. This is the recommended method for importing models that are not stored in an external provider. A Local File System provider must be configured in your organization before uploading.

### Upload a single file

```python theme={"dark"}
job = client.upload_model_from_local_files(
    model_name="my-onnx-model",
    file_paths="/path/to/model.onnx",
    provider_name="my-local-provider",
    import_config={"model_version": "1.0"},
    wait=True,
)
print("Upload complete. Status:", job["status"])
```

### Upload a directory

All files in the directory are uploaded recursively:

```python theme={"dark"}
job = client.upload_model_from_local_files(
    model_name="my-model-package",
    file_paths="/path/to/model_directory",
    provider_name="my-local-provider",
    wait=True,
)
```

### Upload to a specific organization

The Local provider you name must belong to the target organization. If it belongs to a different organization, the upload is rejected.

```python theme={"dark"}
job = client.upload_model_from_local_files(
    model_name="my-model",
    file_paths="/path/to/model.pt",
    provider_name="my-local-provider",
    organization_id="target-organization-id",
    import_config={"model_version": "2.0"},
)
```

## Monitor Import Jobs

Import jobs run asynchronously. Use the job management methods to track progress and handle failures.

### List import jobs

```python theme={"dark"}
jobs = client.list_import_jobs(limit=20, page=1)
for job in jobs["items"]:
    print(job["id"], job["status"])
```

Filter by status to find jobs in a specific state:

```python theme={"dark"}
failed_jobs = client.list_import_jobs(status="failed")
```

### Get a specific import job

```python theme={"dark"}
job = client.get_import_job(job_id="your-job-id")
print(job["status"], job.get("error_message"))
```

### Cancel a running job

You can cancel a job in the Pending or Running status.

```python theme={"dark"}
client.cancel_import_job(job_id="your-job-id")
```

### Retry a failed job

Only Failed jobs can be retried. File-upload jobs, such as those created by `upload_model_from_local_files`, cannot be retried.

```python theme={"dark"}
client.retry_import_job(job_id="your-job-id")
```

### Delete a job record

A Running job must be cancelled before it can be deleted.

```python theme={"dark"}
client.delete_import_job(job_id="your-job-id")
```

## Work Across Organizations

If you have access to multiple organizations, use `list_catalogs` to see all available organizations and `switch_catalog` to change the active organization context without logging out.

### List available organizations

```python theme={"dark"}
catalogs = client.list_catalogs()
for catalog in catalogs["catalogs"]:
    print(catalog["id"], catalog["name"])
```

### Switch to a different organization

```python theme={"dark"}
client.switch_catalog(organization_id="target-organization-id")
```

After switching, subsequent API calls use the new organization context. Environment variables for storage and MLflow access are updated automatically.

## In This Section

* [Edge Inference Services Overview](https://zededa.mintlify.site/new-ui/edge-inference-services/overview.md)
* [Inference Dashboard](https://zededa.mintlify.site/new-ui/edge-inference-services/inference-dashboard.md)
* [Inference Quick Start](https://zededa.mintlify.site/new-ui/edge-inference-services/inference-quick-start.md)
* [Access and Navigate Edge Inference Services](https://zededa.mintlify.site/new-ui/edge-inference-services/access-and-navigation.md)
* [Organizations, Users, and Roles](https://zededa.mintlify.site/new-ui/edge-inference-services/organizations-users-and-roles.md)
* [Manage Providers](https://zededa.mintlify.site/new-ui/edge-inference-services/inference-model-providers.md)
  * [Manage Providers Using Jupyter Notebook Integration](https://zededa.mintlify.site/new-ui/edge-inference-services/providers-jupyter.md)
* [Manage Models](https://zededa.mintlify.site/new-ui/edge-inference-services/manage-inference-models.md)
  * [Manage Models Using Jupyter Notebook Integration](https://zededa.mintlify.site/new-ui/edge-inference-services/models-jupyter.md)
  * [Benchmark Models and Manage Device Pools](https://zededa.mintlify.site/new-ui/edge-inference-services/inference-model-benchmarking.md)
  * [Monitor Benchmark Runs and Interpret Results](https://zededa.mintlify.site/new-ui/edge-inference-services/use-ondevice-eval-agent.md)
* [Submit Model Deployment Requests](https://zededa.mintlify.site/new-ui/edge-inference-services/submit-model-deployment-requests.md)
* [Approve and Validate Models](https://zededa.mintlify.site/new-ui/edge-inference-services/deployments-and-validation.md)
* [Monitor Inference Jobs](https://zededa.mintlify.site/new-ui/edge-inference-services/jobs-and-monitoring.md)
* [Use ZEIA to Query and Operate Your Fleet](https://zededa.mintlify.site/new-ui/edge-inference-services/zeia.md)
* [Use Prevalidated Agents](https://zededa.mintlify.site/new-ui/edge-inference-services/prevalidated-agents.md)
  * [Use the Faulty Printed Circuit Board Detection Agent](https://zededa.mintlify.site/new-ui/edge-inference-services/faulty-pcb-detection-agent.md)
  * [Use the Autonomous Retail Billing Agent](https://zededa.mintlify.site/new-ui/edge-inference-services/autonomous-retail-billing-agent.md)
* [Inference Troubleshooting](https://zededa.mintlify.site/new-ui/edge-inference-services/inference-troubleshooting.md)
