> For the complete documentation index, see [llms.txt](https://docs.serverlessapigateway.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.serverlessapigateway.com/recipes.md).

# Recipes

- [Service Execution](https://docs.serverlessapigateway.com/recipes/service-vs-service-binding.md): Choose the right integration type based on whether you need a local module import or a bound Worker method call. The \`service\` type bundles handler code with
- [Service Integrations with Local Entrypoints](https://docs.serverlessapigateway.com/recipes/service-vs-service-binding/service-local-entrypoints.md): Use local services when the gateway and the handler should ship together in one worker project. The \`services\` array defines local module entrypoints that the
- [Service Binding Worker Methods](https://docs.serverlessapigateway.com/recipes/service-vs-service-binding/service-binding-worker-methods.md): Use service bindings when you want worker-to-worker calls through Cloudflare bindings instead of external HTTP. Service bindings provide zero-latency calls
- [Pre-Process Hooks](https://docs.serverlessapigateway.com/recipes/service-vs-service-binding/pre-process-hooks.md): Short-circuit requests before the main integration when policy checks or custom gating logic must run first. The \`pre\_process\` field on a path entry calls a
- [Post-Process Hooks After Auth0 Callback](https://docs.serverlessapigateway.com/recipes/service-vs-service-binding/post-process-hooks-auth0-callback.md): Run post-processing only when the Auth0 callback needs extra side effects after token exchange succeeds. The Auth0 callback integration supports a post-process
- [Worker-to-Worker API Composition](https://docs.serverlessapigateway.com/recipes/service-vs-service-binding/worker-to-worker-api-composition.md): Compose internal Worker services behind one public gateway without turning every call into an external proxy. Service bindings let you build microservice-style
- [Choosing Proxy vs Service Execution](https://docs.serverlessapigateway.com/recipes/service-vs-service-binding/choosing-proxy-vs-service.md): Use this page when you are deciding whether a route should proxy upstream HTTP or execute worker code directly. Proxy routes (\`http\_proxy\`) forward requests to


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.serverlessapigateway.com/recipes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
