Agent Flow
Recommended MCP workflow for agents creating Videotok media.
Recommended Flow
- Call
get_workspace. - Call
list_generation_catalogandlist_workspace_assets. - If the user needs a voice, call
recommend_voice. - If the user wants a template look, call
list_generation_catalogagain withsectionandtemplate_slug, then choose a built-inpreset_idor savedcustom_reference_inspiration_id. - If the user provides reference media, use
suggest_reference_template_targets, ask for the target if needed, then callcreate_reference_inspiration. - Call the matching create tool.
- Poll the matching status tool until the result is
completedorfailed. - Only say the asset is ready when the final answer includes a visible preview, direct URL, or local file path.
Local Or Rendered Media
When the user or agent already has a rendered image, audio file, or MP4:
- If the file is already reachable over HTTPS, call
upload_editor_mediawithsource_url. - Prefer
upload_editor_media_from_urlwhen the MCP client exposes it, because the URL source is explicit in the tool name. - If the file only exists on the agent machine, first upload it through the REST multipart endpoint or expose a temporary signed HTTPS URL.
- Use the returned My Media
media.idforpublish_media_to_social,add_editor_media, or media-id fields increate_generation.
The hosted MCP server cannot fetch /local/path/file.mp4 or file:// URIs from the client machine. Do not place those strings in media.data; that field is only for base64 bytes or data URLs.
Prompt Handling
For template generations, preserve the user's prompt.
Pass it as-is or minimally trim tool-routing words. Do not expand a short request into a full creative brief unless the user asks.
Use built-in presets and saved reference inspirations as internal routing details. Do not expose raw ids unless the user asks for API or debugging details.
Retries
For paid create tools, pass idempotency_key when retrying.
Reuse the same key for the same paid action.
Do not create backup or variant generations unless the user asks for them.