Added allow_embedding option to API objects