add_project_asset
ChatGPTAdd an asset to the project from exactly one of: url (a public image, audio or video URL), stock (a hit object from search_stock; free to add, the user pays credits at export), or assetId (one of your existing assets). Returns {assetId, asset}; a video starts with status 'processing' (see get_asset).
create_project
ChatGPTCreate a project. Pick width/height up front: it is the canvas everything is authored against, injected into the code as WIDTH/HEIGHT. Returns {projectId}.
create_upload
ChatGPTUpload the user's own file (image, icon, audio, video) to the project without sending its bytes through the conversation. Returns {uploadId, uploadUrl, method, headers, pageUrl}. If the file is in your code sandbox and you have network access, send its bytes from code: curl -X PUT -H "Content-Type: <type>" --upload-file photo.jpg "$uploadUrl", then call get_upload for the asset. Otherwise (no sandbox, no network, the PUT fails, or the file is only on the user's device), give the user pageUrl to open and drop the file in, and call get_upload once they say it's there. Never put the user's files on any other host.
create_video_upload
ChatGPTStart uploading a video file (mp4, mov, webm) straight to storage. Returns {assetId, uploadUrl, method, headers}: from code, send the file's bytes to uploadUrl with that method and headers (e.g. curl -X PUT -H 'Content-Type: video/mp4' --upload-file clip.mp4 "$uploadUrl"), then call finalize_video_upload. A clip over the limits must be fitted first with the command in the authoring guide.
delete_asset
ChatGPTPermanently delete one of your assets and its files.
edit_animation
ChatGPTRevise the saved agent code without resending it: prefer this to update_animation for any revision. Each edit replaces either old, or everything from start through end inclusive (two short anchors instead of quoting a long span). old/start must match exactly one place and end exactly one place after start; copy anchors verbatim, whitespace included. Edits apply in order, all or nothing. Saves like update_animation: pass the etag, describe the change in note.
export_movie
ChatGPTRender the finished MP4 on Explainium's servers (only when the user asks for the video file). Returns {exportId} at once; poll get_export every ~20s until status is ready (or failed). One export at a time. Defaults come from the project's export settings. Stock the user hasn't licensed exports as its preview; licensing happens in the webapp.
finalize_video_upload
ChatGPTAfter the file is uploaded: create the video asset and add it to the project. It starts with status 'processing'; poll get_asset until 'ready'.
get_animation
ChatGPTThe project's agent code (empty for a new project), with its etag for update_animation, its packageIds and its canvasSize.
get_asset
ChatGPTOne asset. For a video: status (processing | ready | failed, with statusReason) and, once ready, analysis {durationSec, cuts, motionSpans, hasAudio}.
get_authoring_rules
ChatGPTRead first, once per task: how to work with these tools, then the rules for writing agent code (new animations and revisions).
get_export
ChatGPTAn export's status (queued | rendering | ready | failed | canceled), progress 0..1, and once ready a downloadUrl valid for an hour (give it to the user; it also shows in the webapp's export dialog).
get_history
ChatGPTThe project's change notes, most recent last: [{note, at, bytes}].
get_library_functions
ChatGPTFull source of the named library functions, for when a signature isn't enough.
get_project_stock
ChatGPTThe project's stock assets and the credits the user will pay at export: {items, dueCredits}. Tell the user when the movie uses stock.
get_upload
ChatGPTWhere an upload from create_upload stands: {status: pending | ready | processing | failed | expired, assetId, asset, error}. pending: nothing has arrived yet (error says why a file was refused). Once it has arrived the file is in the project: use assetId in code. A video is processing for a few seconds; poll get_asset until ready.
get_video_frames
ChatGPTLook at a ready video as one image of timestamped frames. No times: its storyboard (frames evenly spaced). t: those source seconds. from/to/every: a burst for reading motion (≤ 36 frames).
get_voiceover_settings
ChatGPTThe project's narration settings: {settings: {enabled, voice, languageCode, speakingRate, style, subtitles: {enabled, preset, size, maxWords}}, voices}. Each scene's line is its voiceover string in the agent code; these settings say how every line is read.
import_user_file
ChatGPTAdd a file the user attached in this chat to the project. Returns {assetId, asset}.
list_assets
ChatGPTAll your assets across projects.
list_project_assets
ChatGPTImages, icons, audio and video the project can use, including ones the user uploaded in the browser. Use an asset in code with const ASSETS = { logo: '<assetId>' } and drawVisual(ASSETS.logo, { x, y, width, height }) (a video: drawVideoFrame).
list_projects
ChatGPTList your Explainium projects: [{id, name, width, height, updatedAt}].
preview_animation
ChatGPTRender a labeled contact-sheet JPEG of the animation so you can see it. Pass code to preview unsaved code; omit it to render the saved code. Sampling composes: t (ms), beat (scene-local when scene is given, else absolute), scene (one representative frame each). No sampling = one frame per scene. Cells are captioned s{scene} · {beat}b · {ms}ms.
remove_project_asset
ChatGPTUnlink an asset from the project (the asset itself is kept).
search_stock
ChatGPTSearch stock icons (kind=icon, style outline|flat), photos (kind=image) or video clips (kind=video). format=json returns hits; format=sheet returns the same hits as one numbered image (#0, #1, … in JSON order) — look before you pick, then pass the chosen JSON hit to add_project_asset.
send_feedback
ChatGPTTell Explainium's developers what got in your way with these tools, so they can fix it: a call that failed or returned a confusing error, a description or rule you misunderstood (say what you assumed), something that took several tries, a capability you needed, or something that worked well. Be specific and on point: name the tool, the parameters and the error text. Never include private data: no names, emails or other personal details, no credentials, no file contents, no animation code, and none of the user's content beyond what the point needs. Feedback from the user (the person you work for) about their experience can go here too, with source 'user', but only when they ask for it or agree to it: show them what you'll send and send it once they confirm. It records the feedback; it changes nothing and gets no reply.
set_voiceover_settings
ChatGPTChange how the narration is read: voice (a name from get_voiceover_settings, e.g. Kore), style (plain-words direction for the delivery, e.g. "calm, warm documentary narrator, unhurried"; empty for the voice's own delivery; a style voices more slowly), speakingRate (0.25–2), or enabled. A new voice, style or rate re-voices every line and saves the code, lengthening scenes that no longer fit their line; the result lists each block's speech length and any raised durationBeats, and carries the code's new etag. subtitles turns on karaoke subtitles (the spoken words drawn over the bottom of the frame, the current word lit) only when the user asks for them; it restyles, never re-voices. With them on, keep the bottom of the frame clear: get_authoring_rules with this projectId says how far.
update_animation
ChatGPTSave the whole agent code (scenes + animate(); never the library or the canvas setup, which the project provides): for a new animation or a rewrite; revise with edit_animation. The server assembles it with the library; the movie hot-reloads for anyone watching. Pass the etag from get_animation (or the previous update) so a concurrent edit isn't clobbered: a 412 means re-read and reapply. Always describe the change in note; it becomes the project's change history.
upload_project_asset
ChatGPTUpload a file (png, jpg, gif, webp, svg, avif; mp3, wav, ogg, m4a, aac; a short mp4, mov or webm; max 32MB) as base64 and add it to the project. Prefer add_project_asset with a URL when the file is public, and create_video_upload for a larger video. From a code sandbox, read and encode the file in code rather than pasting it.