The class ApiOptions is extended in extension GlobalPreferences, but the class is not part of the stable policy and that does not allow to extend it.
I am not sure what the best way is for the extension
https://codesearch.wmcloud.org/search/?q=extends%5Cs%2BApiOptions%5Cb&i=nope&files=&repos=