openai · OpenAI Platform Docs
Code Interpreter | OpenAI API
Explains how to integrate the Code Interpreter tool into an OpenAI API implementation to enable the model to write and execute Python code for data analysis and mathematical reasoning.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Code Interpreter | OpenAI API
Explains how to integrate the Code Interpreter tool into an OpenAI API implementation to enable the model to write and execute Python code for data analysis and mathematical reasoning.
When To Use
Use when you need to enable an AI agent to perform complex mathematical calculations, data visualization, or execute Python code to solve computational problems.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/interpreter-openai-api-workflow-guide.md | A guide explaining how to use the Code Interpreter tool to run Python code in a sandboxed environment for data analysis and math. | Questions about a guide explaining how to use the Code Interpreter tool to run Python code in a sandboxed environment for data analys... |
examples/interpreter-openai-api-openai-api-interpreter-curl-request.text | A curl command demonstrating how to send a request to the OpenAI API with the code interpreter tool enabled. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to send a request to the OpenAI API with the code interpreter tool enabled. |
examples/interpreter-openai-api-openai-api-interpreter-nodejs-math-tutor.text | A Node.js code example demonstrating how to initialize the OpenAI client and use the code interpreter tool to act as a math tutor. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to initialize the OpenAI client and use the code interpreter tool to act as... |
examples/interpreter-openai-api-openai-api-interpreter-python-math-tutor.text | A Python script demonstrating how to initialize the OpenAI client and use the code interpreter tool to act as a math tutor. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to initialize the OpenAI client and use the code interpreter tool to act as a math... |
examples/interpreter-openai-api-openai-api-interpreter-container-creation-curl.text | A curl command demonstrating how to create a new container with a specified name and memory limit via the OpenAI API. | Exact payloads, commands, or snippets shown in A curl command demonstrating how to create a new container with a specified name and memory limit via the OpenAI API. |
examples/interpreter-openai-api-openai-api-interpreter-python-container-creation.text | A Python script demonstrating how to create a container and use the code interpreter tool via the OpenAI API. | Exact payloads, commands, or snippets shown in A Python script demonstrating how to create a container and use the code interpreter tool via the OpenAI API. |
examples/interpreter-openai-api-openai-api-interpreter-nodejs-container-creation.text | A Node.js code example demonstrating how to create a container and initiate a response using the Code Interpreter tool via the OpenAI API. | Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to create a container and initiate a response using the Code Interpreter too... |
examples/interpreter-openai-api-openai-api-interpreter-message-response.text | A JSON representation of an API message response containing annotations and file citations for the Code Interpreter tool. | Exact payloads, commands, or snippets shown in A JSON representation of an API message response containing annotations and file citations for the Code Interpreter t... |
What This Skill Covers
- The Code Interpreter tool allows models to write and run Python code in a sandboxed environment to solve complex problems in domains like data analysis, codi...
- Main sections:
Containers,Expiration,Work with files,Uploading and downloading files,Dealing with citations.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.openai.com/api/docs/guides/tools-code-interpreter
