YohPic API (also known as Bridge API) allows to upload pictures to your account.
API doesn't have rate limiting but is affected by the Flood upload limits setted by our service.
API key
API works with a single API key that you can set at My Profile > API Key.
API call
Request method
API calls can be done using the POST or GET request methods but since GET request are limited by the maximum allowed length of an URL you should prefer the POST request method.
Request URL
http://yohpic.com/api/1/[action]/[username]/?key=[yourapikey]&source=[yoururlimages]&format=[yourformat]&nsfw=[yournsfw]
Parameters
- key The API key, it can be set in your admin dashboard settings.
- username Your user name on our system.
- action What you want to do [values: upload].
- source Either a image URL or a base64 encoded image string. You can also use FILES["source"] in your request.
- format Sets the return format [values: json (default), redirect, txt].
- nsfw Not Safe for Work [values: 0 (default), 1]
API response
API responses will vary depending on the format parameter:
- json Display all the image uploaded information in JSON format. [default]
- txt Returns the image direct URL in text/plain format.
- redirect Redirects to the image viewer URL.
When using JSON the response will have headers status codes to allow you to easily notice if the request was OK or not. It will also output the status_txt
and status_code
properties.