Skip to main content
POST
/
v1
/
lora
/
create
Create Lora
curl --request POST \
  --url https://api.example.com/v1/lora/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "base_model": "<string>",
  "lora_name": "<string>",
  "source": {
    "type": "civitai",
    "civit_url": "<string>"
  },
  "private": true,
  "description": ""
}
'
{
  "deploy_id": "<string>",
  "model_name": "<string>",
  "version": "<string>",
  "task": "<string>",
  "status": "<string>",
  "fail_reason": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "type": "legacy",
  "instances": {
    "running": 123,
    "pending": 123
  },
  "config": {
    "gpu": "L4-24GB",
    "num_gpus": 123,
    "max_batch_size": 123,
    "weights": {
      "repo": "<string>",
      "revision": "<string>",
      "token": "<string>"
    }
  },
  "settings": {
    "min_instances": 1,
    "max_instances": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

xi-api-key
string | null

Body

application/json
base_model
string
required
lora_name
string
required
source
SourceModel · object
required
private
boolean
required
description
string | null
default:""

Response

Successful Response

deploy_id
string
required

Deploy Id

Example:

"fkj843kjh8"

model_name
string
required

Model Id from huggingface

Example:

"google/vit-base-patch16-224"

version
string
required

Model version

Example:

"d8b79b422843bd59d628bf25b01aded94a9ec1a9b917e69fe460df9ff39ec42b"

task
string
required

Task

Example:

"image-classification"

status
string
required

Status

Example:

"deployed"

fail_reason
string
required

Failure reason

Example:

"Initialization failed"

created_at
string
required

Created at

Example:

"2021-08-27T17:19:21+00:00"

updated_at
string
required

Updated at

Example:

"2021-08-27T17:19:21+00:00"

type
enum<string>
default:legacy
Available options:
legacy,
llm,
lora,
tts
instances
DeployInstances · object

Details about number of instances running right now

config
DeployLLMConfig · object

Immutable deploy configuration

settings
ScaleSettings · object

Scale Settings