vlogme.ai

Developers

Vlogme Talking-Avatar API & MCP

Generate talking-avatar videos from your code or AI agent. Same engine and credit pricing as the web app. Available on paid plans (Basic and higher). Create a token →

Authentication

All requests need a Bearer token in the Authorization header. Generate one in Settings → API. Tokens are shown once.

Authorization: Bearer vlm_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Base URL

https://vlogme.ai/api/public/v1

Endpoints

GET /me

Returns your user id, plan, and current credit balance.

curl https://vlogme.ai/api/public/v1/me \
  -H "Authorization: Bearer $VLOGME_TOKEN"

GET /voices

Lists the voice IDs you can pass to generate.

curl https://vlogme.ai/api/public/v1/voices \
  -H "Authorization: Bearer $VLOGME_TOKEN"

POST /videos

Start a new render. Returns immediately with id and status: "preparing". Credits are charged up front (≈1 credit per second of output, minimum 10). Provide a portrait (URL or base64) and either a script (with voice_id) or an audio file.

curl -X POST https://vlogme.ai/api/public/v1/videos \
  -H "Authorization: Bearer $VLOGME_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "portrait_url": "https://example.com/portrait.jpg",
    "script": "Hello from the Vlogme API.",
    "voice_id": "EXAVITQu4vr4xnSDxMaL",
    "emotion_preset": "natural",
    "live_subtitles": true,
    "webhook_url": "https://yourapp.com/webhooks/vlogme"
  }'

Optional fields: title, face_restore (0–1), watermark_text, video_prompt, video_negative_prompt, audio_url, audio_base64, portrait_base64.

GET /videos/:id

Returns current status. When status is completed, video_url is a signed download URL valid for 1 hour.

curl https://vlogme.ai/api/public/v1/videos/$VIDEO_ID \
  -H "Authorization: Bearer $VLOGME_TOKEN"

GET /videos

Lists your recent renders (newest first). Supports ?limit (max 100) and ?cursor.

DELETE /videos/:id

Deletes a render. If it's still in progress, credits are refunded.

Webhooks

If you pass webhook_url in the create request, we POST to it once when the render finishes (success or failure). Verify the X-Vlogme-Signature header — it is sha256=<hmac> where the HMAC secret is the lowercase hex sha256 of your raw API token (we never store the raw token, so we sign with the same hash we keep in our database — your code derives the secret once from the token).

# Pseudocode for verifying X-Vlogme-Signature
secret = sha256(YOUR_RAW_TOKEN).hex()           # lowercase hex
expected = "sha256=" + hmac_sha256(secret, raw_body).hex()
assert constant_time_eq(expected, request.headers["X-Vlogme-Signature"])

{
  "event": "video.completed",
  "video": { "id": "...", "status": "completed", "video_url": "https://...", ... }
}

MCP server

Vlogme exposes an MCP (Model Context Protocol) Streamable-HTTP endpoint at https://vlogme.ai/api/mcp. Authenticate with the same Bearer token. Available tools: list_voices, get_balance, generate_video, get_video, list_my_videos.

Smoke-test the endpoint directly:

curl -X POST https://vlogme.ai/api/mcp \
  -H "Authorization: Bearer $VLOGME_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Claude Code (native HTTP transport)

claude mcp add --transport http vlogme https://vlogme.ai/api/mcp \
  --header "Authorization: Bearer $VLOGME_TOKEN"

Cursor (native HTTP transport)

Add to ~/.cursor/mcp.json (or the project's .cursor/mcp.json):

{
  "mcpServers": {
    "vlogme": {
      "url": "https://vlogme.ai/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN_HERE" }
    }
  }
}

Codex CLI / Claude Desktop / any stdio client

Clients that only speak stdio (OpenAI Codex CLI, Claude Desktop, etc.) need the mcp-remote bridge. For Codex, add to ~/.codex/config.toml:

[mcp_servers.vlogme]
command = "npx"
args = ["-y", "mcp-remote", "https://vlogme.ai/api/mcp", "--header", "Authorization: Bearer ${VLOGME_TOKEN}"]
env = { VLOGME_TOKEN = "vlm_live_xxxxxxxxxxxx" }

For Claude Desktop / generic JSON (claude_desktop_config.json):

{
  "mcpServers": {
    "vlogme": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://vlogme.ai/api/mcp",
        "--header", "Authorization: Bearer YOUR_TOKEN_HERE"
      ]
    }
  }
}

Agent skill

Drop this into .agents/skills/vlogme/SKILL.md (or the equivalent location for your agent) so the agent knows when and how to use the tools:

---
name: vlogme
description: Generate talking-avatar videos via the Vlogme MCP server. Use when the user wants to turn a portrait + script into a short video.
---

You have access to the `vlogme` MCP server. Workflow:

1. Call `list_voices` once per session to discover voice ids; cache the result.
2. Call `get_balance` to confirm the user has enough credits (≈ 1 credit per second of output, minimum 10 per render).
3. Call `generate_video` with:
   - `portrait_url` (https URL of a clear face photo, 9:16 or square works best) OR `portrait_base64`.
   - `script` (text to speak, ≤ 30 000 chars) AND `voice_id` from step 1
     — OR `audio_url`/`audio_base64` if narration already exists.
   - Optional: `emotion_preset` (calm | natural | expressive | sad), `live_subtitles` (default true),
     `title`, `video_prompt`.
4. Poll `get_video { id }` every 10 s until `status` is `completed` (typical 1–3 minutes).
   Then `video_url` is a signed mp4 link valid for 1 hour — surface or download it immediately.

If `status` becomes `failed`, read `error_message`. Credits are auto-refunded on failure.

Tips: scripts under ~150 words render fastest. Portrait must show exactly one clear face.
Output is always 9:16 vertical.

Errors

Errors are JSON: { "error": { "code": "...", "message": "..." } }. Common codes:

  • missing_token / invalid_token — 401
  • plan_required — 403 (Free plan)
  • insufficient_credits — 402
  • invalid_input — 400 (validation, unknown voice_id, etc.)
  • invalid_asset — 400 (portrait/audio URL unreachable, too large, or bad base64)
  • invalid_json — 400 (request body is not JSON)
  • not_found — 404
  • internal_error / db_error — 500

开发者 常见问题

可以用 vlogme.ai API 做什么?

任何需要程序化生成口播虚拟形象视频的场景:个性化销售视频、AI 导师、新闻主播、产品讲解、NPC 对白、批量本地化配音。一次 POST 请求,传入肖像 URL + 文案 + 语音 ID,即可返回完成的 MP4。

MCP 服务器如何与 Claude Code、Codex、Cursor 协作?

Vlogme 在 /api/mcp 提供 Streamable-HTTP MCP 端点。用本页面的 CLI 片段添加一次,智能体即可原生调用 list_voices、generate_video、get_video——无需粘合代码,无需额外 SDK。

通过 API 渲染如何计费?

与网页应用一致:大约每秒成片 1 个积分,最低 10 个。积分在 POST /videos 时扣除;若渲染失败或您在完成前 DELETE,系统会自动退还。

有速率限制吗?

默认配额很宽松(Basic 每天数百次渲染,Pro 每天数千次)。若发布或批量迁移需要更高吞吐,请邮件 support@vlogme.ai,我们会上调。

Webhook 支持重试和签名验证吗?

支持。每个 Webhook 都带 X-Vlogme-Signature 头(原始 body 的 sha256 HMAC,密钥为您的 token)。投递失败会在 24 小时内以指数退避重试。

哪些套餐包含 API 访问?

API 与 MCP 在所有付费套餐(Basic 及以上)均可用。免费套餐仅限网页端,以便我们持续保持免费且无滥用。