openapi: 3.0.1 info: title: Shotstack Create Edit API description: Shotstack is a cloud video-editing platform that renders video, image, and audio assets from a JSON edit specification. This document covers the Edit API (render and templates), the Ingest API (source assets), the Serve API (asset hosting and delivery), and the Create API (AI-generated assets). All endpoints authenticate with an `x-api-key` header. Each API is available in a `v1` (production) and `stage` (sandbox) environment. termsOfService: https://shotstack.io/terms/ contact: name: Shotstack Support url: https://shotstack.io/contact/ version: '1.0' servers: - url: https://api.shotstack.io description: Shotstack production and sandbox host (use /edit/v1 or /edit/stage, etc.) security: - apiKey: [] tags: - name: Edit description: Render videos, images, and audio from a JSON edit specification. paths: /edit/v1/render: post: operationId: postRender tags: - Edit summary: Queue a render description: Queue a video, image, or audio for rendering from a JSON edit specification consisting of a timeline and an output. Returns a render ID used to poll status. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Edit' responses: '201': description: Render queued. content: application/json: schema: $ref: '#/components/schemas/QueuedResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /edit/v1/render/{id}: get: operationId: getRender tags: - Edit summary: Get render status description: Retrieve the status, progress, and output URL of a render by its ID. Status values progress through queued, fetching, rendering, saving, done, and failed. parameters: - name: id in: path required: true description: The render ID returned when the render was queued. schema: type: string format: uuid - name: data in: query required: false description: Include the original edit JSON in the response. schema: type: boolean default: false responses: '200': description: Render status. content: application/json: schema: $ref: '#/components/schemas/RenderResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /edit/v1/probe/{url}: get: operationId: probeAsset tags: - Edit summary: Probe a media asset description: Inspect the metadata of a media asset (duration, dimensions, codecs) using FFprobe. The asset URL must be URL-encoded. parameters: - name: url in: path required: true description: URL-encoded URL of the media asset to inspect. schema: type: string responses: '200': description: Asset metadata. content: application/json: schema: $ref: '#/components/schemas/ProbeResponse' '401': $ref: '#/components/responses/Unauthorized' components: schemas: QueuedResponse: type: object properties: success: type: boolean message: type: string response: type: object properties: message: type: string id: type: string format: uuid Timeline: type: object required: - tracks properties: soundtrack: $ref: '#/components/schemas/Soundtrack' background: type: string description: Hex color of the background canvas. example: '#000000' fonts: type: array items: type: object properties: src: type: string format: uri tracks: type: array description: Layers of clips composited from bottom to top. items: $ref: '#/components/schemas/Track' Soundtrack: type: object properties: src: type: string format: uri effect: type: string enum: - fadeIn - fadeOut - fadeInFadeOut volume: type: number Output: type: object required: - format properties: format: type: string enum: - mp4 - gif - jpg - png - bmp - mp3 - webm resolution: type: string enum: - preview - mobile - sd - hd - '1080' aspectRatio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:5' - '4:3' fps: type: number enum: - 12 - 15 - 24 - 25 - 30 - 60 quality: type: string enum: - low - medium - high destinations: type: array description: Where to deliver the rendered output. items: type: object properties: provider: type: string enum: - shotstack - s3 - googlecloudstorage - googledrive - mux - vimeo Asset: type: object description: A clip asset. The "type" discriminates between video, image, audio, title, html, luma, caption, and the AI generative asset types (text-to-speech, text-to-image, image-to-video). required: - type properties: type: type: string enum: - video - image - audio - title - html - luma - caption - text-to-speech - text-to-image - image-to-video src: type: string format: uri description: Source URL for video, image, audio, and luma assets. text: type: string description: Text content for title, caption, and AI text-based assets. trim: type: number volume: type: number Edit: type: object required: - timeline - output properties: timeline: $ref: '#/components/schemas/Timeline' output: $ref: '#/components/schemas/Output' merge: type: array description: Find-and-replace merge fields applied before rendering. items: $ref: '#/components/schemas/MergeField' callback: type: string format: uri description: HTTPS webhook URL called when the render status changes. RenderResponse: type: object properties: success: type: boolean message: type: string response: type: object properties: id: type: string format: uuid owner: type: string status: type: string enum: - queued - fetching - rendering - saving - done - failed url: type: string format: uri poster: type: string format: uri thumbnail: type: string format: uri duration: type: number renderTime: type: number created: type: string format: date-time updated: type: string format: date-time Error: type: object properties: success: type: boolean example: false message: type: string response: type: object properties: error: type: string code: type: string MergeField: type: object properties: find: type: string replace: type: string Clip: type: object required: - asset - start - length properties: asset: $ref: '#/components/schemas/Asset' start: type: number description: Start time on the timeline in seconds. length: oneOf: - type: number - type: string description: Duration of the clip in seconds, or "auto"/"end". fit: type: string enum: - crop - cover - contain - none scale: type: number position: type: string enum: - top - topRight - right - bottomRight - bottom - bottomLeft - left - topLeft - center opacity: type: number transition: type: object properties: in: type: string out: type: string effect: type: string Track: type: object required: - clips properties: clips: type: array items: $ref: '#/components/schemas/Clip' ProbeResponse: type: object properties: success: type: boolean response: type: object properties: metadata: type: object responses: NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid x-api-key. content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: The request was malformed or failed validation. content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: apiKey: type: apiKey in: header name: x-api-key description: Developer API key. The same key set is used by all Shotstack APIs.