Some apps require asynchronous “fire-and-forget” execution. In this model, Cerebrium handles running the function, while the developer is responsible for ensuring data leaves the function (e.g. via a webhook). Enable async execution by adding theDocumentation Index
Fetch the complete documentation index at: https://cerebrium.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
async=true query parameter to the request:
202 Accepted response containing only a run_id:
response_grace_period in cerebrium.toml. This defaults to 15 minutes — update it to match the maximum time the task needs.
Cerebrium runs the HTTP request in the background, but the function itself must still behave synchronously — it must complete its work and return a result.
Returning a response while the application is still processing causes Cerebrium to begin terminating the container. Only return once all processing is finished.
Because async calls do not return a response to the caller, the function must export any relevant data itself. Combine async execution with a webhookEndpoint to have Cerebrium automatically forward the function’s response body:
failure).