Cast
Videos and podcasts made from your own files, contacts and chats.
Cast has no public API methods today. Every method it has carries the private flag, so no API key can call one, not even a key with full access. The methods below are what the Cast screens call, from a signed-in dashboard session. They are listed so you know what the screens do, not as something to call from your own code.
A video or a podcast is made in the dashboard: from Cast's own page, or by dragging Cast onto a contact, a contact group, an AI chat or a knowledge base for a quick video. From outside, only the finished file is within reach:
- A finished file is an ordinary file in your Drive, in the folder set in Cast's settings, so what Drive offers for files works on it.
Each method acts for the owner of the workspace and answers code 1 when it works. A refusal answers a negative code and says why in data. Every method takes an optional workspace_id, to act in a workspace you own other than your home one, and every method needs a session at user clearance.
The pieces
A video or a podcast is a piece: one document with an id that reads cst_ followed by 16 hex characters. Its scenes read sc_ followed by 8 hex characters.
get_castslists the workspace's videos and podcasts, newest first. With the list it answers the plan and its caps, this month's builds, the saved defaults, whether this server can build, and a typical credit price for each step.get_castreads one piece with its brief, items, storyboard and state. Withframesset totrue, each scene also carries the picture of its first frame as a data URL.get_cast_framereads the picture of one scene (cast_id,scene_id) as a data URL.save_castcreates a piece, or changes one. It takescast_id(empty creates a new one),title(one line, up to 120 characters),brief(kind, purpose, description, language, voice, main character, length, size, look and options; keys it does not know are dropped.voice_language, a dashboard language code, is the language the voices are named in whilelanguageisauto: a podcast's hosts call each other by those names. The dashboard sets it to its own language when it makes a piece),sources(up to 20 items) andcopy_of, which starts a new draft from another piece's brief, items and storyboard. It is refused while a script or a build is at work on the piece.delete_castdeletes a piece and its frames. The file built from it stays in your Drive.
A workspace keeps up to 200 pieces. A piece's items are Drive files and folders, contacts, contact groups, AI chats, knowledge bases, pilots, links and notes. A connector is kept but cannot be read yet.
The script and the storyboard
read_cast_referencewatches a YouTube video for its style alone and answers what a brief keeps of it asreference: its look (colours, type, corners, camera, transitions and how long they take, caption shape), its tempo (seconds a shot, cuts a minute), its speaking pace, short notes on how it is made, and what it suggests for the brief (kind, purpose, type, shape, length). It takesurl. It runs as a job (steps: watching the video, reading its style) and uses AI credits. A piece follows it when its brief holds thereferenceandstyleisreference: the script is written to its tempo and the build cuts with its transitions. Nothing of the video's content is kept.write_cast_scriptwrites the script from the brief and the items: scenes with the first frame of each for a video, turns for a podcast. It takescast_idand an optionalinstructionof up to 600 characters. It runs as a job (steps: reading your items, writing the script, drawing the first frames), and scripts and pictures use AI credits.edit_cast_storyboardapplies up to 60 changes in order:confirm,unconfirm,confirm_all,delete,delete_all,moveandset(a scene's words, its on screen caption, a card's headline, figure, bullets, quote and layout, and which host says a turn). A change that is not well formed refuses the whole call. It answers the frames it drew again.redo_cast_sceneredoes one scene. Itsmodeisrewrite,picture(a new picture, the words kept),insert(a new scene atposition, counting from 0) orkind(change what the scene shows:title,card,picture,stock,screenshot,presenterorpodcast).instructionis up to 600 characters. It runs as a job, and pictures and writing use AI credits.
Building and publishing
build_castbuilds the file from the confirmed storyboard and saves it to the Drive. A scene that is not confirmed refuses it, unlessconfirm_allistrue. It runs as a job (steps: recording the voice, preparing the pictures, putting the scenes together, mixing the sound, saving to your Drive). Voices and pictures use AI credits, and a build that succeeds counts against the month.stop_cast_buildstops the build at work on a piece.publish_castshares a built piece.wayislink, which turns the link on (or off, withoffset totrue), oremail, which sends the link to up to 10 addresses into, with an optionalmessageof up to 1000 characters. Anyone with the link can watch or listen until the file is deleted.quick_castmakes a quick infographic video about a contact, a contact group, an AI chat or a knowledge base:target_kind(contact,contact_group,chatorknowledge_base),target_id, an optionaltarget_namefor the title, and an optionallanguageused when the settings say Auto. It uses the defaults saved in the settings. It runs as a job (steps: reading the item, writing the script, drawing the frames, building the video).
One server builds one piece at a time for everybody. A workspace holds at most two places in that line, one building and one waiting, and a third is refused.
Settings and plans
save_cast_settingssaves the defaults for new pieces and for quick videos:language(autoor a dashboard language code),voiceandgender,voice2andgender2for the second host,character,seconds,size(9:16,1:1,4:5or16:9),style,captions,music,quick_buildandfolder. Only the keys you send change.get_cast_plansreads the plans with their prices, features and entitlements, the plan this account is on, whether Cast is switched on, and the builds used this month.cast_set_planswitches Cast on, changes the plan (plan_idiscast_free,cast_starter,cast_growthorcast_business), or switches it off (an emptyplan_id, ordeactivateset totrue). Switching off keeps every video and podcast. Both plan methods take an optionalbilling_workspace_id, which only matters once Cast's plans are held per workspace.
What is refused
The dashboard says each of these in words next to the control. In the method's answer they are a negative code with a sentence in data:
- Only the owner of a workspace can make videos and podcasts in it. A public Assistant chat cannot.
- Cast is switched off for the account, or the plan's number of builds in the month is used (a build is refused, a script is not).
- The length, or the number of scenes, is past what the plan allows.
- The piece is being worked on. A script or a build is at work on it, so it cannot be saved or edited until it ends or is stopped.
- There are not enough AI credits to pay for a script, a picture or a voice.