API Reference
The complete, always-current reference for every endpoint — request/response schemas, parameters, and a try-it-out console — is the interactive API playground (powered by Scalar, generated from the live OpenAPI spec).
The map below groups every API domain and links each to the doc that explains it. The detailed prose pages in this section (Upload, Images, Videos, Audio, Docs, KB Sync, Errors) go deep on the core media APIs; for everything else, the product docs give the concepts and the playground gives the exact endpoints.
API domains
Media & resources
| Domain | Path | Learn more |
|---|---|---|
| Images | /v1/images | Images API · Upload |
| Videos | /v1/videos | Videos API |
| Audio | /v1/audio | Audio API |
| Documents | /v1/docs | Docs API |
| Unified media | /v1/media | Listing + batch delete across types |
| Resumable upload | /v1/uploads | TUS upload |
| Custom domains | /v1/domains | Serve media on your own domain |
| Storage tiering | /v1/storage-tier | Storage tiering |
| Watermark | /v1/watermark | Watermark templates |
Collections & knowledge bases
| Domain | Path | Learn more |
|---|---|---|
| Collections | /v1/collections | Collections |
| Collection types | /v1/collection-types | Collection types |
| Episodes | /v1/collections/{id}/episodes | Episodes |
| Knowledge bases | /v1/kbs | KB Sync v1 vs v2 |
AI generation
| Domain | Path | Learn more |
|---|---|---|
| AIGC projects & generation | /v1/aigc/* | AIGC |
| AI image tools | /v1/ai/* | AI image tools |
| Agreements (AIGC terms) | /v1/agreements/* | Consent for AI features |
Publishing
| Domain | Path | Learn more |
|---|---|---|
| Published pages | /v1/published-pages | Publishing |
| Multi-platform publish | /v1/publish/* | Publishing |
Billing & credits
| Domain | Path | Learn more |
|---|---|---|
| Billing | /v1/billing/* | Plans & billing |
| Credit wallet | /v1/credit/* | Credit wallet |
| Campaigns & coupons | /v1/campaigns, /v1/coupons | Promotions |
| Notifications | /v1/notifications | Notifications |
Teams
| Domain | Path | Learn more |
|---|---|---|
| Organizations | /v1/orgs/* | Teams & organizations |
Account & authentication
| Domain | Path | Learn more |
|---|---|---|
| Authentication | /v1/auth/* | Security |
| User & profile | /v1/user/*, /v1/me/* | Account |
| API keys | /v1/api-keys | API Keys |
| OAuth 2.1 provider | /v1/oauth/* | Authorized apps |
| OAuth device flow | /v1/oauth/device* | Developer auth |
Analytics & data
| Domain | Path | Learn more |
|---|---|---|
| Insights | /v1/insights/* | Insights |
| Backup & export | /v1/backup/* | Backup |
| Migration | /v1/migration/* | Migration |
Integrations & system
| Domain | Path | Learn more |
|---|---|---|
| MCP catalog | /v1/mcp/* | MCP Marketplace |
| Support tickets | /v1/tickets | In-dashboard support |
| Health | /health | Service status |
| Webhooks | /webhooks/{provider} | Provider-signed callbacks (inbound) |
Admin endpoints (
/v1/admin/*) requireis_adminand are internal operations — not part of the public API.
Base URLs
| Platform | API base | Default media CDN |
|---|---|---|
| Overseas (CF) | https://api.picora.me | https://media.picora.me |
| Mainland (Aliyun) | https://api.picora.cn | https://media.picora.cn |
The two platforms have fully isolated databases. An account on one is not accessible from the other. See FAQ → why two platforms?.
Authentication
Picora supports two authentication mechanisms (described in the user-facing API Keys guide and authorized OAuth apps).
API Key (Bearer sk_live_...)
Used by tool clients (PicGo / Moraya / your scripts) and stdio MCP. Set on every request:
Authorization: Bearer sk_live_abcdef0123456789...JWT (web dashboard)
Browser sessions get JWT access tokens (15-min lifetime) + refresh token cookies (7-day, httpOnly). The dashboard handles refresh transparently. Direct API consumers should prefer API Keys, not JWTs.
OAuth 2.1 (HTTP MCP, v0.14+)
Hosted MCP server at mcp.picora.me uses OAuth 2.1 with refresh token rotation. See MCP → Remote MCP.
Common response shape
All Picora API endpoints return a uniform JSON envelope.
Success:
{ "success": true, "data": { ... } }Error:
{ "success": false, "error": "Human-readable description", "code": "MACHINE_CODE", "meta": { ... } }code is the machine-readable identifier (see errors). meta is endpoint-specific structured context (e.g., { "type": "img_storage", "used": 104857600, "limit": 104857600 } for QUOTA_EXCEEDED).
Pagination
List endpoints use cursor pagination (not offset). Pass the cursor from the previous response’s nextCursor field; an empty / absent cursor means the first page.
curl "https://api.picora.me/v1/images?limit=20"# → { "items": [...], "nextCursor": "eyJpZCI6Il..." }
curl "https://api.picora.me/v1/images?limit=20&cursor=eyJpZCI6Il..."# → { "items": [...], "nextCursor": null } // last pageMaximum limit per request is 50.
Rate limiting
Per-tier rate limits (introduced in v0.12.0):
| Tier | Endpoints | Limit (per minute) |
|---|---|---|
read | GET /v1/images, GET /v1/media, GET /v1/docs/*, GET /v1/admin/* | 600 |
mutation | PATCH / DELETE operations on resources | 120 |
upload | POST /v1/images, POST /v1/videos, POST /v1/audio, POST /v1/docs | 60 |
Excess requests return HTTP 429 with Retry-After header. See errors → RATE_LIMITED.
ID format
All resource IDs use nanoid (URL-safe). Two lengths:
| Resource | Length | Reason |
|---|---|---|
| Images | 11 chars (e.g., xK9mR2pQ7vB) | Used in public CDN URLs; 11 chars balances brevity with collision resistance |
| Other (videos / audio / docs / users / API keys) | 21 chars (default nanoid) | Internal IDs, more entropy |
API keys use a special format: sk_live_ prefix + 32-char nanoid = 40 chars total.
Timestamps
All timestamps are returned in ISO 8601 UTC format:
{ "createdAt": "2026-04-27T08:00:00.000Z" }Clients should format to user’s local timezone.
CORS
Browser requests from the picora-center dashboard work by default. API-Key-authenticated requests bypass Origin checks (this fix, v0.12.0+, lets Tauri-based desktop apps like Moraya call the API directly).
Versioning
The current API version is /v1/ and is stable. Breaking changes will introduce /v2/; the old version remains supported for at least 12 months after /v2/ ships.
Related
- Upload guide — multipart upload essentials
- Errors — full error code reference
- Images API / Videos / Audio
- API Explorer — interactive Scalar try-it-out
- User Guide — task-oriented documentation
- MCP — MCP setup, the 19-tool reference, and the remote endpoint