Fix: “--api-key” argument in api_server.py does not work (#910)
* Fix: By api_auth middleware not being used,
Fixed a problem in which --api_key did not work due to api_auth not being used.
- Implement API authentication middleware
- Add OpenAPI configuration
- Modify route handling to support middleware injection
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>