# STUDIO

studio endpoints.

**Base URL:** `https://api.trustpager.com/functions/v1/api/v1`

## Endpoints

### POST /studio/documents/:id/music

Compose an instrumental music bed for this video from a short description of the mood and put it in as the video music, replacing any. It is made a little longer than the video and sits quietly under any voiceover. Describe the feel, pace and instruments, for example: warm cinematic piano and soft strings, slow build, hopeful, modern. Charged as AI music by length.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-music.md)

### POST /studio/documents/:id/pages

Change slides atomically at base_revision. Page order must contain every page exactly once.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-pages.md)

### POST /studio/documents/:id/requests

Ask for a change to a document, page or selected layer.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-requests.md)

### POST /studio/documents/:id/voiceover

Make a voiceover from a script and put it in this video, replacing any voiceover. Every spoken word is timed: headlines whose words are spoken land word by word as they are said, and captions follow the voice. The video grows to hold a longer voice. Charged as AI speech by script length. Voices: a saved workspace voice name or id, or a preset (jessica, rachel, adam, sam); the brand kit voice is used when none is given.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-voiceover.md)

### POST /studio/documents/:id/archive

Archive a document at a known revision.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-archive.md)

### POST /studio/renders/:render_id/cancel

Cancel a render. A late completion cannot replace its cancelled result.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-renders-render-id-cancel.md)

### POST /studio/captures

Take a picture of a public web page as a visitor sees it (usually under a minute, in the background) and save it to Files as a PNG with its width, height and main parts (main heading, main button, navigation, form) as named boxes, ready to use as a Studio screen. Returns the capture to follow with get_studio_capture. Only public websites: addresses that are not http or https, number addresses, internal names and private networks are refused. One capture at a time per workspace. Charged like a picture export; a capture that fails gives its credits back.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-captures.md)

### GET /studio/documents/:id/check

Validate the scene, catalogue options and workspace file references before rendering or sharing. issues lists words, logos and buttons that Instagram, Facebook or TikTok would cover on tall (9:16) and feed (4:5) shapes, each with the item, the edge, when it shows and the safe box to move it into; fix them with patch_studio_layers.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-documents-id-check.md)

### POST /studio/brand-kits

Create a private workspace creative resource.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-brand-kits.md)

### POST /studio/documents

Create a draft from a chosen template or a blank page, or with starting pages. opportunity_id links it to an opportunity in this workspace (for proposals).

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents.md)

### POST /studio/elements

Create a private workspace creative resource.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-elements.md)

### POST /studio/documents/from-opportunity

Make draft slides using an opportunity client, value and quote lines. Acceptance uses the existing signing flow.

**Scopes:** `studio:write`, `opportunities:read`, `products:read`, `contacts:read` — [full detail](./studio/post-studio-documents-from-opportunity.md)

### POST /studio/sets

Create a private workspace creative resource.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-sets.md)

### POST /studio/documents/:id/shares

Create a share link for a video or slides. Viewers always see the current version; base_revision only guards against sharing something you have not seen. Returns its token once.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-shares.md)

### POST /studio/templates

Create a private workspace creative resource.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-templates.md)

### DELETE /studio/brand-kits/:record_id

Delete an unused private creative resource. Keep at least one brand kit.

**Scopes:** `studio:delete` — [full detail](./studio/delete-studio-brand-kits-record-id.md)

### DELETE /studio/documents/:id

Delete a document for good, with its pages, renders and share links. Archive instead to keep it.

**Scopes:** `studio:delete` — [full detail](./studio/delete-studio-documents-id.md)

### DELETE /studio/elements/:record_id

Delete an unused private creative resource. Keep at least one brand kit.

**Scopes:** `studio:delete` — [full detail](./studio/delete-studio-elements-record-id.md)

### DELETE /studio/documents/:id/pages/:page_id

Change slides atomically at base_revision. Page order must contain every page exactly once.

**Scopes:** `studio:delete` — [full detail](./studio/delete-studio-documents-id-pages-page-id.md)

### DELETE /studio/sets/:record_id

Delete an unused private creative resource. Keep at least one brand kit.

**Scopes:** `studio:delete` — [full detail](./studio/delete-studio-sets-record-id.md)

### DELETE /studio/templates/:record_id

Delete an unused private creative resource. Keep at least one brand kit.

**Scopes:** `studio:delete` — [full detail](./studio/delete-studio-templates-record-id.md)

### POST /studio/documents/:id/film

Make a finished film in this video from a script, in the background (usually one to two minutes): returns a run to follow with get_studio_run (stage planning, voice, music, saving, then complete or failed with a plain reason). In the film the voiceover is made from the script, the script is split into beats that tell a story (the problem, the turn, the product at work, the close) with an example customer: big statements with lit key words, stacked lines, ticked lists, numbers from the script, moving scenes (a phone page being paid or booked, an email being sent, a chat, notifications, status rows turning paid, before and after) and an end card with the logo; every beat and every action lands on its spoken words, and composed music is added when music describes a mood. Replaces everything in the video. Charged as AI speech, AI text and (with music) AI music. Uses the brand kit voice when no voice is given. Give up to 8 product screens (workspace image files, each with a title and one line on what it shows, and optionally its named parts as boxes, which are otherwise read from the file when it was captured with them) and the director shows them where the script talks about them, zooming to, clicking and labelling their parts.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-film.md)

### POST /studio/requests/:request_id/dismiss

Mark a waiting change request as no longer needed.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-requests-request-id-dismiss.md)

### POST /studio/drafts

Write the words for a first draft of a video or slide deck from an idea: headline, subline, three points, call to action, and a number or customer quote only when the idea contains one. Charged as AI text by actual usage. Nothing is saved; pass the words to create_studio_document.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-drafts.md)

### POST /studio/proposal-stories

Write a client proposal deck that tells their story, from an opportunity: its client, its needs analysis (needs, the fix for each, recommended products, guarantees, the promise) and its quote lines. Returns the facts and short joining words (cover line, headings, the outcome of each fix, the closing line); every number in the words is one already in the facts. Charged as AI text by actual usage. Nothing is saved; lay the slides out and pass them to create_studio_document.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-proposal-stories.md)

### POST /studio/documents/:id/duplicate

Copy a document into a fresh draft with new page and layer ids and no requests or shares.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-duplicate.md)

### POST /studio/documents/:id/pages/:page_id/duplicate

Change slides atomically at base_revision. Page order must contain every page exactly once.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-pages-page-id-duplicate.md)

### GET /studio/animations/:record_id

Read a creative resource in this workspace or the shared catalogue.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-animations-record-id.md)

### GET /studio/brand-kits/:record_id

Read a creative resource in this workspace or the shared catalogue.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-brand-kits-record-id.md)

### GET /studio/captures/:capture_id

Read a capture: running, complete (with file_id, file_url, width, height and areas, the named parts as fractions of the picture) or failed with a plain reason.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-captures-capture-id.md)

### GET /studio/documents/:id

Read an editable document and its pages before changing it.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-documents-id.md)

### GET /studio/elements/:record_id

Read a creative resource in this workspace or the shared catalogue.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-elements-record-id.md)

### GET /studio/renders/:render_id

Read render status, progress and the completed output file.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-renders-render-id.md)

### GET /studio/runs/:run_id

Read the captured batch, result or safe failure for a change run.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-runs-run-id.md)

### GET /studio/sets/:record_id

Read a creative resource in this workspace or the shared catalogue.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-sets-record-id.md)

### GET /studio/shares/:share_id/stats

Read viewer sessions and seconds spent on each page, including the single video page.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-shares-share-id-stats.md)

### GET /studio/templates/:record_id

Read a creative resource in this workspace or the shared catalogue.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-templates-record-id.md)

### GET /studio/documents

Find your videos, slides and images by title, type or status.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-documents.md)

### GET /studio/files

List workspace files available to use in Studio, with cursor pagination.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-files.md)

### GET /studio/renders

List running renders and prior render attempts.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-renders.md)

### GET /studio/documents/:id/requests

Read shared requests and replies, including waiting and completed changes.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-documents-id-requests.md)

### GET /studio/documents/:id/shares

List video or slide share links without returning tokens or password hashes.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-documents-id-shares.md)

### GET /studio/sharing

Everything shared from Studio in one list: every share link with its viewers, seconds watched and time on each page; every social post of a video with its status and link; and finished videos not posted yet. Filter with type (video, deck or image) or one document_id.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-sharing.md)

### POST /studio/make

The way to make a video, slides or images from a short brief: ONE call makes a finished, designed draft, so the person approves once and gets a link. video: writes the voiceover script from the brief, then films it in the background like direct_studio_film (beats, moving scenes, composed music, end card); returns the document, the script and a run to follow with get_studio_run (usually one to three minutes). deck: writes the slides as a story (cover, the problem, what you get, the offer when the brief states a price, next step) and lays them out in the design; ready at once. image: writes the words once and lays them out in each shape asked for (a matching campaign set, one document per shape), the brief's price shown big; ready at once. Words come only from the brief and the business details: no invented numbers, prices, reviews or conditions, so put every fact that matters (the offer exactly as it is, what is included, the call to action) in the brief. The design is picked to fit the business unless given. Charged as AI text (plus AI speech and music for a video). ai_media: true adds AI-made media, art directed from the brief: a realistic photo behind the words of images (one photo shared by every shape) and behind the cover and closing slides of a deck (each photo is charged as one AI picture, by what it costs to make), or up to three moving AI footage clips behind the word moments of a film (each charged by what it costs to make, usually about 170 credits a second; the film then takes a few minutes longer). Set ai_media when the person asks for photos, real people, imagery, footage, b-roll, AI pictures or AI video, or for a premium or cinematic result; leave it out for a plain branded design. If an AI photo or clip cannot be made the draft is still made without it and the reason is returned: say so plainly. How to use it well: for a simple ask, call it straight away (no plan card or questions first) and offer changes after; never make a blank document and fill it step by step. Leave the website and phone number out of the brief unless the person gave them: the business's own are added from the workspace. "Social images" means shapes instagram_post, instagram_story and facebook_post in one call; a social video is platform instagram. Describe only what the result shows, and always give the open_url link.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-make.md)

### POST /studio/documents/:id/layers/patch

Apply a batch of add, update, remove or reorder layer changes atomically at base_revision.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-layers-patch.md)

### POST /studio/documents/:id/publish

Hand a ready rendered video to the existing posting system. Posting failures leave its document status unchanged.

**Scopes:** `studio:write`, `social:write` — [full detail](./studio/post-studio-documents-id-publish.md)

### GET /studio/capture-quote

The price in credits of taking a picture of a web page for a Studio screen.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-capture-quote.md)

### GET /studio/documents/:id/render-quote

The exact price of exporting this document now (an MP4, PDF or PNG), in credits, worked out from its shape, quality, length, clips and pages. charging is false while exports are free.

**Scopes:** `studio:read` — [full detail](./studio/get-studio-documents-id-render-quote.md)

### POST /studio/documents/:id/renders

Pin this video revision for a render. Failed snapshots can be retried for free.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-renders.md)

### POST /studio/documents/:id/pages/reorder

Change slides atomically at base_revision. Page order must contain every page exactly once.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-pages-reorder.md)

### POST /studio/requests/:request_id/replies

Reply to a shared change request.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-requests-request-id-replies.md)

### POST /studio/documents/:id/restore

Restore a document at a known revision.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-restore.md)

### POST /studio/renders/:render_id/retry

Retry a failed render using the original pinned snapshot without another charge.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-renders-render-id-retry.md)

### POST /studio/shares/:share_id/revoke

Stop access through a share link.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-shares-share-id-revoke.md)

### POST /studio/documents/:id/requests/run

Capture all waiting requests at this revision and carry them out (usually within seconds; the returned run is complete, failed, or still running and finishing in the background). Later requests stay waiting for the next run.

**Scopes:** `studio:write` — [full detail](./studio/post-studio-documents-id-requests-run.md)

### GET /studio/animations

Search workspace and platform creative resources. Sets and elements filter by document type (video by default).

**Scopes:** `studio:read` — [full detail](./studio/get-studio-animations.md)

### GET /studio/brand-kits

Search workspace and platform creative resources. Sets and elements filter by document type (video by default).

**Scopes:** `studio:read` — [full detail](./studio/get-studio-brand-kits.md)

### GET /studio/elements

Search workspace and platform creative resources. Sets and elements filter by document type (video by default).

**Scopes:** `studio:read` — [full detail](./studio/get-studio-elements.md)

### GET /studio/sets

Search workspace and platform creative resources. Sets and elements filter by document type (video by default).

**Scopes:** `studio:read` — [full detail](./studio/get-studio-sets.md)

### GET /studio/templates

Search workspace and platform creative resources. Sets and elements filter by document type (video by default).

**Scopes:** `studio:read` — [full detail](./studio/get-studio-templates.md)

### PATCH /studio/brand-kits/:record_id

Update a private workspace creative resource.

**Scopes:** `studio:write` — [full detail](./studio/patch-studio-brand-kits-record-id.md)

### PATCH /studio/documents/:id

Rename a document or update its format, settings and brand kit at a known revision.

**Scopes:** `studio:write` — [full detail](./studio/patch-studio-documents-id.md)

### PATCH /studio/elements/:record_id

Update a private workspace creative resource.

**Scopes:** `studio:write` — [full detail](./studio/patch-studio-elements-record-id.md)

### PATCH /studio/documents/:id/pages/:page_id

Change slides atomically at base_revision. Page order must contain every page exactly once.

**Scopes:** `studio:write` — [full detail](./studio/patch-studio-documents-id-pages-page-id.md)

### PATCH /studio/sets/:record_id

Update a private workspace creative resource.

**Scopes:** `studio:write` — [full detail](./studio/patch-studio-sets-record-id.md)

### PATCH /studio/templates/:record_id

Update a private workspace creative resource.

**Scopes:** `studio:write` — [full detail](./studio/patch-studio-templates-record-id.md)
