Picser API Documentation

Upload images to GitHub and get instant CDN URLs via jsDelivr. Perfect for developers who need reliable image hosting.

🚀 Two Ways to Use Picser

📡 Use Hosted Version

Send requests directly to our hosted API endpoint:

https://picser.pages.dev/api/public-upload

✅ Your credentials are used only for the upload
✅ Nothing is stored on our servers
✅ Direct GitHub API communication

🏠 Self-Host for Free

Deploy your own instance on Cloudflare Pages:

✅ Complete privacy and control
✅ Free Cloudflare Pages hosting
✅ Custom domain support

Lightning Fast CDN

Images are served via jsDelivr CDN with global caching and high performance

Permanent URLs

Commit-based URLs ensure your images are permanently accessible

Global Access

Access your images from anywhere with multiple URL formats

API Configuration

Upload Endpoint

POST/api/public-upload

Your own instance

POSTpicser.pages.dev/api/public-upload

Hosted version (recommended)

Parameters

ParameterTypeRequiredDescription
fileFileYesImage file to upload (JPG, PNG, GIF, WebP, max 100MB)
github_tokenStringYesGitHub personal access token
github_ownerStringYesGitHub username or organization
github_repoStringYesGitHub repository name
github_branchStringNoBranch name (default: main)
folderStringNoUpload folder (default: uploads)

Code Examples

Ready-to-use code snippets in multiple programming languages. Click any tab to view examples and copy the code.

bash
1curl -X POST \
2  -H "Content-Type: multipart/form-data" \
3  -F "file=@/path/to/your/image.png" \
4  -F "github_token=ghp_xxxxxxxxxxxx" \
5  -F "github_owner=sh20raj" \
6  -F "github_repo=picser" \
7  -F "github_branch=main" \
8  -F "folder=uploads" \
9  https://picser.pages.dev/api/public-upload
10
11# Or use the hosted version directly:
12# https://picser.pages.dev/api/public-upload

Interactive Playground

Test the upload functionality with your own API credentials and files. This playground uses your GitHub token to upload images directly to your repository.

Drag & drop your image file here

or

Ready to get started?

Try uploading an image through our web interface or start using the API directly.