# modal.fastapi_endpoint | Modal Docs

- **URL:** https://modal.com/docs/reference/modal.fastapi_endpoint
- **Summary:** Create a Web Function that can be addressed via HTTP at a public URL.

Copy page

modal.fastapi_endpoint
=======================

    fastapi_endpoint(*, method="GET", label=None, custom_domains=None, docs=False,
        requires_proxy_auth=False)

Create a Web Function that can be addressed via HTTP at a public URL.

Modal will internally use [FastAPI](https://fastapi.tiangolo.com/)
 to expose a simple, single request handler. If you are defining your own `FastAPI` application (e.g. if you want to define multiple routes), use `@modal.asgi_app` instead.

The Web Function created with this decorator will automatically have [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
 enabled and can leverage many of FastAPI’s features.

For more information on using Modal with popular web frameworks, see our [guide on Web Functions](https://modal.com/docs/guide/webhooks)
.

_Added in v0.73.82_: This function replaces the deprecated `@web_endpoint` decorator.

[modal.fastapi_endpoint](https://modal.com/docs/reference/modal.fastapi_endpoint#modalfastapi_endpoint)
