Unlimited Open Source Models

Get Plan
Skip to main content

CivitAI API — Run Any Civitai Model or LoRA

30,000+ Civitai checkpoints and LoRAs are already imported: call any of them by model_id, add a LoRA with lora_model, or import a new model by URL. Standard is $47/month for 10,000 calls, about $0.0047 per image, billed by card with no Buzz.

30,000+ Civitai models imported
99.9% API Uptime
REST API Access

Last updated · By ModelsLab Engineering

What the CivitAI API does

The CivitAI API on ModelsLab runs Civitai community models from your code. 30,000+ Civitai models are already imported, 28,100 LoRAs and 2,290 checkpoints, and each one is called by its `model_id`. Anything that is not imported yet can be added with one POST of its download URL.

It replaces the Civitai on-site generator for developers: the same checkpoints and LoRAs, a REST endpoint with webhooks, and a card-billed monthly plan instead of Buzz. Standard is $47/month for 10,000 API calls, about $0.0047 per image.

Generate with any Civitai model via API

Imported Civitai checkpoints are called by model_id on /api/v6/images/text2img.

Python

Python
1import requests
2
3response = requests.post(
4 "https://modelslab.com/api/v6/images/text2img",
5 json={
6 "key": "YOUR_MODELSLAB_API_KEY",
7 "model_id": "epicrealism-xl-v3-leo",
8 "prompt": "portrait of a lighthouse keeper, overcast light, 85mm",
9 "negative_prompt": "blurry, low quality",
10 "width": 1024,
11 "height": 1024,
12 "samples": 1,
13 "webhook": "https://your-app.example.com/hooks/image",
14 },
15)
16
17print(response.json()) # output URLs, or an id for /api/v6/images/fetch/{id}

curl

bash
1curl https://modelslab.com/api/v6/images/text2img \
2 -H "Content-Type: application/json" \
3 -d '{
4 "key": "YOUR_MODELSLAB_API_KEY",
5 "model_id": "anything-xl-xl",
6 "prompt": "a knight resting under a cherry tree, anime style",
7 "width": 1024,
8 "height": 1024
9 }'

Use a Civitai LoRA via API

Base checkpoint in model_id, LoRA in lora_model, weight in lora_strength, trigger word in the prompt.

One LoRA (Python)

Python
1import requests
2
3response = requests.post(
4 "https://modelslab.com/api/v6/images/text2img",
5 json={
6 "key": "YOUR_MODELSLAB_API_KEY",
7 "model_id": "sd-xl-v1-0-vae-fix",
8 "lora_model": "tshirtdesignredmond-t-shirt-design-lora-v2-0",
9 "lora_strength": 0.7,
10 "prompt": "TshirtDesignAF, a retro mountain sunset badge, flat colours",
11 "width": 1024,
12 "height": 1024,
13 },
14)
15
16print(response.json())

Two LoRAs (curl)

bash
1curl https://modelslab.com/api/v6/images/text2img \
2 -H "Content-Type: application/json" \
3 -d '{
4 "key": "YOUR_MODELSLAB_API_KEY",
5 "model_id": "sd-xl-v1-0-vae-fix",
6 "lora_model": "stickers-redmond-stickers-lora-v1-0-sdxl,midjourney-mimic-v2-0",
7 "lora_strength": 0.6,
8 "prompt": "Stickers, a cheerful fox mascot, white border rounded-lg",
9 "width": 1024,
10 "height": 1024
11 }'

Import a Civitai model by URL

For a checkpoint or LoRA that is not imported yet. Do it once; then call it by your model_id.

Import a LoRA (Python)

Python
1import requests
2
3response = requests.post(
4 "https://modelslab.com/api/v3/load_model",
5 json={
6 "key": "YOUR_MODELSLAB_API_KEY",
7 "url": "https://civitai.com/api/download/models/YOUR_VERSION_ID",
8 "model_id": "my-brand-style-lora",
9 "model_name": "Brand style LoRA",
10 "model_image": "https://example.com/preview.png",
11 "model_category": "stable_diffusion_xl",
12 "model_subcategory": "lora",
13 "model_format": "safetensors",
14 "revision": "fp16",
15 "force_load": "no",
16 "model_visibility": "private",
17 "hf_upload": "no",
18 },
19)
20
21print(response.json())

The parameters, step by step

On generation, `model_id` is the base checkpoint. `lora_model` is the LoRA id, or several ids separated by commas when you stack LoRAs. `lora_strength` sets the weight; 0.6 to 0.8 is a common start. Put the LoRA’s trigger word in the prompt, exactly as the Civitai model page describes it.

On import, `url` is the Civitai download link of the model version and `model_id` is the name you will call it by; it must be unique. `model_category` matches the base model: `stable_diffusion`, `stable_diffusion_xl`, `flux` or `z_image`. Add `model_subcategory: lora` for a LoRA. `model_format` is `safetensors`, `ckpt` or `diffusers`, and `model_visibility` is `private` or `public`.

What to expect on the first call

A newly imported model has to download and load on a GPU before it serves requests. If a LoRA is not loaded yet next to your base checkpoint, the API starts loading it and answers with a message to retry in about five minutes. After that, calls go straight through. Models that people call every day are already loaded.

Civitai generator (Buzz) vs a ModelsLab plan

Civitai on-site generatorModelsLab CivitAI API
How you payBuzz in several colours; part of generation paid in crypto since April 2026Card, monthly plan from $21
Which models you can runDepends on the Buzz type and membership tierAny imported model, plus any model you import
Access from codeBuilt around the websiteREST API, webhooks, Python and JavaScript examples
Cost at 10,000 imagesVaries by Buzz type and model$47 on Standard (about $0.0047 each)

Civitai details from its own announcements: civitai.com/articles/21109 (Oct 2025), civitai.com/articles/28369 (16 Apr 2026) and civitai.com/articles/33269 (mid-2026). ModelsLab plans as listed on /pricing on 2026-09-23.

CivitAI API pricing per image

Every call needs an active plan, billed by card. Basic is $21/month for 3,250 API calls and Standard is $47/month for 10,000, which works out at about $0.0047 per image. The $149/month Open Source Unlimited plan does not meter self-hosted checkpoints and LoRAs, which includes every imported Civitai model, and allows 15 requests in parallel.

Get Expert Support in Seconds

We're Here to Help.

Want to know more? You can email us anytime at support@modelslab.com

View Docs

Civitai has a public REST API for browsing and downloading models, and its own generator is paid in Buzz. The ModelsLab CivitAI API is a generation API: 30,000+ Civitai checkpoints and LoRAs are already loaded on GPUs, you call them by `model_id` on /api/v6/images/text2img, and you pay by card on a monthly plan.

POST https://modelslab.com/api/v6/images/text2img with your ModelsLab `key`, the model's `model_id` (for example `epicrealism-xl-v3-leo`), a `prompt`, `width` and `height`. The response has the image URL, or an id to poll at /api/v6/images/fetch/{id}. Every imported model page shows its `model_id`.

Send the base checkpoint in `model_id`, the LoRA id in `lora_model` and its weight in `lora_strength` (0.6 to 0.8 is a common start), and put the LoRA's trigger word in the prompt. `lora_model` accepts several ids separated by commas when you stack LoRAs.

POST https://modelslab.com/api/v3/load_model with `url` (the Civitai download link), your own `model_id`, `model_name`, `model_image`, `model_category` (`stable_diffusion`, `stable_diffusion_xl`, `flux` or `z_image`), `model_format` (`safetensors`, `ckpt` or `diffusers`), `revision`, `force_load`, `model_visibility` and `hf_upload`. Add `model_subcategory: lora` for a LoRA.

Plans are billed by card: Basic is $21/month for 3,250 API calls and Standard is $47/month for 10,000, about $0.0047 per image. The $149/month Open Source Unlimited plan does not meter self-hosted checkpoints and LoRAs and allows 15 requests in parallel. There is no Buzz and no crypto payment.

Not always. A new checkpoint has to download and load on a GPU first, and if a LoRA is not yet loaded next to your base model the API answers with a message to retry in about five minutes while it loads. Models that people call every day are already loaded.

For developers, yes: the same community checkpoints and LoRAs, called from code, billed by card. If you are comparing platforms rather than looking for an API, the CivitAI alternative page covers the differences in more detail.

Yes. Flux LoRA training trains a LoRA from your own images and makes it available on the same generation endpoint, so you call it with `lora_model` like any imported Civitai LoRA.