Skip to content

Instantly share code, notes, and snippets.

@adamelliotfields
Last active October 18, 2024 07:20
Show Gist options
  • Save adamelliotfields/24a36dbb423b059416ceea4f81e715ad to your computer and use it in GitHub Desktop.
Save adamelliotfields/24a36dbb423b059416ceea4f81e715ad to your computer and use it in GitHub Desktop.
Download CivitAI Files from Command Line

Use token query param not Authorization header. Ensure URL has "download" in it. Creating an API token is at the bottom of Account Settings.

Curl

curl -Lo add-detail-xl.safetensors https://civitai.com/api/download/models/135867?token=$CIVIT_TOKEN

Wget

wget -O add-detail-xl.safetensors https://civitai.com/api/download/models/135867?token=$CIVIT_TOKEN

Aria2

aria2c -o add-detail-xl.safetensors https://civitai.com/api/download/models/135867?token=$CIVIT_TOKEN

(used Detail Tweaker XL LoRA as an example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment