Add a file
add_media_filePuts a file sent in this call on a link the person made: a picture or short video as the wallpaper, a song, or a voiceover. For a file this AI app has in hand; a file only on the person's phone can't be sent this way. The file goes in as base64, up to 28,000,000 characters, so a file of about 20MB at most through this call. LFG checks it like any upload, replaces what that slot had, and adds it to the person's uploads. What each takes. Wallpaper: a square (1:1) picture, about 1080 x 1080 pixels, as JPEG, PNG, WebP or GIF up to 50MB; a picture that is not square is cropped to a square. Or a square MP4 or MOV video, or a GIF that loops, up to 30 seconds and 50MB; a video needs a paid plan, a GIF does not. Song or voiceover: MP3, M4A, OGG, WAV or FLAC up to 5 minutes and 20MB.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"use": "<use>",
"content_type": "<content_type>",
"data_base64": "<data_base64>"
},
"name": "add_media_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The link's id. | |
| use | Yes | wallpaper, song, or voiceover. | |
| name | No | What to call the file in the person's library, "Soccer team anthem". When absent, the file's own title. | |
| data_base64 | Yes | The file itself, base64-encoded. | |
| content_type | Yes | The file's type, "audio/mpeg", "audio/wav", "image/png", "video/mp4". |