Create Edit
This endpoint creates an edit of image and video files.
With this endpoint, you can create and edit images and video. Send a request to create an edit with the URLs of the files to edit, the edit command to perform on the files, and any custom options. See the table below for all the available edit commands and supported file types and options.
Cosmos Commands Library
Command | Description | Input formats | Cosmos output formats | Options |
---|---|---|---|---|
image-to-video | Converts image to video | .jpeg, .png, .webp | .mp4 | Frames per second Name: fps Type: float Duration of output video in seconds Name: duration Type: float |
gif-to-video | Converts Gif to video | .gif | .mp4 | - |
image-to-webp | Converts image to Webp | .jpeg, .png, .webp | .webp | - |
resize-image | Upscale or downscale image | .jpeg, .png, .webp | .jpeg, .png, .webp | Scale of output Name: scale Type: float Format of output Name: format Type: string |
modify-video-speed | Speed up or slow down video | .mp4, .mov | .mp4 | Speed of output Name: speed Type: float |
video-to-gif | Converts video to Gif | .mp4, .mov | .gif | - |
video-to-ogg | Converts video to Ogg | .mp4, .mov | .ogv | - |
video-to-webm | Converts video to Webm | .mp4, .mov | .webm | - |
extract-frames | Converts video frames to images | .mp4, .mov | .webp | - |
Body
An array of objects represent a media file. An asset object should have a type and source URL.
An array of edit commands to apply to the assets in this request. The supported commands are listed in the Cosmos Commands Library table above.
The options to customize the edits applied to the assets. See Cosmos Command Library table for a list of supported options for each edit command.
Response
Indicates the type of document returned in the response.
The attributes of the Edit document response.