curl --location "https://randomseed.lol/v1/load-model" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $RANDOMSEED_API_KEY" \
--data '{
    "load_model": {
        "url": "https://civitai.com/api/download/models/130072?type=Model&format=SafeTensor&size=full&fp=fp16",
        "model_name": "realistic_vision_v5.1",
        "webhook_url": "https://webhook.site/b8d78e3c-7c73-478b-b446-0337d78513da",
        "model_type": "checkpoint",
        "support_inpainting": false
    }
}
'
{
    "message": "Model loading in progress"
}

API key

Create your account on RandomSeed & grab your api key

Headers

Authorization
string

Your API key. This is required by most endpoints to access our API programatically. You can get your api key by clicking on ‘API reference’ tab under your profile icon.

Tips

Make sure to load only a model file with .safetensors extension.

When you’re loading a model from huggingface, please change part of the url from /blog/main to /resolve/main. For example, if you’re loading a model from https://huggingface.co/SG161222/Realistic_Vision_V4.0/blob/main/Realistic_Vision_V4.0.safetensors, then you should set the url in the param to https://huggingface.co/SG161222/Realistic_Vision_V4.0/resolve/main/Realistic_Vision_V4.0.safetensors In addition to checkpoint models, you can also load loras by specifying the model type.

If you’re loading a model from civitai, make sure to follow the format https://civitai.com/api/download/models/<modelId>?type=Model&format=SafeTensor

Following field is optional: support_inpainting - this defaults to false.

Body

url
string
required

Link to the model

model_name
string
required

Name of the model

webhook_url
string
required

Callback url that will be called once the model is loaded

model_type
string
required

Either “checkpoint” or “lora”

support_inpainting
boolean

Whether the model supports inpainting or not.

Response

message
string

image generation in progress

curl --location "https://randomseed.lol/v1/load-model" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $RANDOMSEED_API_KEY" \
--data '{
    "load_model": {
        "url": "https://civitai.com/api/download/models/130072?type=Model&format=SafeTensor&size=full&fp=fp16",
        "model_name": "realistic_vision_v5.1",
        "webhook_url": "https://webhook.site/b8d78e3c-7c73-478b-b446-0337d78513da",
        "model_type": "checkpoint",
        "support_inpainting": false
    }
}
'
{
    "message": "Model loading in progress"
}