How to connect Tavily to Codex in 2 mins: No API key needed

You can save a list of web pages as markdown files, answer a file of research questions and fill in missing details in a company CSV from Codex. Composio runs each call on its own Tavily account, so you don't need a Tavily API key, and your first $2 is free.

TavilyInstant · No API key

Codex runs Tavily through Composio, and the cost comes out of your free $2.

  • A web search with sources$0.008
  • Clean text from a web page$0.0016

$2 ≈ 250 searches or 1200 pages

Composio Instant

What you can do with your free $2

What your free $2 gets you with Tavily
When you ask Codex forCodex uses this toolCostWhat $2 gets you
A web search with sourcesTavily search$0.008 per searchAbout 250 searches
Clean text from a web pageTavily extract$0.0016 per pageAbout 1,200 pages

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

2 of 5 Tavily tools work without a key. For Tavily crawl, Get Tavily usage and Tavily map website, connect your own Tavily key. Read how Instant works.

How it works

How to connect Tavily to Codex

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

  • Bring your own key

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

  • Use the Composio wallet

    Instant

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

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

Get started

Start to use Tavily in Codex 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 Codex

    Follow the setup below. You only do this once.

  3. Ask Codex for something

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

Setup

How to install Tavily MCP in Codex

Run the setup command

Run this command in your terminal to add the Composio MCP server to Codex.

Terminal

It will initiate the authentication in a browser window, authorize Codex to access your Composio account.

Composio authentication page

(Optional) Authenticate with OAuth

To authenticate manually, run the login command to open a browser window and authorize Codex to access your Composio account.

bash
codex mcp login composio

Verify the connection

Run codex mcp list to confirm Composio appears as a registered MCP server.

bash
codex mcp list

Codex App

Codex App follows the same approach as VS Code.

  1. Click ⚙️ on the bottom left → MCP Servers → + Add servers → Streamable HTTP:
  2. Fill the header and Key fields with { "x-consumer-api-key" = "ck_*******" }.
  3. The Key is the Composio API key, that you can find on dashboard.composio.dev
  4. Click on Authenticate and authorize Codex to your Composio account and you're all set.
Codex App MCP setup
  1. Restart and verify if it's there in .codex/config.toml
bash
[mcp_servers.composio]
url = "https://connect.composio.dev/mcp"
http_headers = { "x-consumer-api-key" = "ck_*******" }

Try it

Ask Codex for a Tavily task. The first time, Composio asks you to connect your Tavily account.

For example, ask it to:

  • "Find latest news about electric vehicles"
  • "Search for recent AI research papers"
  • "Get top articles on remote work trends"
Try it

Ask Codex for something with Tavily

Start a new chat and try this prompt:

For each URL in urls.txt (up to 25), extract the page as markdown and save it to pages/ with a file name based on the page title. Then write pages/index.csv with the URL, title, word count and file name, and list any URLs that failed.

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

Optional: connect your own Tavily key

If you want Tavily crawl, Get Tavily usage and Tavily map website, you need your own key. Ask Codex to connect your Tavily account, and it gives you a Composio link:

Connect my Tavily account using Composio.

Open the link, paste your Tavily API key and click Connect Account. You can get a key from Tavily dashboard. 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 Codex

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

  • Save a list of web pages as markdown files

    About $0.04

    Reads every URL in a text file and saves each page as clean markdown, ready to use as a local knowledge base.

    For each URL in urls.txt (up to 25), extract the page as markdown and save it to pages/ with a file name based on the page title. Then write pages/index.csv with the URL, title, word count and file name, and list any URLs that failed.

  • Answer a file of research questions

    About $0.08

    Runs a web search for each question in a file and writes one report with short answers and source links.

    For each line in questions.txt (up to 10 questions), search the web and write a short answer with the 3 best source links. Save everything to research/report.md with one section per question, and end with a list of the questions you couldn't answer well.

  • Fill in missing details in a company CSV

    About $0.12

    Searches the web for each company in a CSV and adds its website, a one-line description and the source link.

    Read companies.csv (up to 15 rows, one company name per row). For each one, search the web and add three columns: website, what the company does in one line, and the source URL. Write the result to companies_enriched.csv and leave a cell empty if you aren't sure.

  • Write upgrade notes for your dependencies

    About $0.08

    Looks up breaking changes for the most outdated packages in your repo and writes them into one upgrade file.

    Run the outdated-packages check for this repo and pick the 8 packages that are furthest behind. For each one, search the web for its changelog or release notes and note the breaking changes between our version and the latest. Write UPGRADE_NOTES.md with one section per package and links.

What it can do

What Codex can do with Tavily

Works without a key

  • A web search with sources
  • Clean text from a web page

Needs your own Tavily key

  • Tavily crawl
  • Get Tavily usage
  • Tavily map website
Tools and prices

Supported tools (5)

Tavily tools and their Instant prices
ToolWhat it doesWorks without a keyCost on Instant
Tavily extractExtract web page content from specified URLs using Tavily, with optional image extraction and query-based content reranking.Yes$0.008 per 5 successful URL extractions.
Tavily searchSearch the web via Tavily with controls for search depth, result count, and domain filtering.Yes$0.008 per web search.
Tavily crawlTool to perform intelligent graph-based website crawling with parallel path exploration and content extraction.Needs your own keyBilled to your own Tavily key
Get Tavily usageTool to retrieve API key and account usage statistics from Tavily.Needs your own keyBilled to your own Tavily key
Tavily map websiteTool to map a website and discover its pages.Needs your own keyBilled to your own Tavily key
Pricing

How you pay for Tavily

  • Your first $2 is freeIt's added to your Composio wallet when you turn on Instant.
  • You pay for each callYou pay Tavily's price with 0% markup, plus the regular Composio tool call charge.
  • Your own key comes firstIf you connect your own Tavily 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. Codex asks me for a Tavily API key

    You may have asked for something that needs your own key, like Tavily crawl, Get Tavily usage and Tavily map website. 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 Tavily call failed with a balance error

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

FAQ

Frequently asked questions

Start with Tavily.It takes 30 seconds.

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

Get $2 starter credit