Media
Upload original media and extract precise source frames.
request_media_upload
WRITEREST: POST /api/v2/media/uploads
Request an original image/video/audio upload URL. PUT bytes, then call complete_media_upload before using the media. No generation starts. Without a shell, open render_upload instead: the user picks the file and you get its mediaId and stored url.
{
"type": "object",
"properties": {
"workspace": {
"type": "string",
"minLength": 1,
"description": "Required write target: a workspace slug or id from list_workspaces. Writes never inherit the connection default."
},
"uploadId": {
"description": "Optional stable request ID. Repeat it with identical metadata when retrying.",
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,64}$"
},
"contentType": {
"type": "string",
"enum": [
"image/jpeg",
"image/png",
"image/webp",
"video/mp4",
"video/webm",
"video/quicktime",
"audio/mpeg",
"audio/mp4",
"audio/x-m4a",
"audio/wav",
"audio/x-wav",
"audio/ogg",
"audio/webm",
"audio/aac"
]
},
"byteLength": {
"type": "integer",
"minimum": 1,
"maximum": 209715200
},
"filename": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"workspace",
"contentType",
"byteLength",
"filename"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"success": true,
"data": {
"uploadId": "upload-example",
"uploadUrl": "https://upload.example.com/signed",
"completed": false,
"contentType": "image/png",
"expiresInSeconds": 900,
"maxBytes": 10485760
}
}complete_media_upload
WRITEREST: POST /api/v2/media/uploads/complete
Validate and save original media; return mediaId for generation references. Retrying the same upload is safe.
{
"type": "object",
"properties": {
"workspace": {
"type": "string",
"minLength": 1,
"description": "Required write target: a workspace slug or id from list_workspaces. Writes never inherit the connection default."
},
"uploadId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,64}$"
}
},
"required": [
"workspace",
"uploadId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"success": true,
"data": {
"media": {
"mediaId": "upload-example",
"uploadId": "upload-example",
"mediaKind": "image",
"url": "https://media.example.com/original.png"
}
}
}get_video_frame
WRITEREST: POST /api/v2/media/source-frame
Extract and save a frame at a timestamp from an accessible source template, uploaded video or generated video. Use it to inspect sections or choose the exact image to recreate, or take a generated clip's last frame (lastFrame: true) to start the next clip exactly where it ended. Send the returned frameId as { type: "image", id } to clone_image, image_edit or a video task. For a Template, clone_image can also take the moment directly: { type: "template", id, at: seconds }.
{
"type": "object",
"properties": {
"workspace": {
"type": "string",
"minLength": 1,
"description": "Required write target: a workspace slug or id from list_workspaces. Writes never inherit the connection default."
},
"source": {
"anyOf": [
{
"type": "object",
"properties": {
"templateId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"templateId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"mediaId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"mediaId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"videoId": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"videoId"
],
"additionalProperties": false
}
],
"description": "Exactly one ready accessible templateId, completed uploaded video mediaId, or finished generated videoId (from list_videos or a video generation). Audio and image uploads cannot supply a video frame."
},
"timestampSeconds": {
"description": "Source timestamp in seconds, to millisecond precision; must be before the end. Required unless lastFrame is true.",
"type": "number",
"minimum": 0,
"maximum": 3600,
"multipleOf": 0.001
},
"lastFrame": {
"description": "true takes the video's very last frame instead of a timestamp, so the next clip can start exactly where this one ended. Send it without timestampSeconds.",
"type": "boolean",
"const": true
}
},
"required": [
"workspace",
"source"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}{
"success": true,
"data": {
"frameId": "source-example",
"imageUrl": "https://media.example.com/frame.png",
"templateId": "template-example",
"timestampSeconds": 1,
"sourceKind": "template"
}
}analyze_image
READREST: POST /api/v2/images/analyze
Inspect pixels from one accessible public HTTPS image URL in the current model, without a separate caption model or background resolution minimum. Returns actual image content and dimensions, downscaled when large and limited to the first animated frame. It does not render a slideshow composition.
{
"type": "object",
"properties": {
"workspace": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"url": {
"type": "string",
"maxLength": 2000,
"format": "uri"
}
},
"required": [
"url"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}{
"success": true,
"data": {
"sourceUrl": "https://cdn.ghostfeed.ai/example.png",
"width": 1080,
"height": 1920,
"inspectionWidth": 1080,
"inspectionHeight": 1920,
"mimeType": "image/png",
"data": "<image bytes delivered as an image content block in MCP and native model output>"
}
}