CAPE data is available only for forecast in ERA-Interim dataset with parameter ID: 59.128. When a request is submitted pay attention to specify as 'type' = 'fc', otherwise the result of the request would be the vertical integral of kinetic energy (parameter ID 59.162).

CAPE request example
#!/usr/bin/env python
from ecmwfapi import ECMWFDataServer
server = ECMWFDataServer()
server.retrieve({
    "class": "ei",
    "dataset": "interim",
    "date": "2018-09-01/to/2018-09-30",
    "expver": "1",
    "grid": "0.75/0.75",
    "levtype": "sfc",
    "param": "cape",
    "step": "3",
    "stream": "oper",
    "time": "12:00:00",
    "type": "fc",
    "target": "output_cape",
})