Fix api creation