How to connect Openai to VS Code in 2 mins: No API key needed

You can route tickets, tag reviews and score drafts with OpenAI's Decisions API from VS Code, and use OpenAI's chat, image and speech models with your own OpenAI key. Composio lets you use OpenAI inside VS Code.

OpenaiInstant · No API key

VS Code runs Openai through Composio, and the cost comes out of your free $2.

  • A team and urgency for a support ticket$0.0001
  • A rules check on a chat transcript$0.0003
  • A checklist score for a 10-page document$0.0007

$2 ≈ 20000 tickets or 6600 transcripts

Composio Instant

What you can do with your free $2

What your free $2 gets you with Openai
When you ask VS Code forVS Code uses this toolCostWhat $2 gets you
A team and urgency for a support ticketCreate Decision$0.0001 per ticketAbout 20,000 tickets
A rules check on a chat transcriptCreate Decision$0.0003 per transcriptAbout 6,600 transcripts
A checklist score for a 10-page documentCreate Decision$0.0007 per documentAbout 2,800 documents

You pay Openai's price for each call with 0% markup, plus the regular Composio tool call charge. There's no Openai subscription, and you only pay for what you use.

1 of 128 Openai tools work without a key. For Add Upload Part, Cancel batch, Cancel evaluation run, Cancel Response, Cancel Run, Cancel upload and 121 more, connect your own Openai key. Read how Instant works.

How it works

How to connect Openai to VS Code

Composio adds Openai to VS Code as an Instant toolkit. You connect Composio to VS Code once, and then VS Code can use Openai right away. There are two ways to do this:

  • Bring your own key

    You bring your own Openai API key, set it up, and use it.

  • Use the Composio wallet

    Instant

    Composio runs each call on its own Openai account, so you don't have to set anything up at Openai, and your first $2 is free.

You do the setup one time and it takes about a minute. If you build Openai into your own product, turn on Instant toolkits in your project settings so your agent can call Openai for each of your users without a Openai API key, and read Instant tools in the Composio docs for the setup steps and code examples.

Get started

Start to use Openai in VS Code in 3 steps

  1. Turn on Instant

    Open your Composio wallet and turn on Instant. Your free $2 shows up there.

  2. Add Composio to VS Code

    Follow the setup below. You only do this once.

  3. Ask VS Code for something

    Try a Openai prompt. The cost comes out of your $2.

Setup

Integrate Openai MCP with VS Code

1. Install with one click

Click the button below to add Composio to VS Code. You will be prompted to authorize. This requires VS Code 1.99+ with GitHub Copilot.

+Install in VS Code

2. Or add manually

Open or create .vscode/mcp.json in your project root and add the following configuration:

bash
{
  "servers": {
    "composio": {
      "type": "http",
      "url": "https://connect.composio.dev/mcp"
    }
  }
}

3. Authorize

Click the install button to authorize VS Code to connect to Composio. VS Code will detect OAuth and prompt you to sign in.

VS Code MCP server install screen for Composio

A browser window will open to authorize.

Composio authorization browser window

4. Authenticate Openai and start working

Back in VS Code chat, ask the agent to connect to Openai or give it any Openai-related task.

For example, ask it to:

  • "List all available OpenAI models"
  • "Upload a file for fine-tuning"
  • "Create a new assistant with GPT-4"

It will prompt you to authenticate and authorize access to Openai.

That is it. Composio tools are now available in VS Code, and your Openai account is ready to use.

Try it

Ask VS Code for something with Openai

Start a new chat and try this prompt:

I'm adding ticket routing to this project. Run the tickets in fixtures/tickets.json through Create Decision with a choice question for team (billing, technical, shipping or other) and a score for urgency (low, medium or high). Save the labels to fixtures/tickets.labeled.json and the question set to src/decisions/questions.ts.

VS Code runs it on Instant and shows you the result. It doesn't ask you for a Openai key, and the cost comes out of your $2. You can see each call in your wallet.

Optional: connect your own Openai key

If you want Add Upload Part, Cancel batch, Cancel evaluation run, Cancel Response, Cancel Run, Cancel upload and 121 more, you need your own key. Ask VS Code to connect your Openai account, and it gives you a Composio link:

Connect my Openai account using Composio.

Open the link, paste your Openai API key and click Connect Account. You can get a key from OpenAI API keys page. After that, Composio uses your key first and doesn't charge Instant for those calls.

Starter prompts

Use your first $2: copy a prompt into VS Code

Each prompt runs on Instant, and the cost next to it is about what it takes from your $2.

  • Test your classifier questions on sample data

    Less than $0.01

    Runs your sample tickets through Create Decision and saves the labels and the question set in your project.

    I'm adding ticket routing to this project. Run the tickets in fixtures/tickets.json through Create Decision with a choice question for team (billing, technical, shipping or other) and a score for urgency (low, medium or high). Save the labels to fixtures/tickets.labeled.json and the question set to src/decisions/questions.ts.

  • Check a seed file for real personal data before you commit

    Less than $0.01

    Gives each record in a seed or fixture file a probability that it holds a real person's details.

    For each record in [seed or fixture file] (up to 200), get the probability that it holds a real person's name, email, phone number or address instead of made-up test data. List the records above 50% with the field that looks real.

  • Score your app's UI text against your tone rules

    Less than $0.01

    Rates every string in your locale file for clarity and tone and lists the weakest ones to rewrite.

    Score each string in src/locales/en.json against these tone rules: [paste rules]. Rate clarity and tone as poor, fair, good or great, and give the probability that it uses jargon or blames the user. List the 20 weakest strings with the key for each.

What it can do

What VS Code can do with Openai

Works without a key

  • A team and urgency for a support ticket
  • A rules check on a chat transcript
  • A checklist score for a 10-page document

Needs your own Openai key

  • Add Upload Part
  • Cancel batch
  • Cancel evaluation run
  • Cancel Response
  • Cancel Run
  • Cancel upload
  • Compact Response
  • Complete Upload
  • and 119 more
Tools and prices

Supported tools (128)

Openai tools and their Instant prices
ToolWhat it doesWorks without a keyCost on Instant
Create DecisionEvaluate evidence with typed predicate, choice, and score questions.Yes$0.10 per 1M input tokens ($0.20 long context)
Add Upload PartTool to add a part (chunk of bytes) to an Upload object.Needs your own keyBilled to your own Openai key
Cancel batchTool to cancel an in-progress batch.Needs your own keyBilled to your own Openai key
Cancel evaluation runTool to cancel an ongoing evaluation run.Needs your own keyBilled to your own Openai key
Cancel ResponseTool to cancel a background model response by its ID.Needs your own keyBilled to your own Openai key
Cancel RunRequest cancellation of an in-progress assistant run by thread and run ID, for example when the run is no longer needed.Needs your own keyBilled to your own Openai key
Cancel uploadTool to cancel an upload.Needs your own keyBilled to your own Openai key
Compact ResponseTool to compact a conversation or response to reduce token usage.Needs your own keyBilled to your own Openai key
Complete UploadComplete a multipart Upload and create its usable File object.Needs your own keyBilled to your own Openai key
Create Audio TranscriptionTranscribes audio files to text via the OpenAI Audio Transcriptions API, optionally returning timestamps.Needs your own keyBilled to your own Openai key
Create Audio TranslationTool to translate audio files to English text via OpenAI Audio Translations API.Needs your own keyBilled to your own Openai key
Create BatchTool to create and execute a batch from an uploaded file of requests.Needs your own keyBilled to your own Openai key
Create Chat CompletionCreates a chat completion from OpenAI models for conversational AI, text generation, function calling, vision or audio tasks, and structured JSON outputs.Needs your own keyBilled to your own Openai key
Create Completion (Legacy)Generate single-turn text completions using OpenAI's legacy Completions API with an available compatible model.Needs your own keyBilled to your own Openai key
Create ContainerTool to create a new container with configurable memory, expiration, file access, and network policies.Needs your own keyBilled to your own Openai key
Create Container FileTool to create a file in a container.Needs your own keyBilled to your own Openai key
Create ConversationTool to create a new conversation for multi-turn interactions.Needs your own keyBilled to your own Openai key
Create Conversation ItemsTool to create items in a conversation with the given ID.Needs your own keyBilled to your own Openai key
Create EmbeddingsTool to generate text embeddings via the OpenAI embeddings endpoint.Needs your own keyBilled to your own Openai key
Create EvalTool to create an evaluation structure for testing a model's performance.Needs your own keyBilled to your own Openai key
Show all 128 tools
More Openai tools and their Instant prices
ToolWhat it doesWorks without a keyCost on Instant
Create Evaluation RunCreates an evaluation run for testing with a specified data source and model configuration.Needs your own keyBilled to your own Openai key
Create fine-tuning jobCreates a fine-tuning job from an uploaded training dataset and returns job details and status.Needs your own keyBilled to your own Openai key
Generate ImageTool to generate an image via the OpenAI Images API and return hosted image asset URL and metadata.Needs your own keyBilled to your own Openai key
Edit ImageTool to create edited or extended images via OpenAI Images Edit API.Needs your own keyBilled to your own Openai key
Create Image VariationCreate alternative versions of an existing square PNG image using the legacy image variations operation, with options for count, size, and response format.Needs your own keyBilled to your own Openai key
Create MessageCreate a message in an Assistants conversation thread.Needs your own keyBilled to your own Openai key
Create ModerationTool to classify text and/or image inputs for potentially harmful content via the OpenAI Moderation API.Needs your own keyBilled to your own Openai key
Create Realtime CallCreates a Realtime API call over WebRTC and returns the SDP answer needed to complete the peer connection.Needs your own keyBilled to your own Openai key
Create Realtime Client SecretTool to create an ephemeral client secret for authenticating Realtime API connections.Needs your own keyBilled to your own Openai key
Create Realtime SessionTool to create an ephemeral API token for client-side Realtime API applications.Needs your own keyBilled to your own Openai key
Create Realtime Transcription SessionTool to create an ephemeral API token for realtime transcriptions via the Realtime API.Needs your own keyBilled to your own Openai key
Create ResponseCreates a model response via the Responses API for text or image analysis and structured JSON output.Needs your own keyBilled to your own Openai key
Create RunCreate an assistant run on an existing thread to execute the assistant and generate responses, optionally adding messages and setting run options.Needs your own keyBilled to your own Openai key
Create SkillTool to create a skill from uploaded files.Needs your own keyBilled to your own Openai key
Create Speech (TTS)Tool to generate text-to-speech audio using OpenAI's Audio API.Needs your own keyBilled to your own Openai key
Create ThreadCreate an Assistants API conversation thread with optional starter messages and metadata.Needs your own keyBilled to your own Openai key
Create Thread And RunCreate an Assistants thread and run in one request to start a conversation and execute an assistant.Needs your own keyBilled to your own Openai key
Create UploadTool to create an intermediate Upload object for large file uploads.Needs your own keyBilled to your own Openai key
Create Vector StoreTool to create a new vector store.Needs your own keyBilled to your own Openai key
Create Vector Store FileTool to create a vector store file by attaching a File to a vector store.Needs your own keyBilled to your own Openai key
Create vector store file batchTool to create a vector store file batch.Needs your own keyBilled to your own Openai key
Create VideoCreate an asynchronous video generation job from a text prompt using the OpenAI Videos API; the job ID and status were used to track generation.Needs your own keyBilled to your own Openai key
Create Video RemixSubmit a remix job for an existing generated video using a new prompt.Needs your own keyBilled to your own Openai key
Delete assistantDelete a specific Assistants API assistant by ID.Needs your own keyBilled to your own Openai key
Delete chat completionTool to delete a stored chat completion by its ID.Needs your own keyBilled to your own Openai key
Delete containerTool to delete a specific container by its ID.Needs your own keyBilled to your own Openai key
Delete container fileTool to delete a file from a container.Needs your own keyBilled to your own Openai key
Delete conversationTool to delete a conversation by its ID.Needs your own keyBilled to your own Openai key
Delete conversation itemTool to delete an item from a conversation with the given IDs.Needs your own keyBilled to your own Openai key
Delete evaluationTool to delete a specific evaluation by its ID.Needs your own keyBilled to your own Openai key
Delete evaluation runDeletes a specific evaluation run.Needs your own keyBilled to your own Openai key
Delete fileDeletes a file by its ID.Needs your own keyBilled to your own Openai key
Delete messageDelete a specific message from an Assistants conversation thread using the thread and message IDs.Needs your own keyBilled to your own Openai key
Delete responseTool to delete a model response with the given ID.Needs your own keyBilled to your own Openai key
Delete skillTool to delete a specific skill by its ID.Needs your own keyBilled to your own Openai key
Delete threadDelete an Assistants API conversation thread by its ID.Needs your own keyBilled to your own Openai key
Delete Vector StoreTool to delete a vector store.Needs your own keyBilled to your own Openai key
Delete Vector Store FileTool to delete a vector store file.Needs your own keyBilled to your own Openai key
Delete videoDelete a video by ID from OpenAI's Videos API, returning a deletion result.Needs your own keyBilled to your own Openai key
Download fileTool to download the contents of a specified file by its ID.Needs your own keyBilled to your own Openai key
Download Video ContentDownload a generated video's MP4 content or its thumbnail or spritesheet by video ID.Needs your own keyBilled to your own Openai key
Get Chat CompletionTool to retrieve a stored chat completion.Needs your own keyBilled to your own Openai key
Get Chat Completion MessagesTool to retrieve messages from a stored chat completion.Needs your own keyBilled to your own Openai key
Get ChatKit threadTool to retrieve a ChatKit thread by its ID.Needs your own keyBilled to your own Openai key
Get Conversation ItemTool to retrieve a single item from a conversation.Needs your own keyBilled to your own Openai key
Get EvalTool to retrieve an evaluation by ID.Needs your own keyBilled to your own Openai key
Get Evaluation RunTool to retrieve an evaluation run by ID to check status and results.Needs your own keyBilled to your own Openai key
Get Eval Run Output ItemTool to retrieve a specific output item from an evaluation run by its ID.Needs your own keyBilled to your own Openai key
Get eval run output itemsTool to get a list of output items for an evaluation run.Needs your own keyBilled to your own Openai key
Get Evaluation RunsTool to get a paginated list of runs for an evaluation.Needs your own keyBilled to your own Openai key
Get Input Token CountsTool to calculate input token counts for OpenAI API requests.Needs your own keyBilled to your own Openai key
Get MessageRetrieve a specific message from an Assistants thread by thread and message IDs to inspect its content and details.Needs your own keyBilled to your own Openai key
Get ResponseTool to retrieve a model response by ID.Needs your own keyBilled to your own Openai key
Get Run StepRetrieve a specific Assistants run step by thread, run, and step ID to inspect execution progress, tool calls, or message creation.Needs your own keyBilled to your own Openai key
Get Vector StoreTool to retrieve a vector store by its ID.Needs your own keyBilled to your own Openai key
Get Vector Store FileTool to retrieve a file from a vector store.Needs your own keyBilled to your own Openai key
Get Vector Store File BatchRetrieve a file batch by its vector store and batch IDs to check the status and file counts of a batch processing operation.Needs your own keyBilled to your own Openai key
Get VideoRetrieve a video generation job by ID to inspect its status, progress, and details.Needs your own keyBilled to your own Openai key
List AssistantsList Assistants API assistants to discover an assistant ID from returned names or metadata.Needs your own keyBilled to your own Openai key
List BatchesTool to list your organization's batches.Needs your own keyBilled to your own Openai key
List Chat CompletionsTool to list stored chat completions that were created with the `store` parameter set to true.Needs your own keyBilled to your own Openai key
List ChatKit thread itemsList items from a ChatKit thread, including messages, tool calls, and tasks.Needs your own keyBilled to your own Openai key
List container filesList files in a specific container.Needs your own keyBilled to your own Openai key
List ContainersList a page of containers, optionally filtering by name.Needs your own keyBilled to your own Openai key
List Conversation ItemsList a page of items in a conversation by ID for review or processing.Needs your own keyBilled to your own Openai key
List enginesTool to list available engines and their basic information.Needs your own keyBilled to your own Openai key
List EvalsTool to list evaluations for a project.Needs your own keyBilled to your own Openai key
List filesLists files in the authenticated organization/project context.Needs your own keyBilled to your own Openai key
List Files in Vector Store BatchTool to list vector store files in a batch.Needs your own keyBilled to your own Openai key
List fine-tunesLists fine-tuning jobs for the authenticated context, with cursor pagination.Needs your own keyBilled to your own Openai key
List fine-tuning job eventsTool to get status updates for a fine-tuning job.Needs your own keyBilled to your own Openai key
List fine-tuning job checkpointsTool to list checkpoints for a fine-tuning job.Needs your own keyBilled to your own Openai key
List Input ItemsTool to retrieve input items for a given response from the OpenAI Responses API.Needs your own keyBilled to your own Openai key
List MessagesList messages in an Assistants thread, including outputs generated by a run.Needs your own keyBilled to your own Openai key
List modelsLists models available to the current account or organization, with model identifiers and ownership metadata.Needs your own keyBilled to your own Openai key
List RunsList a page of Assistants runs belonging to a thread to inspect their status or execution history.Needs your own keyBilled to your own Openai key
List Run StepsList steps in an Assistants API run to inspect execution progress, tool calls, and message creation events.Needs your own keyBilled to your own Openai key
List SkillsList skills with pagination and timestamp ordering, returning their IDs, names, and descriptions.Needs your own keyBilled to your own Openai key
List ChatKit ThreadsTool to list ChatKit threads with pagination and filtering.Needs your own keyBilled to your own Openai key
List Vector Store FilesTool to list files in a vector store.Needs your own keyBilled to your own Openai key
List Vector StoresTool to list vector stores to discover available vector stores by name or metadata.Needs your own keyBilled to your own Openai key
List VideosList video generation jobs and their statuses, with pagination and timestamp ordering, to review multiple tasks.Needs your own keyBilled to your own Openai key
Modify AssistantModify an existing Assistants API assistant's configuration, such as its model, instructions, tools, or metadata.Needs your own keyBilled to your own Openai key
Modify MessageModify metadata on a specific message in an Assistants conversation thread, identified by thread and message IDs.Needs your own keyBilled to your own Openai key
Modify RunUpdate metadata on a specific Assistants run identified by its thread and run IDs.Needs your own keyBilled to your own Openai key
Modify threadUpdate metadata on an existing Assistants API thread identified by its thread ID.Needs your own keyBilled to your own Openai key
Modify Vector StoreTool to modify an existing vector store.Needs your own keyBilled to your own Openai key
Retrieve assistantRetrieve a specific assistant by ID to inspect its configuration and metadata.Needs your own keyBilled to your own Openai key
Retrieve BatchTool to retrieve a batch by ID to check its status, progress, and results.Needs your own keyBilled to your own Openai key
Retrieve containerTool to retrieve details of a specific container by its ID.Needs your own keyBilled to your own Openai key
Retrieve container fileTool to retrieve metadata for a specific file in a container.Needs your own keyBilled to your own Openai key
Retrieve container file contentTool to retrieve the content of a file within a container.Needs your own keyBilled to your own Openai key
Retrieve engineRetrieve a legacy OpenAI engine by ID to inspect its availability and metadata.Needs your own keyBilled to your own Openai key
Retrieve fileTool to retrieve information about a specific file.Needs your own keyBilled to your own Openai key
Retrieve fine-tuning jobTool to retrieve information about a fine-tuning job.Needs your own keyBilled to your own Openai key
Retrieve modelTool to retrieve details of a specific model, confirming its metadata (ownership, created date) and verifying access under your org — a model appearing in OPENAI_LIST_MODELS does not guarantee access.Needs your own keyBilled to your own Openai key
Retrieve runRetrieve an Assistants run by thread and run ID to check its status, errors, and usage, such as when polling for completion before reading thread messages.Needs your own keyBilled to your own Openai key
Retrieve threadRetrieve an Assistants API thread by ID to inspect its metadata; message bodies are obtained separately.Needs your own keyBilled to your own Openai key
Retrieve Vector Store File ContentTool to retrieve the parsed contents of a vector store file.Needs your own keyBilled to your own Openai key
Run graderTool to run a grader to evaluate model performance on a given sample.Needs your own keyBilled to your own Openai key
Search Vector StoreTool to search a vector store for relevant chunks based on a query and file attributes filter.Needs your own keyBilled to your own Openai key
Submit Tool Outputs to RunSubmit all tool call outputs together to continue an Assistants API run whose required action is submit_tool_outputs.Needs your own keyBilled to your own Openai key
Update Chat CompletionTool to update metadata for a stored chat completion.Needs your own keyBilled to your own Openai key
Update ConversationTool to update a conversation's metadata.Needs your own keyBilled to your own Openai key
Update EvalUpdates an evaluation's name or metadata without changing its data source configuration or testing criteria.Needs your own keyBilled to your own Openai key
Update Vector Store File AttributesTool to update custom attributes on a vector store file.Needs your own keyBilled to your own Openai key
Upload fileUpload file bytes to OpenAI for a specified purpose, such as fine-tuning, and return the uploaded file's details.Needs your own keyBilled to your own Openai key
Validate grader configurationTool to validate a grader configuration for fine-tuning jobs.Needs your own keyBilled to your own Openai key
Pricing

How you pay for Openai

  • Your first $2 is freeIt's added to your Composio wallet when you turn on Instant.
  • You pay for each callYou pay Openai's price with 0% markup, plus the regular Composio tool call charge.
  • Your own key comes firstIf you connect your own Openai key, Composio uses it and doesn't charge Instant for those calls.
  • You control the costYou can ask your agent to check with you before each paid call, and you can turn Instant off at any time.
  • You can see each callYour wallet shows each call and what it cost.
  • When your balance runs outYou can add funds to your wallet on a Pro plan or connect your own key.
Help

Troubleshooting

  1. 1. VS Code asks me for a Openai API key

    You may have asked for something that needs your own key, like Add Upload Part, Cancel batch, Cancel evaluation run, Cancel Response, Cancel Run, Cancel upload and 121 more. Those tools don't run on Instant. For everything else, check that Instant is turned on in your Composio wallet, then ask again.

  2. 2. I can't see my free $2

    Open your wallet in the Composio dashboard and check that Instant is turned on. If the $2 still isn't there, email support@composio.dev from the address you signed up with.

  3. 3. A Openai call failed with a balance error

    Your balance is empty. Add funds to your wallet on a Pro plan, or connect your own Openai key, then try again.

FAQ

Frequently asked questions

Start with Openai.It takes 30 seconds.

New accounts get a one-time $2 starter credit for Instant calls.Run Openai from your agent with no Openai key.

Get $2 starter credit