From c628e2f0e08b18e5e1f5f039aa3b9f48b7d7fac8 Mon Sep 17 00:00:00 2001 From: zlei9 Date: Sun, 29 Mar 2026 14:35:55 +0800 Subject: [PATCH] Initial commit with translated description --- SKILL.md | 262 +++++++++++++++++++++++++++++++++++++ _meta.json | 6 + references/platforms.md | 117 +++++++++++++++++ references/requirements.md | 127 ++++++++++++++++++ 4 files changed, 512 insertions(+) create mode 100644 SKILL.md create mode 100644 _meta.json create mode 100644 references/platforms.md create mode 100644 references/requirements.md diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..c60f5df --- /dev/null +++ b/SKILL.md @@ -0,0 +1,262 @@ +--- +name: upload-post +description: "通过Upload-Post API将内容上传到社交媒体平台。" +--- + +# Upload-Post API + +Post content to multiple social media platforms with a single API call. + +## Documentation + +- Full API docs: https://docs.upload-post.com +- LLM-friendly: https://docs.upload-post.com/llm.txt + +## Setup + +1. Create account at [upload-post.com](https://upload-post.com) +2. Connect your social media accounts +3. Create a **Profile** (e.g., "mybrand") - this links your connected accounts +4. Generate an **API Key** from dashboard +5. Use the profile name as `user` parameter in API calls + +## Authentication + +``` +Authorization: Apikey YOUR_API_KEY +``` + +Base URL: `https://api.upload-post.com/api` + +The `user` parameter in all endpoints refers to your **profile name** (not username), which determines which connected social accounts receive the content. + +## Endpoints Reference + +| Endpoint | Method | Description | +|----------|--------|-------------| +| `/upload_videos` | POST | Upload videos | +| `/upload_photos` | POST | Upload photos/carousels | +| `/upload_text` | POST | Text-only posts | +| `/upload_document` | POST | Upload documents (LinkedIn only) | +| `/uploadposts/status?request_id=X` | GET | Check async upload status | +| `/uploadposts/history` | GET | Upload history | +| `/uploadposts/schedule` | GET | List scheduled posts | +| `/uploadposts/schedule/` | DELETE | Cancel scheduled post | +| `/uploadposts/schedule/` | PATCH | Edit scheduled post | +| `/uploadposts/me` | GET | Validate API key | +| `/analytics/` | GET | Get analytics | +| `/uploadposts/facebook/pages` | GET | List Facebook pages | +| `/uploadposts/linkedin/pages` | GET | List LinkedIn pages | +| `/uploadposts/pinterest/boards` | GET | List Pinterest boards | +| `/uploadposts/reddit/detailed-posts` | GET | Get Reddit posts with media | +| `/ffmpeg` | POST | Process media with FFmpeg | + +## Upload Videos + +```bash +curl -X POST "https://api.upload-post.com/api/upload_videos" \ + -H "Authorization: Apikey YOUR_KEY" \ + -F "user=profile_name" \ + -F "platform[]=instagram" \ + -F "platform[]=tiktok" \ + -F "video=@video.mp4" \ + -F "title=My caption" +``` + +Key parameters: +- `user`: Profile username (required) +- `platform[]`: Target platforms (required) +- `video`: Video file or URL (required) +- `title`: Caption/title (required) +- `description`: Extended description +- `scheduled_date`: ISO-8601 date for scheduling +- `timezone`: IANA timezone (e.g., "Europe/Madrid") +- `async_upload`: Set `true` for background processing +- `first_comment`: Auto-post first comment + +## Upload Photos + +```bash +curl -X POST "https://api.upload-post.com/api/upload_photos" \ + -H "Authorization: Apikey YOUR_KEY" \ + -F "user=profile_name" \ + -F "platform[]=instagram" \ + -F "photos[]=@photo1.jpg" \ + -F "photos[]=@photo2.jpg" \ + -F "title=My caption" +``` + +Instagram & Threads support mixed carousels (photos + videos in same post). + +## Upload Text + +```bash +curl -X POST "https://api.upload-post.com/api/upload_text" \ + -H "Authorization: Apikey YOUR_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "user": "profile_name", + "platform": ["x", "threads", "bluesky"], + "title": "My text post" + }' +``` + +Supported: X, LinkedIn, Facebook, Threads, Reddit, Bluesky. + +## Upload Document (LinkedIn only) + +Upload PDFs, PPTs, DOCs as native LinkedIn document posts (carousel viewer). + +```bash +curl -X POST "https://api.upload-post.com/api/upload_document" \ + -H "Authorization: Apikey YOUR_KEY" \ + -F "user=profile_name" \ + -F 'platform[]=linkedin' \ + -F "document=@presentation.pdf" \ + -F "title=Document Title" \ + -F "description=Post text above document" +``` + +Parameters: +- `document`: PDF, PPT, PPTX, DOC, DOCX (max 100MB, 300 pages) +- `title`: Document title (required) +- `description`: Post commentary +- `visibility`: PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINER +- `target_linkedin_page_id`: Post to company page + +## Supported Platforms + +| Platform | Videos | Photos | Text | Documents | +|----------|--------|--------|------|-----------| +| TikTok | ✓ | ✓ | - | - | +| Instagram | ✓ | ✓ | - | - | +| YouTube | ✓ | - | - | - | +| LinkedIn | ✓ | ✓ | ✓ | ✓ | +| Facebook | ✓ | ✓ | ✓ | - | +| X (Twitter) | ✓ | ✓ | ✓ | - | +| Threads | ✓ | ✓ | ✓ | - | +| Pinterest | ✓ | ✓ | - | - | +| Reddit | - | ✓ | ✓ | - | +| Bluesky | ✓ | ✓ | ✓ | - | + +## Upload History + +```bash +curl "https://api.upload-post.com/api/uploadposts/history?page=1&limit=20" \ + -H "Authorization: Apikey YOUR_KEY" +``` + +Parameters: +- `page`: Page number (default: 1) +- `limit`: 10, 20, 50, or 100 (default: 10) + +Returns: upload timestamp, platform, success status, post URLs, errors. + +## Scheduling + +Add `scheduled_date` parameter (ISO-8601): + +```json +{ + "scheduled_date": "2026-02-01T10:00:00Z", + "timezone": "Europe/Madrid" +} +``` + +Response includes `job_id`. Manage with: +- `GET /uploadposts/schedule` - List all scheduled +- `DELETE /uploadposts/schedule/` - Cancel +- `PATCH /uploadposts/schedule/` - Edit (date, title, caption) + +## Check Upload Status + +For async uploads or scheduled posts: + +```bash +curl "https://api.upload-post.com/api/uploadposts/status?request_id=XXX" \ + -H "Authorization: Apikey YOUR_KEY" +``` + +Or use `job_id` for scheduled posts. + +## Analytics + +```bash +curl "https://api.upload-post.com/api/analytics/profile_name?platforms=instagram,tiktok" \ + -H "Authorization: Apikey YOUR_KEY" +``` + +Supported: Instagram, TikTok, LinkedIn, Facebook, X, YouTube, Threads, Pinterest, Reddit, Bluesky. + +Returns: followers, impressions, reach, profile views, time-series data. + +## Get Pages/Boards + +```bash +# Facebook Pages +curl "https://api.upload-post.com/api/uploadposts/facebook/pages" \ + -H "Authorization: Apikey YOUR_KEY" + +# LinkedIn Pages +curl "https://api.upload-post.com/api/uploadposts/linkedin/pages" \ + -H "Authorization: Apikey YOUR_KEY" + +# Pinterest Boards +curl "https://api.upload-post.com/api/uploadposts/pinterest/boards" \ + -H "Authorization: Apikey YOUR_KEY" +``` + +## Reddit Detailed Posts + +Get posts with full media info (images, galleries, videos): + +```bash +curl "https://api.upload-post.com/api/uploadposts/reddit/detailed-posts?profile_username=myprofile" \ + -H "Authorization: Apikey YOUR_KEY" +``` + +Returns up to 2000 posts with media URLs, dimensions, thumbnails. + +## FFmpeg Editor + +Process media with custom FFmpeg commands: + +```bash +curl -X POST "https://api.upload-post.com/api/ffmpeg" \ + -H "Authorization: Apikey YOUR_KEY" \ + -F "file=@input.mp4" \ + -F "full_command=ffmpeg -y -i {input} -c:v libx264 -crf 23 {output}" \ + -F "output_extension=mp4" +``` + +- Use `{input}` and `{output}` placeholders +- Poll job status until `FINISHED` +- Download result from `/ffmpeg/job//download` +- Supports multiple inputs: `{input0}`, `{input1}`, etc. + +Quotas: Free 30min/mo, Basic 300min, Pro 1000min, Advanced 3000min, Business 10000min. + +## Platform-Specific Parameters + +See [references/platforms.md](references/platforms.md) for detailed platform parameters. + +## Media Requirements + +See [references/requirements.md](references/requirements.md) for format specs per platform. + +## Error Codes + +| Code | Meaning | +|------|---------| +| 400 | Bad request / missing params | +| 401 | Invalid API key | +| 404 | Resource not found | +| 429 | Rate limit / quota exceeded | +| 500 | Server error | + +## Notes + +- Videos auto-switch to async if >59s processing time +- X long text creates threads unless `x_long_text_as_post=true` +- Facebook requires Page ID (personal profiles not supported by Meta) +- Instagram/Threads support mixed carousels (photos + videos) diff --git a/_meta.json b/_meta.json new file mode 100644 index 0000000..6ac07a3 --- /dev/null +++ b/_meta.json @@ -0,0 +1,6 @@ +{ + "ownerId": "kn7besm0rhvgwxgng386k0xf0h7zx61p", + "slug": "upload-post", + "version": "1.0.0", + "publishedAt": 1769372769050 +} \ No newline at end of file diff --git a/references/platforms.md b/references/platforms.md new file mode 100644 index 0000000..407f399 --- /dev/null +++ b/references/platforms.md @@ -0,0 +1,117 @@ +# Platform-Specific Parameters + +## TikTok + +| Parameter | Type | Description | +|-----------|------|-------------| +| `tiktok_title` | String | Override title for TikTok | +| `post_mode` | String | `DIRECT_POST` (default) or `MEDIA_UPLOAD` (draft) | +| `privacy_level` | String | `PUBLIC_TO_EVERYONE`, `MUTUAL_FOLLOW_FRIENDS`, `FOLLOWER_OF_CREATOR`, `SELF_ONLY` | +| `auto_add_music` | Boolean | Add background music to photos | +| `disable_comment` | Boolean | Disable comments | +| `brand_content_toggle` | Boolean | Paid partnership content | +| `photo_cover_index` | Integer | Cover photo index (0-based) | + +## Instagram + +| Parameter | Type | Description | +|-----------|------|-------------| +| `instagram_title` | String | Override title | +| `media_type` | String | `IMAGE`, `STORIES`, `REELS` | +| `collaborators` | String | Comma-separated usernames | +| `user_tags` | String | Comma-separated users to tag | +| `location_id` | String | Instagram location ID | + +## YouTube + +| Parameter | Type | Description | +|-----------|------|-------------| +| `youtube_title` | String | Video title | +| `youtube_description` | String | Video description | +| `privacy_status` | String | `public`, `private`, `unlisted` | +| `category_id` | String | YouTube category ID | +| `tags` | Array | Video tags | +| `made_for_kids` | Boolean | COPPA compliance | +| `playlist_id` | String | Add to playlist | + +## LinkedIn + +| Parameter | Type | Description | +|-----------|------|-------------| +| `linkedin_title` | String | Override title | +| `visibility` | String | `PUBLIC`, `CONNECTIONS`, `LOGGED_IN` | +| `target_linkedin_page_id` | String | Organization/page URN | + +Get page IDs: `GET /api/uploadposts/linkedin/pages` + +## Facebook + +| Parameter | Type | Description | +|-----------|------|-------------| +| `facebook_title` | String | Override title | +| `facebook_page_id` | String | Page ID (required for pages) | +| `facebook_media_type` | String | `POSTS` or `STORIES` | + +Get page IDs: `GET /api/uploadposts/facebook/pages` + +Note: Personal profiles not supported by Meta API - only Pages. + +## X (Twitter) + +| Parameter | Type | Description | +|-----------|------|-------------| +| `x_title` | String | Override title | +| `x_long_text_as_post` | Boolean | Post long text as single post (default: thread) | +| `reply_settings` | String | `following`, `mentionedUsers`, `subscribers`, `verified` | +| `reply_to_id` | String | Tweet ID to reply to | +| `community_id` | String | Post to community | +| `tagged_user_ids` | Array | Users to tag in photos (max 10) | + +Thread behavior: Long text auto-splits at 280 chars. Media attaches to first tweet only. + +## Threads + +| Parameter | Type | Description | +|-----------|------|-------------| +| `threads_title` | String | Override title | + +Supports mixed carousels (photos + videos). + +## Pinterest + +| Parameter | Type | Description | +|-----------|------|-------------| +| `pinterest_title` | String | Pin title | +| `pinterest_board_id` | String | Target board ID (required) | +| `pinterest_link` | String | Destination link | +| `pinterest_alt_text` | String | Alt text for image | + +Get board IDs: `GET /api/uploadposts/pinterest/boards` + +## Reddit + +| Parameter | Type | Description | +|-----------|------|-------------| +| `reddit_title` | String | Post title | +| `subreddit` | String | Target subreddit (required) | +| `reddit_flair_id` | String | Flair ID | +| `nsfw` | Boolean | Mark as NSFW | +| `spoiler` | Boolean | Mark as spoiler | + +## Bluesky + +| Parameter | Type | Description | +|-----------|------|-------------| +| `bluesky_title` | String | Override title | +| `alt_text` | String | Alt text for images | + +Limits: 4 images max, 1MB per image, 50 uploads/day. + +## Common Parameters (All Platforms) + +| Parameter | Type | Description | +|-----------|------|-------------| +| `first_comment` | String | Auto-post first comment (Instagram, Facebook, Threads, Bluesky, Reddit, X, YouTube) | +| `async_upload` | Boolean | Background processing | +| `scheduled_date` | String | ISO-8601 schedule time | +| `timezone` | String | IANA timezone for schedule | diff --git a/references/requirements.md b/references/requirements.md new file mode 100644 index 0000000..58706ec --- /dev/null +++ b/references/requirements.md @@ -0,0 +1,127 @@ +# Media Requirements by Platform + +## Photo Requirements + +### Instagram +- Formats: JPEG, PNG, GIF +- Aspect ratio: 4:5 to 1.91:1 +- Recommended: 1080x1350px (4:5) + +### TikTok +- Formats: JPG, JPEG, WEBP only +- Use for photo slideshows with `auto_add_music` + +### Facebook +- Formats: JPEG, PNG, GIF, WebP +- Max size: 10MB recommended + +### X (Twitter) +- Formats: JPEG, PNG, GIF +- Max size: 5MB (images), 15MB (GIFs) +- Max 4 images per tweet + +### LinkedIn +- Formats: JPEG, PNG, GIF +- Recommended: 1200x627px + +### Threads +- Formats: JPEG, PNG +- Max size: 8MB +- Aspect ratio: 10:1 to 1:10 +- Width: 320px min, 1440px max +- Color space: sRGB (auto-converted) + +### Pinterest +- Formats: BMP, JPEG, PNG, TIFF, GIF, WebP +- Max size: 20MB +- Recommended: 1000x1500px (2:3) +- Min: 600x900px, Max: 2000x3000px +- Carousel: up to 5 images, same dimensions + +### Reddit +- Formats: JPG, PNG, GIF, WEBP +- Max size: 10MB + +### Bluesky +- Formats: JPEG, PNG, GIF, WebP +- Max size: 1MB per image +- Max 4 images per post +- Daily limit: 50 uploads (photos + videos) + +## Video Requirements + +### TikTok +- Formats: MP4, MOV, WebM +- Duration: 3s to 10min +- Max size: 4GB +- Recommended: 1080x1920 (9:16) +- Codec: H.264 + +### Instagram +- Formats: MP4, MOV +- Reels: 0-90s, 9:16 aspect +- Feed: up to 60s +- Max size: 4GB +- Codec: H.264, AAC audio + +### YouTube +- Formats: MP4, MOV, AVI, WMV, FLV, WebM +- Max size: 256GB +- Max duration: 12 hours +- Recommended: 1920x1080 or 3840x2160 + +### LinkedIn +- Formats: MP4 +- Duration: 3s to 10min +- Max size: 5GB +- Aspect: 1:2.4 to 2.4:1 + +### Facebook +- Formats: MP4, MOV +- Max size: 10GB +- Max duration: 240min +- Recommended: H.264, AAC + +### X (Twitter) +- Formats: MP4, MOV +- Max size: 512MB +- Max duration: 140s (2min 20s) +- Codec: H.264 + +### Threads +- Formats: MP4, MOV +- Max duration: 5min +- Aspect: 9:16 recommended + +### Pinterest +- Formats: MP4, MOV, M4V +- Duration: 4s to 15min +- Max size: 2GB +- Aspect: 1:2 to 1.91:1 + +### Bluesky +- Formats: MP4 +- Max size: 50MB +- Max duration: 60s +- Daily limit: 50 uploads + +## Document Requirements (LinkedIn only) + +- Formats: PDF, PPT, PPTX, DOC, DOCX +- Max size: 100MB +- Max pages: 300 + +## FFmpeg Re-encoding + +If videos fail platform validation, use the FFmpeg endpoint: + +```bash +# Convert to H.264 MP4 +ffmpeg -y -i {input} -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 128k {output} + +# Resize to 1080p +ffmpeg -y -i {input} -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2" -c:v libx264 -crf 23 {output} + +# Convert to 9:16 vertical +ffmpeg -y -i {input} -vf "scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2" -c:v libx264 -crf 23 {output} +```