---
title: "Import from Hugging Face"
method: POST
path: "/api/v3/models/base/import"
tags: ["Models"]
---

# Import from Hugging Face

`POST /api/v3/models/base/import`

## Request

- Base URL: `https://api.nugen.in`
- URL: `https://api.nugen.in/api/v3/models/base/import`
- Auth: HTTP bearer

Import a base model from Hugging Face or a cloud storage bucket.

**Request Body:**

- `source_type`: `huggingface`, `s3`, `gs`, `oci` or `abfss`
- `source_uri`: Hugging Face repo id or a cloud storage URI
- `base_model_name`: Name to register the imported model under
- `token`: Access token or credential for the source

## Request body

- ModelImportBaseRequest: Import a base model from Hugging Face or a cloud storage bucket.
  - `source_type` 'huggingface' | 's3' | 'gs' | 'oci' | 'abfss', required: huggingface, s3, gs, oci or abfss
  - `source_uri` string, required: Hugging Face repo id, e.g. org/model-name, or a cloud storage URI such as s3://bucket/path
  - `base_model_name` string, nullable: Ignored for Hugging Face imports, the repo id is the model id
  - `token` string, nullable: Access token or credential for the source. Used only to perform the import; never logged or stored.

## Response `200`

Acknowledges the import request for the base model.

- ModelImportBaseResponse: Acknowledgement of a base model import request.
  - `import_id` string, required: Identifier of the import request.
  - `status` 'QUEUED' | 'PROCESSING' | 'READY' | 'FAILED' | 'STOPPED', required: Lifecycle status of a resource that runs asynchronously. Stored as is and returned as is, with no translation in between. - `QUEUED`: accepted and waiting for its workflow to start - `PROCESSING`: running - `READY`: finished successfully - `FAILED`: failed at any stage - `STOPPED`: stopped by the user before completion
  - `message` string, required: Human-readable outcome of the request.

## Other responses

- `401`: Invalid API key
- `403`: Authorization header missing or not a Bearer token
- `422`: Validation Error

---

[API](https://skmtc.dev/nugen/apis/nugen-intelligence-api.md) - [All operations](https://skmtc.dev/nugen/apis/nugen-intelligence-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nugen/apis/nugen-intelligence-api/revisions/62baa7960a4a?raw)
