---
title: "Add AI to your app with the Hercules AI Gateway"
description: "Add a support chatbot, summaries, images, speech or ticket sorting to the app you build. The Hercules AI Gateway is built in, with no API keys to set up."
---

# Add AI to your app with the Hercules AI Gateway

The Hercules AI Gateway lets the apps you build use AI for features such as a support chatbot, summaries and speech. It's built into every app, so you don't set up API keys before you start. Ask Hercules for the feature and it uses the gateway by default.

- **Built into every app.** Use it from the first prompt.
- **New models on release.** Models from OpenAI, Anthropic and Google work as soon as each provider ships them.
- **Decisions in under a second.** Sort, flag and score records with Jev at a fraction of a chat model's cost.

## What can you add to your app with the AI Gateway?

### Give customers a chatbot

Ask Hercules for a support chatbot that opens from a widget in the page corner. Replies can stream in as the model writes them. [AI Gateway](https://hercules.app/docs/apps/ai-gateway)

### Write and summarize text

Your app can draft product descriptions, condense a long document or pull the details from a message. Besides text, it reads images and PDFs. [AI Gateway](https://hercules.app/docs/apps/ai-gateway)

### Sort, route and score records

AI Decisions with Jev answers yes or no, choice and rating questions with a confidence for each. Your app can send a ticket to billing on its own and pass unclear cases to a person. [AI decisions](https://hercules.app/docs/apps/ai-gateway/decisions)

### Generate images and speech

Turn a text prompt into an image, or read an article aloud in a choice of voices. Your app can also transcribe an uploaded audio or video file. [AI Gateway](https://hercules.app/docs/apps/ai-gateway)

### Pick the model for the job

Hercules starts with a fast, low-cost default model, and you can name another in chat. Any current model from the four supported providers works in Chat Completions, the default format for sending requests, while the other two formats accept fewer. [AI Gateway](https://hercules.app/docs/apps/ai-gateway)

### Pay for what your users run

Hercules bills gateway usage through Hercules Cloud, separate from the AI credits you spend building the app. Totals show under Settings, then Billing, then Hercules Cloud. [Hercules Cloud](https://hercules.app/docs/platform/billing/cloud-credits)

## How do you add AI to your app?

### 1. Describe the feature

> Read each new quote request email, extract the pickup city, delivery city and weight, and mark the ones worth quoting.

Hercules builds it on the gateway with the default model.

### 2. Choose a model, or keep the default

> Use Anthropic for this.

Hercules switches the feature to that provider.

### 3. Add a fallback, then publish

> If an AI request fails, mark the email for manual review.

Hercules adds the fallback, and you publish the app.

## What has a business done with it?

Petony Transportes uses the Hercules AI Gateway in their ERP to read incoming quote request emails. The AI flags the ones worth pursuing and extracts the details the team needs. Petony runs road freight across Brazil with 45 employees and 70 drivers. They used to get hundreds of quote requests a day, many of them junk.

> Before, we had to go to other sites to check pricing. Today those pricing sites are inside the system. I set the margin and send the quote. Our revenue has gone up ~20%.

Pedro Amaral, Founder, Petony Transportes

Read the [Petony Transportes story](https://hercules.app/customers/petony-transportes)

## What should you know before you start?

- When your Hercules Cloud balance runs out, AI requests fail until you add credits.
- The gateway serves models from OpenAI, Anthropic and Google AI Studio. Cloudflare Workers AI is the only other provider.
- In the default format, only OpenAI models take a whole PDF, so send other models the pages as images or text.
- Realtime voice input and video output aren't available.
- A chat or text request can be up to 8 MB. Audio transcription and image edit uploads can be up to 50 MB.
- The gateway has a rate limit, which support can raise.
- See what each plan includes on the [pricing page](https://hercules.app/pricing).

## Related features

- Use [Hercules Agents](/products/agents) to run a whole job when AI should work on a schedule or in Slack.
- Use [Database](/features/database) to save what the AI writes, sorts and scores when your app needs to keep it.

## How do you get started?

Try one feature, such as ticket sorting, on a few real examples before you publish. Start building.

## Frequently asked questions

### Can I pay a model provider directly?

To pay a provider yourself, ask Hercules to remove the AI Gateway, then set up your own API key and model. [AI Gateway](https://hercules.app/docs/apps/ai-gateway)

### How do I send a large PDF?

Split a large PDF into batches of pages, since one request carries roughly 6 MB of file once encoded. [AI Gateway](https://hercules.app/docs/apps/ai-gateway)

### When should I use Jev instead of a chat model?

Use Jev when your app acts on the answer, such as a category. Use a chat model when a person reads the output. [AI decisions](https://hercules.app/docs/apps/ai-gateway/decisions)

### Can I see what each AI request costs?

Hercules can show what each AI request cost below the answer, exact for most models in the Responses and Messages formats and estimated in Chat Completions. [AI Gateway](https://hercules.app/docs/apps/ai-gateway)

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Can I pay a model provider directly?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "To pay a provider yourself, ask Hercules to remove the AI Gateway, then set up your own API key and model. AI Gateway"
      }
    },
    {
      "@type": "Question",
      "name": "How do I send a large PDF?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Split a large PDF into batches of pages, since one request carries roughly 6 MB of file once encoded. AI Gateway"
      }
    },
    {
      "@type": "Question",
      "name": "When should I use Jev instead of a chat model?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Use Jev when your app acts on the answer, such as a category. Use a chat model when a person reads the output. AI decisions"
      }
    },
    {
      "@type": "Question",
      "name": "Can I see what each AI request costs?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Hercules can show what each AI request cost below the answer, exact for most models in the Responses and Messages formats and estimated in Chat Completions. AI Gateway"
      }
    }
  ]
}
```
