AI Gateway
The AI Gateway for developers. Route to hundreds of AI models through a centralized interface.
Back to Knowledge BaseUsing AI Gateway
Run AI prompts in your GitHub Actions with the Vercel AI Action
Use the vercel/ai-action@v2 GitHub Action to call the AI Gateway from a workflow. Generate text or structured JSON, set system messages, and handle untrusted input safely.
Build AI agents with AI Gateway and AI SDK
Build AI agents on Vercel with AI Gateway and AI SDK, then make them reliable, capable, and durable with Sandbox, Chat SDK, Vercel Connect, and Workflow.
How to build an AI agent for Slack with Chat SDK and AI SDK
Build a Slack AI agent using Chat SDK, AI SDK's ToolLoopAgent, and Vercel AI Gateway. Covers project setup, tool definitions, streaming responses, deployment to Vercel, and scaling tool selection with toolpick.
Cost-aware model routing through AI Gateway
Route easy requests to a cheap model and escalate only hard ones to a frontier model through one AI Gateway endpoint, with budgets and spend monitoring.
How I use OpenCode with Vercel AI Gateway to build features fast
How to route different AI models to different coding tasks automatically, cutting token costs by ~70% without losing quality on the work that matters.
How to build a durable AI code agent on Vercel
Build an AI agent that generates code, writes its own tests, and executes them in an isolated microVM with automatic retries.
Build an agent with eve
Draft content in your voice from Slack with eve
Deploy the eve content agent template, a Slack bot that drafts blog posts, LinkedIn posts, release notes, and newsletters in your house voice from Notion, using Vercel Connect, Vercel Blob, and AI Gateway.
Build your first Slack agent with eve
Deploy the eve Slack agent template: a starter Slack bot built on the eve framework with an example tool and skill.
All AI Gateway Guides
- Build a web research agent with Workflow SDK
- Cost-aware model routing through AI Gateway
- Build a daily digest bot with Chat SDK and Workflow SDK
- Build your own Slackbot with Vercel Connect
- Build your first Slack agent with eve
- Build AI agents with AI Gateway and AI SDK
- How to build an agent for Liveblocks with Chat SDK and AI SDK
- How to build a Slack bot that manages files in Vercel Blob
- How to build a durable AI code agent on Vercel