13全13セクション — タップして移動
AI動画生成APIでできること
Webアプリと同じアカウント、クレジット、履歴を使い、AI動画プロジェクトと話すアバターをプログラムから生成できます。
バックエンドや自動化にはREST、AIエージェントがツール確認・料金見積もり・生成実行を行う場合はMCPを使います。
公開v1 APIは非同期です。ジョブIDを保存し、ポーリングまたは署名付きWebhookで完了を確認します。生成には正確な予約を満たすクレジットが必要です。
- クレジット消費前に料金を見積もる。
- 人物写真とテキスト+音声、または録音音声からアバター動画を生成。
- 進捗と期限付き署名URLを取得。
- Idempotency-Keyで有料リクエストの再送を安全にする。
ReplicateでVlogMe Avatarを実行
画像+音声のシンプルなエンドポイントが必要な場合、公開VlogMe Avatar bridgeをReplicateでも利用できます。
すでにReplicateでインフラと請求を管理している場合に便利です。クレジット、履歴、REST、MCPを含む完全な連携はVlogMe APIを使います。
Hosted bridgeは字幕を標準で含む縦型の話すアバターMP4を返します。
認証
保護されたすべてのリクエストでBearer tokenを送信します。トークンは作成時に一度だけ表示されます。
Settings → APIで作成し、シークレット管理に保存します。ブラウザコード、モバイルアプリ、公開リポジトリ、クライアントログには含めないでください。
RESTのベースURLは https://vlogme.ai/api/v2 です。漏えいの可能性がある場合はローテーションします。
Authorization: Bearer vlm_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhttps://vlogme.ai/api/v2クイックスタート
トークン作成、料金見積もり、レンダリング開始、最終状態までの確認という順で実装します。
例では人物写真URL、スクリプト、voice_id、アスペクト比を送ります。プレースホルダーはVlogMeのサーバーから取得できる素材に置き換えます。
POST成功時は202 Acceptedがすぐ返ります。約10秒ごとに確認するかwebhook_urlを指定します。
curl -X POST https://vlogme.ai/api/v2/renders \
-H "Authorization: Bearer $VLOGME_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project_id": "PROJECT_UUID",
"revision_id": "REVISION_UUID",
"preset": "balanced",
"idempotency_key": "video-request-001"
}'RESTエンドポイント
OpenAPI 3.1、安定したエラーコード、レート制限ヘッダーを備えたJSON APIです。
/api/v2/openapi.jsonから型付きクライアントを生成したり、PostmanやInsomniaへ取り込めます。
すべてのレスポンスにX-Request-Idが含まれ、非同期POST /videosはポーリング先をLocationでも返します。
/projectsユーザーID、プラン、クレジット残高/projects音声合成に使えるvoice_id/projects/:id非同期レンダリングを開始/projects/:id状態と署名付きダウンロードURL/renders最近の生成履歴をページ取得/jobs/:id課金せず必要クレジットを見積もり/jobs/:id/cancel対象ジョブを削除またはキャンセル/projects/:id/director-proposals認証不要の稼働確認curl https://vlogme.ai/api/v2/jobs/$JOB_ID \
-H "Authorization: Bearer $VLOGME_TOKEN"AI動画を生成する
人物写真と、script+voice_idまたは音声素材を送信します。レンダリングは非同期で進みます。
portrait_urlまたはportrait_base64を使います。音声はscript+voice_id、またはaudio_url/audio_base64です。aspect_ratio、emotion_preset、live_subtitles、title、webhook_urlも指定できます。
有料POSTでは一意のIdempotency-Keyが必須です。同じキーで再送すると二重課金せず元のジョブを返します。
- アスペクト比: 標準9:16、16:9、1:1。
- トップレベルのinsertsでoverlayまたはcutのB-rollを追加。
- 背景音のaudio_modeはauto、prompt、asset、off。
- 202レスポンス: id、status、credits_charged、estimated_seconds、warnings。
curl -X POST https://vlogme.ai/api/v2/renders \
-H "Authorization: Bearer $VLOGME_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"project_id": "PROJECT_UUID",
"revision_id": "REVISION_UUID",
"preset": "balanced",
"idempotency_key": "video-request-001"
}'スクリプト記法
シーン切替、B-roll、音声挿入、間、音声演技タグを機械可読なDSLで指定します。
@imageNで話者シーンを切り替え、波括弧でoverlay/chain B-roll、@audioNで音声素材、[shocked]などのElevenLabsタグを記述します。
ダウンロード仕様はツールとLLM向けの契約言語を維持します。MCPではscript_grammar_helpから同じ仕様を取得できます。
SCRIPT-GRAMMAR.md
# V2 script grammar compatibility
This document describes the supported V2 plain-text import grammar. Current
Create authoring uses typed `CreateSnapshot` revisions and does not serialize
its editor state through this grammar.
The V2 bridge `flatToPayloads()` converts the grammar into `ScenePayload[]`.
Provider-specific payloads are derived later by render and integration
infrastructure; the browser never constructs them.
## Forms
| Form | Meaning |
| ---------------------- | ------------------------------------------ |
| `@imageN <text>` | Avatar speech anchored to image N |
| `@imageN { <prompt> }` | Standalone generated video from image N |
| `{ @imageN <prompt> }` | Overlay on the current avatar |
| `{ <prompt> }` | Continue from the preceding rendered frame |
| `@audioN` | Uploaded audio on the current avatar |
Plain text following an avatar line continues that avatar's speech. Video,
overlay and Continue forms may add `:D` after the closing brace to request a
duration. Advanced brace segments support `v:`, `n:`, `s:`, `an:`,
`am:auto|prompt|asset|off`, `ag:` and transition `tK`.
Whitespace and indentation do not change token meaning. Tags must begin a line
or appear at the start of a brace body; nested braces and inline image tags in
speech are invalid. Provider-specific prompt and duration limits are validated
before submission.
Legacy bare image lines remain parser-compatible for existing V2 projects, but
new generated V2 scripts should use the explicit forms above.
## Create boundary
Create visual blocks carry their own typed `visual_kind`, entry source,
timeline placement and media plan. In particular, Create Continue is an
independent visual block with `entry.mode = previous_exit`, an explicit
predecessor and the predecessor's accepted terminal-frame fingerprint. It is
not derived from the V2 brace syntax.
Webhook
webhook_urlを渡すと、成功または失敗時にイベントを送信し、一時的な配信エラーでは再試行します。
Settings → APIの専用whsec_シークレットでtimestamp + raw_bodyに対するX-Vlogme-Signatureを検証します。5分より古い時刻を拒否し、X-Vlogme-Event-Idで重複排除します。
5秒以内に2xxを返してください。ネットワーク障害と5xxはバックオフ再試行、4xxは恒久的な拒否です。URL期限切れ時は動画を再GETします。
ts = request.headers["X-Vlogme-Timestamp"]
secret = "whsec_..." # Settings -> API
expected = "sha256=" + hmac_sha256(secret, ts + "." + raw_body).hex()
assert constant_time_eq(expected, request.headers["X-Vlogme-Signature"])
assert abs(now() - int(ts)) < 300MCPサーバー
VlogMeトークンまたは対話型OAuthを使い、Streamable HTTPでAIエージェントを接続します。
MCPツールはREST v1の薄いラッパーで、データ形式、クレジット計算、エラーコードを共有します。追加変更に備えて未知のフィールドを無視してください。
音声、残高、見積もり、人物写真、生成、状態、キャンセル、履歴のツールがあります。権限のある内部アカウントは作業項目も扱えます。
POST https://mcp.vlogme.ai/api/mcpscript_grammar_helplist_voicesget_balanceestimate_creditslist_portraitsgenerate_videoget_videocancel_videolist_my_videoslist_bugsget_bugreport_bugupdate_bug_statusMCPクライアント設定
Claude Code、Cursor、CodexはStreamable HTTPに対応し、古いstdio専用クライアントはmcp-remoteを利用できます。
対話型OAuthまたは環境変数のAPI tokenのどちらか一つを選び、混在させないでください。
MCP設定を変更したら、新しいクライアントセッションを開始してツールを再検出します。
# OAuth
codex mcp add vlogme --url https://mcp.vlogme.ai/api/mcp
codex mcp login vlogme --scopes mcp:full,mcp:work_items
# or API token
export VLOGME_TOKEN=vlm_live_xxxxxxxxxxxx
codex mcp add vlogme --url https://mcp.vlogme.ai/api/mcp --bearer-token-env-var VLOGME_TOKEN{
"mcpServers": {
"vlogme": {
"url": "https://mcp.vlogme.ai/api/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN_HERE" }
}
}
}AIエージェント連携の一連の例
自然言語の依頼が、確認可能なツール呼び出しの順序に変換されます。
エージェントは音声一覧、料金見積もり、ユーザー確認、generate_video、最終状態までのget_videoを順に実行できます。
取得可能な人物写真と十分なクレジットが必要です。MCPとRESTには同じトークンスコープ、所有権、有効期限、ユーザー単位のレート制限が適用されます。
Create a 16:9 talking-avatar video from this portrait.
Use a warm, natural voice. Estimate the credits first and ask before generating.
After approval, monitor the job and return the final download URL.エージェント用skill
見積もり、承認、非同期状態の扱いを短い運用ルールとしてエージェントへ渡します。
VlogMeを使う条件、ツール順序、冪等性の維持、ポーリング終了条件を記述します。
skillファイルに実トークンを入れず、クライアント環境またはOAuthストアで管理してください。
---
name: vlogme-video
description: Estimate and generate VlogMe video jobs through MCP.
---
1. Validate the portrait and requested format.
2. Call estimate_credits before generation.
3. Ask for approval with the estimate.
4. Use a stable idempotency key for transport retries.
5. Poll get_video until a terminal status.エラーと再試行
エラー形式は { error: { code, message } } です。翻訳されるmessageではなく安定したcodeで分岐します。
問い合わせ時はX-Request-Idを伝えてください。429はRetry-Afterを含みます。認証・入力エラーは無条件に再試行せず修正します。
OpenAPIに全スキーマとエラー一覧があります。成功レスポンスにはレート制限のlimit、remaining、resetが含まれます。
missing_token401{ error: { code: "missing_token", message } }invalid_token401{ error: { code: "invalid_token", message } }token_expired401{ error: { code: "token_expired", message } }insufficient_credits402{ error: { code: "insufficient_credits", message, needed, balance } }invalid_input400{ error: { code: "invalid_input", message } }invalid_asset400{ error: { code: "invalid_asset", message } }invalid_json400{ error: { code: "invalid_json", message } }not_found404{ error: { code: "not_found", message } }method_not_allowed405{ error: { code: "method_not_allowed", message } }already_started409{ error: { code: "already_started", message } }billing_conflict409{ error: { code: "billing_conflict", message } }rate_limited429{ error: { code: "rate_limited", message } }internal_error500{ error: { code: "internal_error", message } }