Invoke a local Function
Start the development server:Invoke a deployed Function
Send aPOST request with the Function ID:
202 Accepted with an invocation object. The invocation starts in PENDING or RUNNING.
See Invoke a Function for the complete request and response schema.
Pass parameters
Setparams to the JSON object that your handler receives:
params object can contain up to 64 KB. Define a Zod parametersSchema to reject invalid input.
Override session settings
sessionConfig in defineFn supplies the browser defaults for every invocation. Set sessionCreateParams in an invoke request to override supported fields for one run:
sessionCreateParams over the Function version’s sessionConfig. Invocation values win. Defaults that you don’t override remain unchanged.
sessionCreateParams doesn’t support region or keepAlive. Set timeout from 60 through 900 seconds. The default is 900 seconds.
Get the result
Poll the invocation by theid returned from the invoke request:
See Get an invocation for the response schema.
Use a webhook instead of polling
Subscribe an endpoint to:functions.invocations.completedfunctions.invocations.failed
functions.builds.running, functions.builds.completed, and functions.builds.failed events.
Inspect builds, logs, and sessions
Use these resources when a publish or invocation fails:- Get a Function build returns the build status and built Function IDs.
- Get Function build logs returns compiler and bundler output.
- Get invocation logs returns your Function’s console output.
- Session Replay shows what happened in the browser.
sessionId. Use it with Browserbase’s session observability tools to inspect console messages, network activity, and the recording.
Functions limits
Check the timeout, region, bundle size, and storage constraints.