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

# Models

> Manage models for Friendli Dedicated Endpoints. Upload directly, or load from Hugging Face repositories.

Friendli Dedicated Endpoints can deploy models from a variety of sources:

* [Hugging Face](https://huggingface.co) repositories{/* - [Weights & Biases](https://wandb.ai) artifacts */}
* Models you upload directly

## How to Upload a Model

You can upload your own model files directly to Friendli using the Friendli CLI, then deploy them to a Dedicated Endpoint.

<Steps>
  <Step title="Install the CLI">
    Install the Friendli CLI, specifying the exact version:

    ```bash theme={null}
    pip install friendli-client==2.0.0a16
    ```
  </Step>

  <Step title="Prepare Your API Key">
    The CLI requires authentication. Create an API key in [Personal Settings > API Keys](https://friendli.ai/suite/~/setting/keys) and set it as an environment variable:

    ```bash theme={null}
    export API_KEY=<YOUR_API_KEY>
    ```
  </Step>

  <Step title="Confirm Your Project ID">
    Identify the Project ID where you want to upload your model, and set it as an environment variable:

    ```bash theme={null}
    export PROJECT_ID=<YOUR_PROJECT_ID>
    ```
  </Step>

  <Step title="Run the Upload Command">
    Upload your local model directory to Friendli:

    ```bash theme={null}
    friendli --token $API_KEY model push --project $PROJECT_ID --name new-model /path/to/model
    ```

    * `--name`: The name to assign to the model on Friendli.
    * `/path/to/model`: The local path to your model files.
  </Step>
</Steps>

<Note>
  * Identical files are deduplicated automatically and won't be re-uploaded.
  * Some files may be skipped if they are unnecessary or unsupported.
</Note>
