Modal logo
GuideExamples
Reference
ChangelogPlayground
Log In Sign Up
Python SDK Reference App Client CloudBucketMount Cls Cron Dict Environment Error FilePatternMatcher Function FunctionCall Image Period Probe Proxy Queue Retries Sandbox SandboxSnapshot Secret Server Tunnel Volume Workspace asgi_app batched billing concurrent config container_process current_function_call_id current_input_id enable_output enter exception exit fastapi_endpoint file_io forward interact io_streams is_local method parameter types web_server wsgi_app

current_input_id

current_input_id()

Returns the input ID for the current input.

Can only be called from Modal function (i.e. in a container context).

from modal import current_input_id

@app.function()
def process_stuff():
    print(f"Starting to process {current_input_id()}")
current_input_id
Modal logo Modal logo © Modal 2026
About Status Changelog Documentation Slack Community Pricing Examples