Skip to main content

Token Configuration Guide

A lot of the models available today can be found on HuggingFace. This page describes how to configure HuggingFace token settings for Cortex.

Command Line Interface (CLI)

Basic Usage


cortex config [OPTIONS] [COMMAND]

To display all current configurations


cortex config status


+-----------------------+------------------------+
| Config name | Value |
+-----------------------+------------------------+
| huggingface_token | |
+-----------------------+------------------------+

Options

OptionDescriptionExample
-h, --helpPrint help message and exit
--huggingface_token <token>Set HuggingFace tokencortex config --huggingface_token token

Token API Configuration

Endpoints

Get Current Configuration


GET /v1/configs


curl GET http://127.0.0.1:39281/v1/configs


{
"allowed_origins": [
"http://localhost:39281",
"http://127.0.0.1:39281",
"http://0.0.0.0:39281"
],
"cors": true,
"huggingface_token": "",
"no_proxy": "example.com,::1,localhost,127.0.0.1",
"proxy_password": "",
"proxy_url": "",
"proxy_username": "",
"verify_host_ssl": true,
"verify_peer_ssl": true,
"verify_proxy_host_ssl": true,
"verify_proxy_ssl": true
}

Update Configuration


PATCH /v1/configs

Updates HuggingFace token configuration settings.

Request Headers

Content-Type: application/json

Request Body

{
"huggingface_token": "token"
}

Parameters
FieldTypeDescription
huggingface_tokenstringHuggingFace token to pull models
Response

{
"config": {
"allowed_origins": [
"http://localhost:39281",
"http://127.0.0.1:39281",
"http://0.0.0.0:39281"
],
"cors": true,
"huggingface_token": "token"
},
"message": "Configuration updated successfully"
}