Assets
Upload media files and subtitle files to the Peako CDN. Uploaded files get a permanent CDN URL you can reference in render requests.
Upload Asset
POST /api/assets/upload
Upload a video, audio, image, or subtitle file. Returns a CDN URL for use in templates and render requests.
Headers:
X-API-Key: <your-api-key>(required)
Request Format: multipart/form-data
Fields:
file(required) — binary file content
Allowed file types:
| Type | MIME | Extensions |
|---|---|---|
| Video | video/* | .mp4, .webm, .mov, .mkv, .avi |
| Audio | audio/* | .mp3, .wav, .aac, .m4a, .ogg |
| Image | image/* | .jpg, .jpeg, .png, .gif, .webp, .svg |
| Subtitle | text/plain | .srt, .vtt, .lrc |
| Subtitle | text/x-ssa | .ass, .ssa |
File Size Limit: 2 GB per file
Response (200 — Success):
{
"url": "https://peako.shin0x.space/assets/550e8400-e29b-41d4-a716-446655440000.mp4"
}
Error Codes:
400— Invalid file type or extension401— Missing or invalid API key413— File exceeds 2 GB
Examples:
# Upload a video file
curl -X POST \
-H "X-API-Key: YOUR_KEY" \
-F "file=@my-video.mp4" \
https://peako.shin0x.space/api/assets/upload
# Response:
# { "url": "https://peako.shin0x.space/assets/550e8400.mp4" }
# Upload an image
curl -X POST \
-H "X-API-Key: YOUR_KEY" \
-F "file=@thumbnail.jpg" \
https://peako.shin0x.space/api/assets/upload
# Upload a subtitle file
curl -X POST \
-H "X-API-Key: YOUR_KEY" \
-F "file=@captions.srt" \
https://peako.shin0x.space/api/assets/upload
Notes
- Uploaded files are stored permanently until manually deleted (no auto-expiry on upload)
- Rendered output files expire after 7 days
- The returned
urlis what you pass assrc_urlorupload_urlin render requests - Files must originate from the Peako CDN (
peako.shin0x.space/assets/...) to be accepted in render requests — external URLs are blocked for security
Next: Templates