Civitai API EZ Image Downloader
Select by Model or User Name
Fast Download of all Images for a Model or User
I created this as a way to quickly see all the high resolution images that had been posted to a given model without the need of clicking way to many buttons.
Description
FAQ
Comments (28)
nice. it works well. would it be difficult to add videos as a download option?
Edit: user malfunction. It does download videos : )
I think the API considers videos as images, I noticed videos are downloaded along with the images.
@Felldude ah my bad. I thought "none" would function as downloading all types, soft/mature/x but it looks like "X" serves that purpose. Thanks! Fantastic tool and fast.
How it use?
file extension .py is associated with Python for me so I just double-click on the file in filemanager and it launches.
normally I include a .bat the makes a venv and installs the requirements but I did not on this...I might update it later
What do you mean "from cmd"?
spincrit the Command Prompt app in Windows
Another question. how many images = a "page"? I'm trying to download more than 200 image/videos in a single model ID. I was able to get 200. I started 2nd run with page 200 (all time) but wasn't able to download any more. Does it download most recent to oldest by default?
I got error message:
Error on page 200: 429 Client Error: Too Many Requests for url: https://civitai.com/api/v1/images?limit=200&page=200&modelId=1684874&nsfw=X&period=AllTime
I know, classy : )
when trying to run page 200 start 400 end. Maybe there's a timeout. I switched IP via VPN but got same message. I'm not sure what a "page" is in terms if images though, maybe I'm requesting a range beyond the total.
So you can request up to 200 images per page, although 100 seems to cause less errors, unless you know for a fact there are over 40k images on a given model 200 starting page is quite high
The limit is a per page limit and it is poorly explained in the gui
Thanks! so Limit 200, Page Start 1, Page End 2 would result in 400 images/videos? I did a second run with 200 Page start 2, End page 2 and it tapped out at 288 images (I'm assuming that's everything in the gallery). Thanks again for sharing this!
@iodrg244 Likely that is everything, unless you are running 100's of multiple request on the same IP you should only get rejected by the API when nothing is there. I
does it include metadata, like generation info ?
I did not test that - it is sourcing the lower quality version of the image currently rather then the .png
Metadata is in EXIF no matter what as long as you're using the online generator for both downloads and the screen image, haven't checked with local gens.
EDIT: goes for local gens as well, as long as it's meta the user submitted.
If the image has metadata included than = yes! Sometimes it hasn't.
Going to get a lot of traffic now with the UK restrictions.
And if only I had figured out how to download my entire gallery instead of just my most recent 200.
I, don't know how to use a .py. I thought it would be like, an exe or something.
Alright with the UK ban coming up I really, REALLY need help from someone to tell me how to use this, I don't have any way to find out.
a video tutorial on installing python and basic requirements would be the way to go
Felldude Couldn't find anything along those lines and I'm running out of time. Every time I open this with python, cmd flashes and nothing further happens.
spincrit The version with the bat should install everything for you and launch
Felldude What are you talking about?
