Documentation
¶
Overview ¶
Package speedpainter provides a lightweight Go SDK and storyboard helper for generating narrated hand-drawn whiteboard explainer videos and AI drawing timelapses with SpeedPainter.
Official resources:
- SpeedPainter Home: https://www.speedpainter.org/en
- Whiteboard Video Maker: https://www.speedpainter.org/en/whiteboard-video-maker
- AI Drawing Timelapse Generator: https://www.speedpainter.org/en/ai-drawing-timelapse-generator
- Hand-Drawn Explainer Videos: https://www.speedpainter.org/en/explainer-video
- Product Explainer Videos: https://www.speedpainter.org/en/explainer-video/product
- Education & Classroom Videos: https://www.speedpainter.org/en/explainer-video/education
- Corporate Training Videos: https://www.speedpainter.org/en/explainer-video/training
- Agent Skill & MCP Server: https://www.speedpainter.org/en/skills/explainer-video
- Pricing & Plans: https://www.speedpainter.org/en/pricing
Index ¶
Constants ¶
const ( // DefaultBaseURL is the SpeedPainter web application base URL. DefaultBaseURL = "https://www.speedpainter.org/en" // DefaultMCPEndpoint is the remote streamable-HTTP MCP server endpoint. DefaultMCPEndpoint = "https://api.speedpainter.org/mcp" )
Variables ¶
This section is empty.
Functions ¶
func BuildToolCallPayload ¶
func BuildToolCallPayload(id int, toolName string, req VideoRequest) ([]byte, error)
BuildToolCallPayload validates req and returns a JSON-RPC 2.0 payload ready to send to the SpeedPainter remote MCP server.
func EstimateSceneCount ¶
EstimateSceneCount returns a recommended number of hand-drawn scenes based on target video duration (~6 seconds per illustrated beat).
Types ¶
type AspectRatio ¶
type AspectRatio string
AspectRatio defines supported output frame ratios for explainer videos.
const ( Aspect16x9 AspectRatio = "16:9" Aspect9x16 AspectRatio = "9:16" Aspect1x1 AspectRatio = "1:1" )
type Client ¶
Client interacts with the SpeedPainter MCP JSON-RPC endpoint.
type MCPRequest ¶
type MCPRequest struct {
JSONRPC string `json:"jsonrpc"`
ID int `json:"id"`
Method string `json:"method"`
Params any `json:"params,omitempty"`
}
MCPRequest represents a JSON-RPC 2.0 request envelope for MCP tool calls.
type VideoRequest ¶
type VideoRequest struct {
Prompt string `json:"prompt"`
Language string `json:"language,omitempty"`
DurationSeconds int `json:"duration_seconds,omitempty"`
AspectRatio AspectRatio `json:"aspect_ratio,omitempty"`
Subtitles bool `json:"subtitles"`
Voice string `json:"voice,omitempty"`
}
VideoRequest describes parameters for a narrated hand-drawn explainer video.
func (VideoRequest) Validate ¶
func (r VideoRequest) Validate() error
Validate checks that required fields are present and within practical bounds.