Openai API

Give your agents access to Openai API. Bring your own Openai key, or skip the signup and pay per call from your Composio balance with Composio Instant.

Openai logoOpenai
Instant

Openai is a powerful AI platform offering advanced language, vision, and multimodal APIs. It's your gateway to building, managing, and scaling intelligent assistants and workflows.

128 Tools
COMPOSIO INSTANT

What is Composio Instant?

Composio Instant lets your agent use paid APIs like Openai without a separate account or API key for each one. New accounts start with $2 of free credit.

No Openai account or key

Your agent calls Openai through Composio, so there is nothing to sign up for, store, or rotate.

Pay per call, at cost

$0.10 per 1M input tokens ($0.20 long context); cache and output free; $2 max., paid from your Composio balance with zero markup.

Works in any agent

Claude, ChatGPT, Cursor, and other MCP clients, or your own code with the Composio SDK.

Works with your apps

Use Openai with Gmail, Slack, Google Sheets, and 1,700+ other apps you connect.

AI ASSISTANTS

Connect the Openai API to your AI assistant

Use Openai from the AI assistant you already work in. Connect Composio once, then paste the prompt.

  1. 1

    Open the Connectors menu

    Use the button to open Claude's Add connector dialog with Composio filled in. Or click + in the message box, then Connectors, Add connector and Add custom connector.
    Add Composio to Claude
  2. 2

    Add the Composio MCP server

    Name it Composio, paste the MCP server URL and click Add.
    https://connect.composio.dev/mcp
  3. 3

    Authorize in your browser

    A browser window opens. Sign in to Composio to approve the connection.
  4. 4

    Paste the prompt

    Start a new chat and paste the prompt. Claude runs the call on Composio Instant.
  1. 1

    Install the Composio plugin

    Open Composio's plugin page in ChatGPT and click Install. Sign in to ChatGPT first if it asks.
    Install in ChatGPT
  2. 2

    Authorize in your browser

    Connect the plugin, then sign in to Composio to approve the connection.
  3. 3

    Turn on Composio in your chat

    In a new chat, click +, then More, and select Composio.
  4. 4

    Paste the prompt

    Paste the prompt into that chat. ChatGPT runs the call on Composio Instant.
  1. 1

    Install the Composio plugin

    Open Composio in the Cursor marketplace, click Install Composio Plugin for Cursor and approve the connection in your browser.
    Install in Cursor
  2. 2

    Paste the prompt

    Open the Agent chat and paste the prompt. Cursor runs the call on Composio Instant.
  1. 1

    Add the Composio plugin

    Open Composio's listing on x.ai and click Add to Grok Bot. When Grok Bot opens the plugin, click Add.
    Add to Grok Bot
  2. 2

    Authenticate

    Go to Installed, open Composio and click Authenticate. Sign in to Composio and click Authorize.
  3. 3

    Paste the prompt

    Paste the prompt into your bot's chat. Grok Bot runs the call on Composio Instant.
  1. 1

    Paste the setup prompt

    Copy this into your Hermes chat. Hermes adds the Composio MCP server for you.
    Set up Composio from composio.dev/hermes
  2. 2

    Authorize in your browser

    A browser window opens. Sign in to Composio to approve the connection.
  3. 3

    Paste the prompt

    Start a new chat and paste the prompt. Hermes runs the call on Composio Instant.
ClaudeNew chat

Paste this prompt

Use OpenAI through Composio Instant to evaluate this evidence: Photosynthesis is the process by which plants use sunlight, water, and carbon dioxide to make sugars and release oxygen. Does it support that photosynthesis stores energy in sugars? Return yes or no.

What success looks like

OPENAI_CREATE_DECISION

Your assistant runs OpenAI and replies with whether the evidence supports that photosynthesis stores energy in sugars.

Runs on Composio Instant
SDK

Use the Openai API in your code

Call Openai from your own agent with the Composio SDK. Four steps and one tool call.

  1. 1

    Set up Composio

    Turn on Instant Toolkits in your project settings and check your prepaid balance in Billing. Then set your API key.
    export COMPOSIO_API_KEY="your_composio_api_key"
  2. 2

    Install the SDK

    The Python SDK needs Python 3.11 through 3.15.
    pip install composio
  3. 3

    Run the call

    Create a session that keeps Instant to this toolkit and reports the charge, then run the tool on the Instant account.
    OPENAI_CREATE_DECISION
  4. 4

    Read the response

    When the call runs on Instant, the response includes its charge: the amount as an exact USD decimal string, the currency and charged_by.
agent.py
from composio import Composio

composio = Composio()

session = composio.sessions.create(
    user_id="user_123",
    toolkits=["openai"],
    instant={
        "toolkits": {"enable": ["openai"]},
        "return_instant_charge": True,
    },
)

result = session.execute(
    "OPENAI_CREATE_DECISION",
    arguments={
        "input": "Photosynthesis is the process by which plants use sunlight, water, and carbon dioxide to make sugars and release oxygen.",
        "model": "gpt-6-luna",
        "questions": [
            {
                "type": "predicate",
                "question": "Does the evidence support that photosynthesis stores energy in sugars?",
            },
        ],
    },
    account="instant_account",
)
print(result)
print("Instant charge:", result.instant_charge)
TOOLS

Available Openai API tools

1 Openai tool runs on Instant, priced per call with no Openai key. Tools marked Your key need your own Openai account.

ActionTool slugWhat it doesAvailability
Create DecisionOPENAI_CREATE_DECISIONEvaluate evidence against typed questions and return decisions.
Instant$0.10 per 1M input tokens ($0.20 long context); cache and output free; $2 max.
Create ResponseOPENAI_CREATE_RESPONSEGenerate a model response from text or image input.Your key
Create EmbeddingsOPENAI_CREATE_EMBEDDINGSTurn text into embeddings with the OpenAI embeddings endpoint.Your key
Generate ImageOPENAI_CREATE_IMAGEGenerate an image and return its URL and metadata.Your key
Transcribe AudioOPENAI_CREATE_AUDIO_TRANSCRIPTIONConvert an audio file to text, with optional timestamps.Your key
Generate SpeechOPENAI_CREATE_SPEECHConvert text to audio with the OpenAI Audio API.Your key
Classify ContentOPENAI_CREATE_MODERATIONClassify text or image input for potentially harmful content.Your key

Instant prices are Openai's list prices with 0% markup, paid from your Composio balance and updated every hour. Instant calls also count toward your plan's tool calls. See all plans on the pricing page.

USE CASES

Openai API use cases and example prompts

Copy a prompt into your agent. Each one uses Openai with apps you connect through Composio.

  • Review launch readiness

    Use OpenAI to evaluate the evidence in my Launch Readiness tracker in Google Sheets against its readiness questions. Add each decision to the tracker, then post a summary in Slack's #launch channel.

    Apps used: Openai, Google Sheets, Slack

  • Turn review recordings into notes

    Use OpenAI to transcribe the launch review recording in my Launch Reviews folder in Google Drive. Save the transcript as a document in Google Docs named Launch Review Notes.

    Apps used: Openai, Google Drive, Google Docs

  • Create launch image assets

    Use OpenAI to generate an image for the Acme product launch using the brief in my Launch Assets tracker in Google Sheets. Add the image URL to the tracker and post it in Slack's #launch channel.

    Apps used: Openai, Google Sheets, Slack

  • Screen submitted campaign copy

    Use OpenAI to classify the campaign copy files in my Review Queue folder in Google Drive for potentially harmful content. Add each file name and its classification to my Content Review tracker in Google Sheets.

    Apps used: Openai, Google Drive, Google Sheets

TROUBLESHOOTING

Openai API troubleshooting

Still stuck? The Instant tools docs cover limits, charges and session settings.

Start with Openai.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Openai tool your agent needs.Free to start.

Start building