Skip to main content
Use the Hercules AI Gateway to build AI features in your app like chatbots, content generation, image generation, speech, transcription, and summarization. Hercules AI Gateway is built into all apps and works out of the box. You can use all the most popular models from OpenAI, Anthropic, Google, and xAI without needing to set up API keys.
AI Gateway customer support chatbot widget example

How do I set it up?

Ask Hercules to build you an app that uses AI! Hercules will use Hercules AI Gateway by default e.g.
Setup Hercules AI Gateway
Build a customer support chatbot for my app. Have it expand from a widget in the bottom right

What can I build with AI Gateway?

  • Chatbots: Customer support chatbot, AI coach
  • Content generation: Write descriptions, emails, summaries
  • Image generation: Create images from a text prompt
  • Voice and audio: Turn text into speech, transcribe audio and video to text
  • Analysis: Extract insights from text, categorize data
  • Summarization: Condense long documents or articles
  • Personalization: Generate custom recommendations

Can I generate images and audio?

Yes. The AI Gateway handles images and audio through the same setup, with no extra API keys.
  • Image generation: Create images from a text prompt
  • Text to speech: Turn written text into spoken audio, with a choice of voices
  • Speech to text: Transcribe audio and video files into text
Ask Hercules to add these to your app:
Add image generation
Add a feature that turns a text prompt into an image
Add text to speech
Add a button that reads my articles aloud
Add transcription
Let users upload an audio file and get back a text transcript

What models can I choose?

We support models (like GPT, Claude, Gemini) from the following providers: Anthropic, Google AI Studio, Groq, and OpenAI

What model does Hercules use by default?

By default, Hercules AI Gateway uses GPT 5 mini by OpenAI. It’s fast, cheap, and very accurate.

How do I choose another model?

If you’d like to use another model, just tell Hercules the model and/or provider you want to use:
  • Use Claude Haiku by Anthropic
  • Use Gemini 3 Flash by Google

What input/output is supported?

InputOutput
TodayText, images, PDFs, audio, videoText, images, voice/audio
PlannedRealtime voiceVideo

How is billing handled?

AI Gateway usage is billed separately through Hercules Cloud. It’s a separate line item from the Hercules AI agent (what you use to build your app). We currently bill at the exact same rate as the model provider. For instance, if you use $1 of OpenAI, you will be billed $1 of Hercules Cloud.

Do I need my own API keys?

No. This is all managed by Hercules out of the box through the HERCULES_API_KEY. If you want to manage billing yourself, you need to ask Hercules to remove the Hercules AI Gateway, then configure the API key and model yourself.

Additional FAQ

The Hercules AI agent builds your app. AI Gateway lets your users use AI features inside your published app.They are also currently billed separately. Hercules AI Agent bills against your monthly AI credits. Hercules AI Gateway bills against your Hercules Cloud credits.
Use the OpenAI SDK with Hercules configuration:
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://ai-gateway.hercules.app/v1",
  apiKey: process.env.HERCULES_API_KEY,
});

const response = await openai.chat.completions.create({
  model: "openai/gpt-5-mini",
  messages: [{ role: "user", content: prompt }],
});
The HERCULES_API_KEY is automatically available in your app’s environment.
Use the same client. Switch the method and model:
// Image generation
const image = await openai.images.generate({
  model: "openai/gpt-image-2",
  prompt: "A serene mountain landscape at sunset",
});

// Text to speech
const speech = await openai.audio.speech.create({
  model: "openai/gpt-4o-mini-tts",
  voice: "coral",
  input: "Hello from Hercules",
});

// Speech to text
const transcript = await openai.audio.transcriptions.create({
  model: "openai/gpt-4o-transcribe",
  file: audioFile,
});
Yes. Hercules handles rate limiting automatically. If you need higher limits, please contact support.
Yes. Hercules can set up your chatbot to stream responses in real-time as they come through
View usage in your billing dashboard under Hercules Cloud.
AI Gateway image generation runs inside your published app, for your users, at runtime. The AI Image Generation feature is Hercules creating images for your app while you build it (logos, banners, illustrations).