# sdk_models

Python API: `hubai_sdk.utils.sdk_models`

Stable response models returned by the public SDK services.

The HubAI OpenAPI schema is generated into an internal module. The wrappers here remove server-only ownership fields and add
values populated by the SDK, providing a smaller and more accurate public contract.

All response types are Pydantic models. Use normal attribute access for fields or `model_dump()` when a dictionary is required.

## Classes

| Name | Description |
| --- | --- |
| [`ConvertResponse`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/sdk_models.md) |
Result of a completed hosted model conversion. |
|
[`JobMessageResponse`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/sdk_models.md)
| Status and output metadata for an asynchronous HubAI job. |
|
[`ModelInstanceFileResponse`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/sdk_models.md)
| Metadata for one file attached to a model instance. |
|
[`ModelInstanceResponse`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/sdk_models.md)
| Metadata for a concrete model artifact. |
| [`ModelResponse`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/sdk_models.md) |
Metadata for a top-level HubAI model resource. |
|
[`ModelVersionResponse`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/sdk_models.md)
| Metadata for a versioned model variant. |

### class `ConvertResponse`

```python
class ConvertResponse(BaseModel)
```

Result of a completed hosted model conversion.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `downloaded_path` | `Path` | Local directory or file created by the downloader. |
| `instance` | `ModelInstanceResponse` | Exported model instance associated with the job. |
| `job` | `JobMessageResponse` | Completed export job returned by HubAI. |

### class `JobMessageResponse`

```python
class JobMessageResponse(HubAIJobMessageResponse)
```

Status and output metadata for an asynchronous HubAI job.

 * `Common fields:`: `id`, `name`, and `status` identify the job and its state. `queued_at`, `started_at`, and `finished_at`
   describe timing. Successful jobs populate `result`; failed jobs may populate `exception` and `logs`.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `team_id` | `ClassVar[UUID | None]` |  |
| `user_id` | `ClassVar[UUID | None]` |  |

### class `ModelInstanceFileResponse`

```python
class ModelInstanceFileResponse(HubAIModelInstanceFileResponse)
```

Metadata for one file attached to a model instance.

 * `Common fields:`: `id` identifies the file record, `model_instance_id` identifies its owner, `filepath` is relative to the
   artifact root, and `file_size_bytes` is its stored size.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `team_id` | `ClassVar[UUID | None]` |  |
| `user_id` | `ClassVar[UUID | None]` |  |

### class `ModelInstanceResponse`

```python
class ModelInstanceResponse(HubAIModelInstanceResponse)
```

Metadata for a concrete model artifact.

 * `Common fields:`: * `id`, `name`, and `slug` identify the artifact.
    * `model_id` and `model_version_id` identify its parents.
    * `model_type`, `model_precision_type`, and `input_shape` describe the stored model.
    * `parent_id` links an exported artifact to its source instance.
    * `status` reports whether the artifact is ready for use.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `model_name` | `str | None` | Parent model name when explicitly requested. |
| `model_variant_name` | `str | None` | Parent variant name when explicitly requested. |
| `team_id` | `ClassVar[UUID | None]` |  |
| `user_id` | `ClassVar[UUID | None]` |  |

### class `ModelResponse`

```python
class ModelResponse(HubAIModelResponse)
```

Metadata for a top-level HubAI model resource.

 * `Common fields:`: * `id`, `name`, and `slug` identify the model.
    * `tasks`, `license_type`, and `is_yolo` describe its contract.
    * `is_public` reports its visibility.
    * `platforms` and `exportable_to` summarize artifact support.
    * `versions`, `likes`, and `downloads` contain aggregate counts.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `team_id` | `ClassVar[UUID | None]` |  |
| `user_id` | `ClassVar[UUID | None]` |  |

### class `ModelVersionResponse`

```python
class ModelVersionResponse(HubAIModelVersionResponse)
```

Metadata for a versioned model variant.

 * `Common fields:`: * `id`, `name`, `slug`, and `variant_slug` identify the variant.
    * `model_id` identifies its parent model.
    * `version` is the semantic model version.
    * `platforms` and `exportable_to` describe available artifacts and possible export targets.

Attributes

| Name | Type | Description |
| --- | --- | --- |
| `model_name` | `str | None` | Parent model name when requested by the caller. Some list operations leave this as `None` to avoid
an extra API request. |
| `team_id` | `ClassVar[UUID | None]` |  |
| `user_id` | `ClassVar[UUID | None]` |  |
