DEVELOPER DOCS

Put SocialAI Studio's AI tools inside your own apps.

Our MCP server (Model Context Protocol, Streamable HTTP) exposes the studio's AI video, headshot and career tools to any MCP-compatible assistant — Claude, Cursor, your own agent — over one HTTPS endpoint.

Quick facts

Base URL

https://socialai.website/api/mcp

Health check

GET https://socialai.website/api/mcp/health

No auth needed. Returns service name and version.

Authentication

Authorization: Bearer <api-key>

Get your key from Settings → API keys in your dashboard, or contact us and we'll issue one.

Credits

Every tool call burns platform credits from your SocialAI Studio account — same rates as the web app.

Failed generations cost zero.

Your email must be verified before any generation. Admins can set a per-key rate limit (requests/minute) and monthly spend cap — a capped key is refused with a clear error and no charge. New videos are served as signed links that expire after 24 hours; re-poll check_job_status or POST /api/media/signed-url for a fresh link.

Video is asynchronous

generate_video returns a job_id immediately — it does not wait for the render. Poll check_job_status with that job_id until the result is complete (with a video URL) or failed.

The 10 tools

Call any of these with the tools/call method. Responses come back as MCP content blocks (text or image).

generate_video

Starts an AI video generation job and returns a job_id immediately. Poll check_job_status until the video is ready. Pass image_url (https URL) or image_data_url (base64) with a photo to make the video start from that exact photo — the best face-likeness model is selected automatically and the photo is also sent as a character reference so the face stays locked across the whole clip. Provide only one of the two image fields. Without either, the video is generated from the text prompt alone and will not look like a specific person.

  • prompt (required)
  • duration: 4 / 6 / 8 / 10 / 15 / 30 / 60s
  • quality: fast / pro / ultra
  • ratio: 9:16 / 16:9
  • image_url (optional https URL — video starts from this exact photo)
  • image_data_url (optional PNG/JPEG/WebP base64 data URL — same effect; provide only one of image_url / image_data_url)
  • privacy_consent (REQUIRED with a photo: true = "I am the person in this photo or have their written permission" — stored with the job)

check_job_status

Polls the provider for a video job and returns pending, complete (with the video URL) or failed. Credits settle automatically when the job finishes.

  • job_id (required)

generate_long_video

Starts a LONG video (up to 10 minutes) built from multiple segments stitched into one continuous video. Quote-first: call with confirm=false to get the total cost, show it to the user, and only call again with confirm=true after they approve it. Never charges without confirmation. Pass image_url or image_data_url with a photo and EVERY segment starts from that exact photo — the best face-likeness model is selected automatically and the photo is also sent as a character reference so the face stays locked across the whole video. Image-to-video supports segment lengths up to 30s: use segment_duration 10 or 30 with a photo.

  • prompt (required)
  • total_duration: seconds, max 600 (multiple of segment_duration)
  • segment_duration: 10 / 30 / 60s (10 / 30 with a photo)
  • quality: fast / pro / ultra
  • ratio: 9:16 / 16:9
  • confirm: false = quote only · true = start after approval
  • image_url (optional https URL — every segment starts from this exact photo)
  • image_data_url (optional PNG/JPEG/WebP base64 data URL — same effect; provide only one of image_url / image_data_url)
  • privacy_consent (REQUIRED with a photo: true = "I am the person in this photo or have their written permission" — stored with the job)

check_long_video_status

Polls a long video and advances its segments. Returns generating (with progress), complete (with every segment URL + one watch URL), or failed.

  • long_video_id (required)

generate_headshot

Turns a selfie into a professional AI headshot and returns the image.

  • image_data_url (PNG/JPEG/WebP base64 data URL)
  • style: corporate / creative / outdoor / studio

enhance_resume

AI-enhances a resume section with stronger verbs and ATS-friendly keywords.

  • resume_text (required)
  • section: summary / bullets / skills
  • job_description (optional)

score_ats

Scores a resume against a job description (0–100) with matched and missing keywords plus feedback as JSON.

  • resume_text (required)
  • job_description (required)

generate_cover_letter

Writes a tailored cover letter, 250–350 words.

  • name, job_title, company (required)
  • job_description (optional)
  • tone: professional / friendly / bold

optimize_linkedin

Rewrites LinkedIn sections to be recruiter-magnetic. Returns JSON with headline, about and bullets.

  • headline (optional)
  • about (optional)
  • experience (optional)

get_credit_balance

Returns your current plan and remaining credit balance. Great first call to check your key works.

  • no arguments

Code examples

Plain JSON-RPC over HTTPS. The server speaks Streamable HTTP — include the Accept header as shown and read the response stream.

1 · Initialize

curl -s https://socialai.website/api/mcp \
-H "Authorization: Bearer sk_socialai_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2025-03-26",
      "capabilities": {},
      "clientInfo": { "name": "my-app", "version": "1.0.0" }
    }
  }'

2 · List tools

curl -s https://socialai.website/api/mcp \
-H "Authorization: Bearer sk_socialai_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/list",
    "params": {}
  }'

3 · Call a tool (credit balance)

curl -s https://socialai.website/api/mcp \
-H "Authorization: Bearer sk_socialai_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": { "name": "get_credit_balance", "arguments": {} }
  }'

4 · Generate a video, then poll for it

curl -s https://socialai.website/api/mcp \
-H "Authorization: Bearer sk_socialai_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "generate_video",
      "arguments": {
        "prompt": "A golden retriever running through a field at sunset, cinematic",
        "duration": 10,
        "quality": "fast",
        "ratio": "16:9"
      }
    }
  }'
# Returns {"content":[{"type":"text","text":"job_id: ..."}]}
# Then poll until it is done:
curl -s https://socialai.website/api/mcp \
-H "Authorization: Bearer sk_socialai_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 5,
    "method": "tools/call",
    "params": {
      "name": "check_job_status",
      "arguments": { "job_id": "PASTE_JOB_ID" }
    }
  }'

5 · Generate a video from a photo (image-to-video, face locked)

curl -s https://socialai.website/api/mcp \
-H "Authorization: Bearer sk_socialai_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 6,
    "method": "tools/call",
    "params": {
      "name": "generate_video",
      "arguments": {
        "prompt": "The founder speaks to camera about her skincare brand, natural lip-sync, steady camera",
        "duration": 10,
        "quality": "fast",
        "ratio": "9:16",
        "image_url": "https://example.com/founder-photo.jpg",
        "privacy_consent": true
      }
    }
  }'
# The video starts from the exact photo: the photo is sent as the
# first frame AND as a character reference, and the best face-likeness
# model is picked automatically, so the person in the video is the
# person in the photo — not a generic lookalike. privacy_consent=true
# confirms you are the person in the photo or have their written
# permission; it is REQUIRED for photo jobs and is stored with the
# job. Without it, a photo job is refused. image_data_url
# (base64 PNG/JPEG/WebP) works the same way; provide only one of the
# two. generate_long_video takes the same two fields, and EVERY
# segment starts from the same photo. Image-to-video supports up to
# 30s per clip / segment: use segment_duration 10 or 30 for long
# videos with a photo.

Try it with the MCP Inspector

The fastest way to test: run the official MCP Inspector, choose the Streamable HTTP transport, set the URL to https://socialai.website/api/mcp, and add the request header Authorization: Bearer <your-api-key>. Then Connect → List Tools → call get_credit_balance.

Install + run the inspector

npx -y @modelcontextprotocol/inspector

Connect from your AI client

MCP is an open protocol — not Claude-only.

Any MCP-compatible AI client can connect to this server — Claude, Cursor, Windsurf, VS Code, or your own agent — with the same three ingredients: the URL https://socialai.website/api/mcp, the Streamable HTTP transport, and the header Authorization: Bearer <your-api-key>. The steps below use Claude; every other client takes the same URL + header in its own MCP settings.

Connect Claude in 3 steps

  1. Get your API key. Sign in, open Settings → API keys, click Generate key, and copy it. The raw key is shown once — save it somewhere safe. (Admins can also create a key for any user from Admin → API Keys.)
  2. Connect Claude. Paste your key into the command below (replace <your-api-key>) and run it in your terminal:

Claude Code — one command (copy-paste)

claude mcp add --transport http socialai https://socialai.website/api/mcp --header "Authorization: Bearer <your-api-key>"

Verify it connected

claude mcp list
# You should see: socialai — connected

Prefer a config file? Save this as .mcp.json in your project (or in Claude Desktop's config) with your key pasted in, then restart Claude:

Claude Code (.mcp.json) / Claude Desktop / Cursor (JSON config)

{
  "mcpServers": {
    "socialai": {
      "type": "http",
      "url": "https://socialai.website/api/mcp",
      "headers": { "Authorization": "Bearer <your-api-key>" }
    }
  }
}
  1. Test it in Claude. Ask: “Check my SocialAI Studio credit balance.” Claude calls get_credit_balance. Then try the 10-second video test below.

Trouble connecting?

  • Make sure the key is pasted exactly — no extra spaces or quotes.
  • If Claude says the server is unreachable, check GET https://socialai.website/api/mcp/health loads (no auth needed).
  • Revoked or wrong key? Generate a fresh one from Settings → API keys.

Test it: generate a 10-second video via Claude

The basic case is a single 10-second video. Ask Claude exactly this — it starts the job, polls until the video is saved to permanent storage, and returns a playable link:

Ask Claude

Generate a 10-second cinematic video of a sunrise coffee ritual in a cozy kitchen, slow push-in. Use generate_video with duration 10, quality fast, ratio 9:16, then poll check_job_status until it is complete and give me the video URL.

What to expect: a job_id first, then a complete result with a permanent video URL (…/storage/v1/object/public/generated-videos/…). The link never expires — open it in any browser and it plays inline. Cost: 8 credits (Fast · 10s). Failed generations cost zero.

Long videos (up to 10 minutes)

Turn on Long video mode in Video Studio, or call generate_long_video from any MCP client. The video is built from multiple segments stitched into one continuous video — you pick the total length (up to 10 minutes) and the segment length (10 / 30 / 60s). Cost scales with length: total = segments × per-segment cost, at the same per-10s rate as single generations (Fast 8 cr / 10s · Pro 20 cr / 10s · Ultra 64 cr / 10s). Example: a 10-minute Fast video = 10 × 60s segments × 48 cr = 480 credits.

No surprise charges.

The full total is shown and must be confirmed before creation starts. In Claude: call generate_long_video with confirm=false first to get a quote, show the total to the user, and only call again with confirm=true after they approve it. On the website, the Confirm dialog shows the same total. If a segment fails, its credits and all remaining segments' credits are released.

Ask Claude (long video)

Get a quote for a 5-minute cinematic video of a mountain sunrise timelapse, quality fast, ratio 16:9. Tell me the total credit cost and wait for me to approve it before starting.

BUILD ON SOCIALAI STUDIO

Get your API key.

Create a SocialAI Studio account, generate a key from Settings → API keys, and start calling the tools. Every call draws from the same credit pool as the web app.

Start creating free