catgirl.host allows uploads via HTTP POST. This page provides information on how to upload files using this method.
catgirl.host doesn't have an API at the moment. You can still use catgirl.host for your application by uploading images directly by sending an HTTP POST request to the URL https://catgirl.host/upload.
The request must contain the file and the following parameter:
"secret": 8ufLPswPPSeMbMiF37fehoNJTLlbXRbtK1nhxE6aPhqR78LV7W8XdonOvsRp9lS9. Optionally, you can send the domain and subdomain you would like to use with the POST request. The parameters for those are respectively named domain and subdomain.
The script will return a non-direct link to the image. Direct links are only served over the subdomain u.catgirl.host. You can change the link to this afterwards. Because links no longer contain a file extension, you have to add it yourself if you want a direct link. There are several ways you can do this, the first one is by retrieving it from the title, the second is by saving it from the uploaded file and adding it afterwards. Changing the subdomain directly will result in an error.
There are several errors you may encounter:
Unable to move uploaded file to destination directory for unknown reason. Please retry.
This is a server-sided issue and cannot be resolved by the user. The file could not be moved from it's temporary location to the destination directory for an unknown reason. Please try reuploading the file.
Unable to move uploaded file to destination directory, file already exists. Please retry.
This is a server-sided issue and cannot be resolved by the user. This error means a file with the same name already exists in the destination directory. Please try reuploading the file.
Unable to upload file, filetype not supported.
The file you tried to upload is not supported or no file was received. The filetypes supported are .jp(e)g, .png, .svg and .gif. Try uploading another file. Retrying will not help.
Unable to upload file, secret key invalid.
The argument "secret" was not received or it's value was incorrect. The parameter "secret" is required and it's value must be "8ufLPswPPSeMbMiF37fehoNJTLlbXRbtK1nhxE6aPhqR78LV7W8XdonOvsRp9lS9". Retrying will not help.
Unable to handle request, request method is not HTTP POST or no POST data was received.
This is not a valid POST request, the request method isn't HTTP POST or no POST data was received. Requests must contain a file and must be HTTP POST. Retrying will not help.