1 # Shotstack
2
3 Proxy requests to Shotstack via Replit-managed billing.
4
5 ## Callback
6
7 Use `externalApi__shotstack` in `code_execution`.
8
9 ## Allowed operations
10
11 - `POST` `/edit/v1{/templates}?/render` - Submit a Shotstack render job (ad-hoc timeline or template-bound; bills on polled output duration for video/audio, flat per render for images).
12 - `GET` `/edit/v1/render/:id` - Poll a Shotstack render job for status and final duration (used by the billed render op to settle cost; not billed separately).
13 - `POST` | `GET` | `PUT` | `DELETE` `/edit/v1/templates{/:id}?` - Shotstack template CRUD: create (POST /edit/v1/templates), list (GET /edit/v1/templates), fetch (GET /edit/v1/templates/{id}), update (PUT /edit/v1/templates/{id}), delete (DELETE /edit/v1/templates/{id}). No charge — billed on render.
14 - `GET` `/edit/v1/probe/:url` - Inspect media metadata via FFprobe (GET /edit/v1/probe/{url-encoded-url}). No charge — utility endpoint, not on the Shotstack pricing page.
15 - `POST` | `GET` | `DELETE` `/serve/v1/assets{/render}?{/:id}?` - Shotstack Serve API: transfer (POST /serve/v1/assets), fetch (GET /serve/v1/assets/{id}), delete (DELETE /serve/v1/assets/{id}), list by render (GET /serve/v1/assets/render/{id}). No charge — see storage/bandwidth note above.
16 - `POST` | `GET` | `DELETE` `/ingest/v1/sources{/upload}?{/:id}?` - Shotstack Ingest API: ingest from URL (POST /ingest/v1/sources), direct upload (POST /ingest/v1/sources/upload), list (GET /ingest/v1/sources), fetch (GET /ingest/v1/sources/{id}), delete (DELETE /ingest/v1/sources/{id}). No charge — see storage/bandwidth note above.
17
18 Authorization is handled automatically by Replit. Do not pass an `Authorization` header.
19
20 ## Quickstart
21
22 1. Call the callback with a supported `path` and `method`.
23 2. Put URL params in `query` and inspect `result.body`.
24
25 ## Example
26
27 ```javascript
28 const result = await externalApi__shotstack({
29 path: '/edit/v1{/templates}?/render',
30 method: 'POST',
31 query: {},
32 })
33
34 console.log(result.status)
35 console.log(result.body)
36 ```