Code_Interpreter

Handle Initialize Authorization

post

Handle integration initialization request.

Body
or
Responses
chevron-right
200

Successful Response

application/json
Responseany
post
/connectors/code_interpreter/integrations

No content

Handle Get Integration

get

Handle get integration request.

Path parameters
user_identifierstringRequired
Responses
chevron-right
200

Successful Response

application/json
Responseany
get
/connectors/code_interpreter/integrations/{user_identifier}

No content

Handle Select Integration

post

Handle integration selection request.

Path parameters
user_identifierstringRequired
Responses
chevron-right
200

Successful Response

application/json
Responseany
post
/connectors/code_interpreter/integrations/{user_identifier}

No content

Handle Remove Integration

delete

Handle integration removal request.

Path parameters
user_identifierstringRequired
Responses
chevron-right
200

Successful Response

application/json
Responseany
delete
/connectors/code_interpreter/integrations/{user_identifier}

No content

Handle User Has Integration

get

Handle user integration existence check.

Responses
chevron-right
200

Successful Response

application/json
Responseany
get
/connectors/code_interpreter/integration-exists
200

Successful Response

No content

Auth Schema

get

Handle authentication schema request.

Responses
chevron-right
200

Successful Response

application/json
Responseany
get
/connectors/code_interpreter/auth-schema
200

Successful Response

No content

Success Authorize Callback

get

Handle successful authorization callback.

Responses
chevron-right
200

Successful Response

application/json
Responseany
get
/connectors/code_interpreter/success-authorize-callback
200

Successful Response

No content

Execute Code

post

Execute code in the sandbox.

Args: request: Request containing execute code details http_headers: HTTP headers

Body

Request model for code execution.

codestring · min: 1Required

Python code to execute in the sandbox. The final result must be printed to stdout.

data_sourceany ofOptional

The data source will be loaded using Pandas DataFrame and saved as /files/data.csv. The file will be available in the sandbox for your code to read. It is your code's responsibility to load and process this file.

or
nullOptional
timeoutany ofOptional

Maximum execution time in seconds

Default: 30
integer · min: 1 · max: 300Optional
or
nullOptional
additional_packagesany ofOptional

Additional packages to install before execution

string[]Optional
or
nullOptional
output_dirsany ofOptional

List of output directories to monitor for file creation. Files created in these directories during code execution will be captured and returned as artifacts. Directories can't be the root ('/') or empty (''), only supports subdirectories of the sandbox root. If not specified, no directories will be monitored.

string[]Optional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
Responseany
post
/connectors/code_interpreter/execute_code

No content

Last updated