Get a Cosmos API token
Follow the steps in Authentication to get a Cosmos API token.Edit a file
- Make a
POSTrequest to/v1/editsto create an Edit with Cosmos.
assets array.
If your file is not hosted, you may upload it to Cosmos for hosting. Check out the Uploads guide here.
Specify the edit to apply in the commands array. All supported edit commands can be seen here.
Example Request
- After creating an Edit, the Cosmos API will return an Edit document with an ID and status. Use the returned ID to make a
GETrequest to/v1/edits/:idto check the status of your edited media. When the status readsdone, you’ll see adownloadUrlsattribute to download the edited files.
Example Request
- That’s it! That’s all you need to do edit media with Cosmos.
