soclip API, CLI & MCP Documentation
soclip-cli@0.3.0 and soclip-mcp@0.1.4|Last updated: 2026-10-25|Plain-text docs for AI agents (/llms.txt)Quickstart
Get up and running with soclip CLI in under 60 seconds.
- Get an API Key: Sign up on soclip to instantly receive 500 free credits. Copy your key from the Dashboard.
- Install the CLI tool:
npm i -g soclip-cli - Save your API Key:
soclip config set-key sc_live_your_api_key - Run your first command:
soclip "https://www.tiktok.com/@tiktok/video/7106594312292453675" --quality best
Authentication
All HTTP API requests require authentication via a Bearer API Token passed in the Authorization header.
Authorization: Bearer sc_live_abcd1234efgh5678...API Reference
Base URL
https://api.soclip.devAll endpoints below are absolute paths on this host. Every request must carry the Authorization: Bearer <api-key> header.
https://api.soclip.dev/v1/media(Costs 2 credits)Resolves social video URL and returns metadata alongside direct media links.
Request Body
{
"url": "https://www.tiktok.com/@tiktok/video/7106594312292453675"
}cURL
curl -X POST https://api.soclip.dev/v1/media \
-H "Authorization: Bearer sc_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.tiktok.com/@tiktok/video/7106594312292453675"}'Response Example (HTTP 200)
{
"success": true,
"credits_used": 2,
"credits_remaining": 498,
"data": {
"source": "tiktok",
"title": "Sample Video Title",
"duration": 15,
"thumbnail": "https://...",
"author": "Author Name",
"medias": [
{ "label": "HD", "type": "video", "ext": "mp4", "quality": "hd", "url": "https://..." },
{ "label": "SD", "type": "video", "ext": "mp4", "quality": "sd", "url": "https://..." },
{ "label": "Audio", "type": "audio", "ext": "mp3", "quality": "audio", "url": "https://..." }
]
}
}https://api.soclip.dev/v1/balance(Free call)Queries remaining account credits balance without deducting credits.
{
"success": true,
"credits": 498
}CLI Tool Reference
Install with npm i -g soclip-cli. The package name is soclip-cli, the command it installs is soclip.
Commands
Output human-readable summary: title, duration, platform, and qualities list.
Output a single direct link line. See the quality values below.
Output raw JSON response from backend.
Check remaining credits balance. Free, costs 0 credits.
Save your API key to ~/.soclip/config.json.
--quality values
bestThe HD video (always listed first).
worstThe lowest video version (SD when the platform serves one).
hd / sd / audioThat exact entry.
Requires soclip-cli 0.3.0 or later — run npm i -g soclip-cli to update.
API key resolution order
The CLI looks for your key in this order and uses the first one it finds:
- The
SOCLIP_API_KEYenvironment variable (highest priority — it overrides the config file) - The config file at
~/.soclip/config.json, written bysoclip config set-key
# Option A — persist the key on this machine
soclip config set-key sc_live_your_api_key
# Option B — per-shell / CI, wins over the config file
export SOCLIP_API_KEY="sc_live_your_api_key"Useful when scripting: set SOCLIP_API_KEY inline to use a different account for one command without touching your saved config.
Downloading the file
soclip returns a direct link; use any HTTP client to fetch it. Direct links redirect to a CDN, so you must follow redirects and set the output filename explicitly — the signed URLs are long and have no usable filename in them.
# Recommended: -L follows the CDN redirect, -o names the file
curl -L -o video.mp4 "$(soclip "<url>" --quality best)"
# Equivalent with a pipe
soclip "<url>" --quality best | xargs -I{} curl -L -o video.mp4 "{}"Do not use curl -O here. Without -L it saves a 0-byte file (it stores the redirect, not the video), and -O cannot derive a sane filename from a signed CDN URL.
MCP Server (Claude / Cursor)
`soclip-mcp` connects AI assistants directly to video data resolution via standard Model Context Protocol.
Claude Desktop Configuration
{
"mcpServers": {
"soclip": {
"command": "npx",
"args": ["-y", "soclip-mcp"],
"env": {
"SOCLIP_API_KEY": "sc_live_your_api_key"
}
}
}
}Cursor uses the same block in .cursor/mcp.json. If you already ran soclip config set-key, the server falls back to ~/.soclip/config.json and the env block can be omitted.
Exposed tools
| Tool | Parameters | Cost |
|---|---|---|
get_video_mediaResolve a social video URL into metadata plus direct media links. | url (string, required)TikTok, Instagram, X/Twitter or Facebook post URL. | 2 credits$0.002 |
get_balanceReturn the account's remaining credit balance. | None | 0 creditsFree |
Pricing & Billing
Billing is simple and transparent: 1 credit = $0.001. Credits never expire.
| Action | Credits Charged | Cost Equivalent |
|---|---|---|
| Get Direct Links / Metadata | 2 credits | $0.002 |
| Check Account Balance | 0 credits | Free |