Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
code
string
required

The function to execute. Your code must define a function named 'execute' and return a JSON-serializable value.

language
enum<string>
required

The interpreter to use when executing code.

Available options:
python,
javascript,
typescript,
ruby,
php
env
object

Set of key-value pairs to add to the script's execution environment.

files
object[]

List of input files.

http
object | null

Configuration for HTTP requests and authentication.

input
any
limits
object | null

Configuration for execution environment limits.

runtime_revision_id
string

The ID of the runtime revision to use when executing code.

Response

200 - application/json
execution
object
output
any
output_status
enum<string>

The status of the output. "valid" means your function executed successfully and returned a valid JSON-serializable object, or void. "json_serialization_error" means your function executed successfully, but returned a nonserializable object. "error" means your function failed to execute.

Available options:
error,
json_serialization_error,
valid