Currently WebAuthn has an api.php endpoint for getting registration info, but key creation is done through an onSubmit handler in WebAuthnAddKeyForm. In order to be able to create passkeys on other pages (which T410336 requires), we need there to be an api.php endpoint for creating a passkey.
This endpoint should be able to create both regular WebAuthn keys ("security keys") and passkeys. It should accept an optional name for the key if it's passed in, or automatically generate one if not (T410938).