capi: api improvements