Upload Image
Upload an image file to Picora. Returns a permanent CDN URL you can use anywhere.
Endpoint
POST https://api.picora.com/v1/imagesAuthentication
Requires an API key passed as a Bearer token in the Authorization header.
Authorization: Bearer sk_live_YOUR_KEYRequest
Content-Type: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
file | File (binary) | Yes | The image file to upload. Supported formats: JPEG, PNG, GIF, WebP, AVIF, SVG. Maximum size: 50 MB. |
Example Request
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
| Field | Type | Description |
|---|---|---|
id | string | Unique 11-character image identifier (nanoid). Used in the URL path. |
url | string | Permanent public CDN URL. Format: https://img.picora.com/{id}.{ext}. |
filename | string | Original filename as provided in the upload. |
size | number | File size in bytes. |
width | number | Image width in pixels. |
height | number | Image height in pixels. |
created_at | string | ISO 8601 timestamp of when the image was uploaded. |
Error Responses
| Status | Code | Description |
|---|---|---|
401 | UNAUTHORIZED | Missing or invalid API key. |
403 | QUOTA_EXCEEDED | You have reached your plan’s storage quota. Upgrade or delete images. |
422 | VALIDATION_ERROR | Invalid file format, file too large, or missing file field. |
500 | INTERNAL | Internal 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