Create jobs with options

To create jobs with options for the conversions, use the options key to pass teh according options and their values.

The following request is used to convert an image with the options color and rotate, applying the 1980 color filter and rotating it by 180 degrees.

POST /jobs HTTP/1.1
Host: api2.online-convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

{
    "input": [{
        "type": "remote",
        "source": "https://cdn.online-convert.com/example-file/raster%20image/png/example_small.png"
    }],
    "conversion": [{
        "category": "image",
        "target": "png",
        "options": {
            "color": "1980",
            "rotate": 180
        }
    }]
}
curl -X POST \
  https://api2.online-convert.com/jobs \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-oc-api-key: <your API key here>' \
  -d '{
    "input": [{
        "type": "remote",
        "source": "https://cdn.online-convert.com/example-file/raster%20image/png/example_small.png"
    }],
    "conversion": [{
        "category": "image",
        "target": "png",
        "options": {
            "color": "1980",
            "rotate": 180
        }
    }]
}'

The following request is used to convert an mp4 with the options preset.

POST /jobs HTTP/1.1
Host: api2.online-convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

{
    "input": [{
        "type": "remote",
        "source": "https://static.online-convert.com/example-file/video/mp4/example_2s.mp4"
    }],
    "conversion": [{
        "category": "video",
        "target": "mp4",
        "options": {
            "preset": "5ad9f696-7930-4991-9f03-460c3d703b89"
        }
    }]
}

The following request is used to convert an mp4 with the options preset.

curl -X POST \
  https://api2.online-convert.com/jobs \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'x-oc-api-key: <your API key here>' \
  -d '{
    "input": [{
        "type": "remote",
        "source": "https://static.online-convert.com/example-file/video/mp4/example_2s.mp4"
    }],
    "conversion": [{
        "category": "video",
        "target": "mp4",
        "options": {
            "preset": "5ad9f696-7930-4991-9f03-460c3d703b89"
        }
    }]
}'

results matching ""

    No results matching ""