Skip to content

Upload Image

Upload an image file to Picora. Returns a permanent CDN URL you can use anywhere.

Endpoint

POST https://api.picora.com/v1/images

Authentication

Requires an API key passed as a Bearer token in the Authorization header.

Authorization: Bearer sk_live_YOUR_KEY

Request

Content-Type: multipart/form-data

FieldTypeRequiredDescription
fileFile (binary)YesThe image file to upload. Supported formats: JPEG, PNG, GIF, WebP, AVIF, SVG. Maximum size: 50 MB.

Example Request

Terminal window
curl -X POST "https://api.picora.com/v1/images" \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-F "file=@./photo.jpg"

Response

Status: 201 Created

{
"success": true,
"data": {
"id": "xK9mR2pQ7vB",
"url": "https://img.picora.com/xK9mR2pQ7vB.webp",
"filename": "photo.jpg",
"size": 102400,
"width": 1920,
"height": 1080,
"created_at": "2026-04-17T08:00:00.000Z"
}
}

Response Fields

FieldTypeDescription
idstringUnique 11-character image identifier (nanoid). Used in the URL path.
urlstringPermanent public CDN URL. Format: https://img.picora.com/{id}.{ext}.
filenamestringOriginal filename as provided in the upload.
sizenumberFile size in bytes.
widthnumberImage width in pixels.
heightnumberImage height in pixels.
created_atstringISO 8601 timestamp of when the image was uploaded.

Error Responses

StatusCodeDescription
401UNAUTHORIZEDMissing or invalid API key.
403QUOTA_EXCEEDEDYou have reached your plan’s storage quota. Upgrade or delete images.
422VALIDATION_ERRORInvalid file format, file too large, or missing file field.
500INTERNALInternal server error. Please try again or contact support.

Notes

  • Images are automatically optimized and served as WebP where supported by the browser
  • The CDN URL is available immediately after upload
  • Uploaded images count against your plan’s storage quota (see Pricing)
  • Images are permanently stored — they do not expire unless you delete them