Skip to main content

Invoke function

Invocation is documented once, on Job Invocation. That page is the canonical reference: preconditions, provider and device selection, shots, both input modes, and what happens when you submit.

This page covers only what is specific to writing the function being invoked.

What invocation does to your code

The input payload is handed to your entry point unchanged:

processing(invocation_input)

Your code therefore has to read invocation_input in the same shape the caller sends it. Form-data arrives as key–value pairs; raw input arrives as JSON, a string or an integer, exactly as it was entered.

When the backend returns, the result is passed through your post_processing() before it becomes the invocation result. Backend-specific output is transformed there, not in processing().

Both contracts are specified in Create function (Code-level).

What to check before invoking your own function

  • The function is Ready and at least one version has deployed successfully. A deployment that failed still updates the timestamp, so confirm on the Invocation tab rather than by the date. See Function Details.
  • The provider you need is compatible with the SDK the function was created with.
  • Use a small shot count while iterating. Every invocation consumes project quota.

Next