Skip to content

Instantly share code, notes, and snippets.

@vonvanzu
Created November 30, 2024 21:10
Show Gist options
  • Save vonvanzu/b0967c3e654f8b4b6a02074c5e5f86f1 to your computer and use it in GitHub Desktop.
Save vonvanzu/b0967c3e654f8b4b6a02074c5e5f86f1 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