Modal logo
GuideExamples
Reference
ChangelogPlayground
Log In Sign Up
Python SDK Reference AppClientCloudBucketMountClsCronDictEnvironmentErrorFilePatternMatcherFunctionFunctionCallImagePeriodProbeProxyQueueRetriesSandboxSandboxSnapshotSecretServerTunnelVolumeWorkspaceasgi_appbatchedbillingconcurrentconfigcontainer_processcurrent_function_call_idcurrent_input_idenable_outputenterexceptionexitfastapi_endpointfile_ioforwardinteractio_streamsis_localmethodparametertypesweb_serverwsgi_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 2026
About Status Changelog Documentation Slack Community Pricing Examples