Models

Upload a custom model or adapter

POST
/models

Upload a custom model or adapter from Hugging Face or S3

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

model_name*string

The name to give to your uploaded model

model_source*string

The source location of the model (Hugging Face repo or S3 path)

model_type?string

Whether the model is a full model or an adapter

Default"model"

Value in

  • "model"
  • "adapter"
hf_token?string

Hugging Face token (if uploading from Hugging Face)

description?string

A description of your model

base_model?string

The base model to use for an adapter if setting it to run against a serverless pool. Only used for model_type adapter.

lora_model?string

The lora pool to use for an adapter if setting it to run against, say, a dedicated pool. Only used for model_type adapter.

Response Body

application/json

curl -X POST "https://example.com/models" \  -H "Content-Type: application/json" \  -d '{    "model_name": "string",    "model_source": "string"  }'
{  "data": {    "job_id": "string",    "model_name": "string",    "model_id": "string",    "model_source": "string"  },  "message": "string"}