How to connect Mathpix to Hermes in 2 mins: No API key needed

You can keep a formula sheet from the photos you send, get typed notes from each day's lecture photos and check your worked solutions and track your mistakes from Hermes. Composio runs each call on its own Mathpix account, so you don't need a Mathpix API key, and your first $2 is free.

MathpixInstant · No API key

Hermes runs Mathpix through Composio, and the cost comes out of your free $2.

  • LaTeX from an equation image$0.002
  • A table from a screenshot$0.002
  • Math from handwriting strokes$0.002

$2 ≈ 1000 images

Composio Instant

What you can do with your free $2

What your free $2 gets you with Mathpix
When you ask Hermes forHermes uses this toolCostWhat $2 gets you
LaTeX from an equation imageOCR Image$0.002 per imageAbout 1,000 images
A table from a screenshotOCR Image$0.002 per imageAbout 1,000 images
Math from handwriting strokesRecognize Strokes$0.002 per requestAbout 1,000 requests

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

2 of 28 Mathpix tools work without a key. For Convert Mathpix Markdown, Create App Token, Delete Conversion, Delete Document, Delete File, Finalize File Job and 20 more, connect your own Mathpix key. Read how Instant works.

How it works

How to connect Mathpix to Hermes

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

  • Bring your own key

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

  • Use the Composio wallet

    Instant

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

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

Get started

Start to use Mathpix in Hermes 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 Hermes

    Follow the setup below. You only do this once.

  3. Ask Hermes for something

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

Setup

Integrating Mathpix with Hermes

Using Composio Connect CLI

1. Install the Composio CLI

Run the install script directly, or paste https://composio.dev/hermes into your Hermes chat box to have it installed for you.

bash
curl -fsSL https://composio.dev/install | bash
Hermes authenticating with Composio

2. Authenticate

Once the CLI is installed, ask Hermes to authenticate with Composio.

3. Connect to Mathpix

Ask your agent to connect to Mathpix, or simply request any Mathpix-related task. Hermes will prompt you to authenticate and authorize access.

4. Done. You're all set with a new Mathpix connection.


Using Composio Connect MCP

1. Get your MCP URL and API Key

Go to dashboard.composio.dev and copy your Connect MCP URL and API key.

Copy MCP URL and API key from Composio dashboard

2. Open the Hermes config file

bash
nano ~/.hermes/config.yaml

3. Add the Composio Connect MCP server

bash
mcp_servers:
  composio:
    url: "https://connect.composio.dev/mcp"
    headers:
      x-consumer-api-key: "YOUR_COMPOSIO_API_KEY"
    connect_timeout: 60
    timeout: 180

Save with Ctrl + O, Enter, then exit with Ctrl + X.

4. Restart your Hermes agent

Once restarted, ask your agent to connect to Mathpix or request any Mathpix-related task. It will prompt you to authenticate and authorize access.

5. Done!

Try it

Ask Hermes for something with Mathpix

Start a new chat and try this prompt:

From now on, whenever I send you a photo of a formula, convert it to LaTeX and add it to my formula sheet for [course], with a short name for each one. Every Friday at 5 pm, send me the full sheet grouped by topic.

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

Optional: connect your own Mathpix key

If you want Convert Mathpix Markdown, Create App Token, Delete Conversion, Delete Document, Delete File, Finalize File Job and 20 more, you need your own key. Ask Hermes to connect your Mathpix account, and it gives you a Composio link:

Connect my Mathpix account using Composio.

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

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

  • Keep a formula sheet from the photos you send

    Less than $0.01 per run

    Converts each formula photo you send to LaTeX, adds it to a running sheet and sends the sheet every Friday.

    From now on, whenever I send you a photo of a formula, convert it to LaTeX and add it to my formula sheet for [course], with a short name for each one. Every Friday at 5 pm, send me the full sheet grouped by topic.

  • Get typed notes from each day's lecture photos

    About $0.01 per run

    Types up the handwritten notes you photographed that day into one Markdown note, every weekday evening.

    Every weekday at 6 pm, take the photos of handwritten notes I sent you that day and type them up as one Markdown note with the math in LaTeX. Put any open questions from yesterday's note at the top so I can follow up.

  • Check your worked solutions and track your mistakes

    Less than $0.01 per run

    Reads a photo of your math working, finds the first wrong step and keeps a tally of your common mistakes.

    Whenever I send you a photo of a worked math solution, read it and check each step. Tell me the first step that's wrong and why. Keep a tally of the kinds of mistakes I make and send me a summary every Sunday.

What it can do

What Hermes can do with Mathpix

Works without a key

  • LaTeX from an equation image
  • A table from a screenshot
  • Math from handwriting strokes

Needs your own Mathpix key

  • Convert Mathpix Markdown
  • Create App Token
  • Delete Conversion
  • Delete Document
  • Delete File
  • Finalize File Job
  • Get App Token
  • Get Conversion Result
  • and 18 more
Tools and prices

Supported tools (28)

Mathpix tools and their Instant prices
ToolWhat it doesWorks without a keyCost on Instant
OCR ImageExtract text, math, tables, diagrams, or chemistry from one image URL or base64 data URI and return the requested OCR representations.Yes$0.002 per image OCR request
Recognize StrokesRecognize handwritten math or text from aligned x/y digital-ink stroke arrays and return OCR representations.Yes$0.002 per non-session digital-ink request
Convert Mathpix MarkdownSubmit Mathpix Markdown, wait for one requested format to finish, then return the conversion ID and downloadable output file.Needs your own keyBilled to your own Mathpix key
Create App TokenMint a short-lived client OCR credential, optionally with a live ink strokes session.Needs your own keyBilled to your own Mathpix key
Delete ConversionPermanently delete one Mathpix Markdown conversion's hosted output data after explicit confirmation.Needs your own keyBilled to your own Mathpix key
Delete DocumentPermanently delete one Mathpix document source and its hosted outputs after explicit confirmation.Needs your own keyBilled to your own Mathpix key
Delete FilePermanently delete one terminal Files API file and its Mathpix-hosted results.Needs your own keyBilled to your own Mathpix key
Finalize File JobPermanently close one Files API job to new file additions and arm its completion webhook.Needs your own keyBilled to your own Mathpix key
Get App TokenGet expiry and ownership metadata for a specific short-lived Mathpix app token.Needs your own keyBilled to your own Mathpix key
Get Conversion ResultWait for an existing Mathpix Markdown conversion and requested format to finish, then return its status and downloadable output file without creating a conversion.Needs your own keyBilled to your own Mathpix key
Get Document ResultWait for an existing Mathpix document job and requested format to finish, then return its status and downloadable output file without creating a new job.Needs your own keyBilled to your own Mathpix key
Get File JobGet aggregate status, file and page counters, and timestamps for one Files API job.Needs your own keyBilled to your own Mathpix key
Get File ResultWait for an existing Files API file and selected format to finish, then return its status and downloadable output without creating a file.Needs your own keyBilled to your own Mathpix key
Get Job File by Custom IDGet the complete Files API processing status for one job member using the exact caller-defined custom ID assigned at submission.Needs your own keyBilled to your own Mathpix key
Get OCR UsageReturn one page of aggregated Mathpix OCR usage for a date range, optionally grouped by usage type, request configuration, or application.Needs your own keyBilled to your own Mathpix key
Get Storage Onboarding IdentitiesGet the Mathpix AWS, Azure, and GCP identities needed to grant cloud-storage access.Needs your own keyBilled to your own Mathpix key
List ConversionsList one page of retained Mathpix Markdown conversion records, optionally filtered by date, and return IDs usable by conversion result or deletion tools.Needs your own keyBilled to your own Mathpix key
List Data SourcesList cloud-storage data sources registered with Mathpix, returning only allowlisted non-secret metadata.Needs your own keyBilled to your own Mathpix key
List DocumentsList retained document OCR jobs for the connected account, optionally filtered by date or document ID, and return one page.Needs your own keyBilled to your own Mathpix key
List File Job FilesList one cursor-paginated page of files in a Mathpix Files API job, optionally filtered by member status.Needs your own keyBilled to your own Mathpix key
Show all 28 tools
More Mathpix tools and their Instant prices
ToolWhat it doesWorks without a keyCost on Instant
List File JobsList one cursor-paginated page of Files API jobs newest first, optionally bounded by inclusive UTC dates.Needs your own keyBilled to your own Mathpix key
OCR DocumentSubmit a PDF, office document, or ebook URL, wait for OCR and the requested conversion to finish, then return its Mathpix job ID and downloadable output file.Needs your own keyBilled to your own Mathpix key
Process File URISubmit one public or registered-cloud document URI to the paid Files API, wait for OCR and one requested output, and return the retained file ID and downloadable result.Needs your own keyBilled to your own Mathpix key
Process Image BatchSubmit a paid asynchronous batch of 1-100 named public image URLs, wait until every key has a semantically successful OCR result, and return the retained batch ID and results.Needs your own keyBilled to your own Mathpix key
Revoke App TokenIrreversibly revoke one short-lived app token immediately.Needs your own keyBilled to your own Mathpix key
Search OCR ResultsSearch retained image and stroke OCR history by date, identifiers, content, tags, or detected content and return one page of results.Needs your own keyBilled to your own Mathpix key
Submit File JobSubmit up to 200,000 remote documents in a paid asynchronous Mathpix Files job, subject to a 10 MB encoded request limit.Needs your own keyBilled to your own Mathpix key
Upload and Process FileUpload one local document to the paid Mathpix Files API, wait until OCR and one requested output are ready, then return the retained Mathpix file ID and a downloadable result.Needs your own keyBilled to your own Mathpix key
Pricing

How you pay for Mathpix

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

    You may have asked for something that needs your own key, like Convert Mathpix Markdown, Create App Token, Delete Conversion, Delete Document, Delete File, Finalize File Job and 20 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 Mathpix call failed with a balance error

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

FAQ

Frequently asked questions

Start with Mathpix.It takes 30 seconds.

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

Get $2 starter credit