Upload a file and retrieve URL
POST/urlshare
Uploads a file to the server and returns a URL where the uploaded file can be accessed temporarily. This endpoint supports uploading images only, images shoudl be 1024x1024, or 1024x768 or 768x1024, otherwise they will be resized automatically. Files larger than 5mb will be rejected.
Request
- multipart/form-data
Body
required
File to be uploaded. Only images under 5mb are allowed.
file binary
File to be uploaded. Supported formats include .png, .jpg, .jpeg, .svg, .gif, .bmp, .tif, .tiff, .webp
Responses
- 200
- 400
- 500
File uploaded successfully and URL returned
- application/json
- Schema
- Example (from schema)
Schema
url string
URL to access the uploaded file.
{
"url": "https://apipie.ai/temp/uniquefilename.jpg"
}
No file uploaded or the file type is not supported
Internal server error or unable to save file
Loading...