Create jobs with options

To create jobs with options for the conversions, use the options key to pass the 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 /v2/jobs HTTP/1.1
Host: api.api2convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/raster%20image/png/example_small.png"
    }],
    "conversion": [{
        "category": "image",
        "target": "png",
        "options": {
            "color": "1980",
            "rotate": 180
        }
    }]
}
curl -X POST \
  https://api.api2convert.com/v2/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://example-files.online-convert.com/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 /v2/jobs HTTP/1.1
Host: api.api2convert.com
x-oc-api-key: <your API key here>
Content-Type: application/json
Cache-Control: no-cache

{
    "input": [{
        "type": "remote",
        "source": "https://example-files.online-convert.com/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://api.api2convert.com/v2/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://example-files.online-convert.com/video/mp4/example_2s.mp4"
    }],
    "conversion": [{
        "category": "video",
        "target": "mp4",
        "options": {
            "preset": "5ad9f696-7930-4991-9f03-460c3d703b89"
        }
    }]
}'

results matching ""

    No results matching ""