Typora Integration
Configure Typora to automatically upload images to Picora whenever you paste or drag an image into your document.
Prerequisites
- Typora installed (typora.io)
- A Picora account with an API key (see Quick Start)
curlandpython3available in your terminal (pre-installed on macOS/Linux; on Windows use WSL or Git Bash)
Configuration Steps
1. Open Typora Preferences
In Typora, go to File → Preferences (macOS: Typora → Settings), then click the Image tab.
2. Set Upload Service
Under Image Upload Setting:
- Set When Insert to:
Upload Image - Set Upload Service to:
Custom Command
3. Enter the Upload Command
Paste the following command into the Command field, replacing sk_live_YOUR_KEY with your actual API key:
curl -s -X POST \ -H "Authorization: Bearer sk_live_YOUR_KEY" \ -F "file=${filename}" \ https://api.picora.com/v1/images \ | python3 -c "import sys,json;print(json.load(sys.stdin)['data']['url'])"On Windows (PowerShell), use:
curl.exe -s -X POST -H "Authorization: Bearer sk_live_YOUR_KEY" -F "file=${filename}" https://api.picora.com/v1/images | python3 -c "import sys,json;print(json.load(sys.stdin)['data']['url'])"4. Test the Integration
Click “Test Uploader” in the preferences panel. Typora will upload a test image and confirm the URL is returned correctly.
How It Works
When you paste or drag an image into Typora:
- Typora saves the image to a temporary file and sets
${filename}to its path - The
curlcommand uploads the file to the Picora API python3parses the JSON response and prints only the URL to stdout- Typora reads the URL from stdout and replaces the local image path in your Markdown
Troubleshooting
“Upload failed” error: Verify curl and python3 are accessible from your shell. Run which curl && which python3 in Terminal to confirm.
Command not found on Windows: Install Python from python.org and ensure it’s in your PATH. Use python instead of python3 if needed.
401 Unauthorized: Double-check your API key is correct and active in the Picora dashboard.