Skip to main content
To optimize files, do either of below when starting tasks.
  1. (Recommended) Omit the format field
  2. Set output file format to match the input file format.
and set optimize flags in settings True. To control format specific settings, check our API reference
POST /tasks HTTP/1.1
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json

{
  "data": {
    "type": "tasks",
    "attributes": {
      "settings": {
        "optimize": True
      }
    },
    "relationships": {
      "input": {
        "data": {
          "type": "files",
          "id": "<string>"
        }
      }
    }
  }
}