---
title: AI Gateway
description: The AI Gateway for developers. Route to hundreds of AI models through a centralized interface.
url: "https://vercel.com/kb/ai-gateway"
published: 2026-06-15
last_updated: 2026-09-03
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# AI Gateway

The AI Gateway for developers. Route to hundreds of AI models through a centralized interface.

## Using AI Gateway

- [Run AI prompts in your GitHub Actions with the Vercel AI Action](/kb/guide/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](/kb/guide/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](/kb/guide/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](/kb/guide/cost-aware-model-routing-with-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](/kb/guide/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](/kb/guide/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.

## Ship your own software factory with eve

- [Build a software factory with eve](/kb/guide/eve-software-factory): Foreman, a software factory built on eve. It turns GitHub and Linear work items into reviewed draft pull requests through four agent stations, triaging issues and fixing its own red CI along the way.
- [Give your software factory a browser](/kb/guide/software-factory-browser): Add a KERNEL cloud browser to the eve software factory template so Foreman can reproduce flow bugs, sign in through managed auth, and verify fixes on preview deployments in attended sessions.
- [Manage Vercel projects with a software factory](/kb/guide/software-factory-vercel-mcp): Add Vercel's hosted MCP to the eve software factory template so Foreman can read build logs, runtime errors, and deployment history for the app your target repository deploys, brokered at app scope through Vercel Connect.

## Build an agent with eve

- [Build a software factory with eve](/kb/guide/eve-software-factory): Foreman, a software factory built on eve. It turns GitHub and Linear work items into reviewed draft pull requests through four agent stations, triaging issues and fixing its own red CI along the way.
- [Build an incident response sre agent with eve](/kb/guide/eve-incident-sre-agent): sre is an incident response agent for Slack. It investigates production issues using a hypothesis-driven approach and returns verifiable evidence from connected sources.
- [How to automatically approve tool calls in eve with Jev](/kb/guide/auto-approve-tool-calls-eve-jev): Use Jev to review tool calls in eve, allow routine actions, and request human approval when needed. Configure the policy and test its failure paths.
- [Run a marketing team from Slack with eve](/kb/guide/marketing-team-eve): Team of five marketing agents built on eve. The lead routes work to specialists that write long-form into Notion, queue social posts in Typefully, run email in Resend, and audit for SEO, with approvals for anything irreversible.
- [How to build a browser agent that works behind a login](/kb/guide/build-a-browser-agent): Build a browser agent with eve, Vercel Connect, and KERNEL managed auth that signs a user in through a human-in-the-loop handoff and completes tasks behind a login without exposing credentials.
- [Give your eve agent an email inbox with Resend](/kb/guide/eve-agent-with-resend): Connect an eve agent to email using the Chat SDK channel and the Resend adapter. Handle inbound email, threaded replies, attachments, and proactive sends.
- [Manage your Sanity project from Slack with eve](/kb/guide/eve-sanity-copilot): A Slack-based Sanity copilot built on eve. It queries and edits content with GROQ, shapes schemas, manages releases, and drafts long-form pieces into Notion.

## All AI Gateway guides

- [How to control AI provider data handling with AI Gateway](/kb/guide/control-ai-provider-data): Prevent AI providers from training on your prompts, enforce zero data retention, and restrict providers and models with Vercel AI Gateway.
- [Moderate product reviews with Jev, TanStack AI, and AI Gateway](/kb/guide/moderate-product-reviews-jev-tanstack-ai): Moderate product reviews for an e-commerce storefront with Jev from TypeSafe AI and TanStack AI's \`decide()\` function. The \`@tanstack/ai-vercel-gateway\` adapter returns typed choices, scores, and boolean probabilities through Vercel AI Gateway, so your code can publish clear reviews and hold flagged ones.
- [Run a research workspace on Vercel](/kb/guide/run-research-workspace-vercel): Plan a durable research workspace on Vercel's Agentic Infrastructure with Workflows, internal API tools, Vercel Sandbox isolation, artifacts, and tradeoffs.
- [Route form submissions with Jev and AI SDK](/kb/guide/jev-ai-sdk-form-router): Route form submissions to the right team with the Jev x AI SDK Form Router template. Jev routes clear cases and a fallback model decides uncertain ones.
- [How to classify, route, and score with Jev and AI SDK](/kb/guide/typesafe-jev-and-ai-sdk): Use Jev from TypeSafe AI with AI SDK's experimental \`evaluate\` API to classify, route, score, and verify inside your application. Jev returns typed choices, scores, and boolean probabilities through AI Gateway.
- [How to automatically approve tool calls in eve with Jev](/kb/guide/auto-approve-tool-calls-eve-jev): Use Jev to review tool calls in eve, allow routine actions, and request human approval when needed. Configure the policy and test its failure paths.
- [Using TanStack AI with Vercel AI Gateway](/kb/guide/tanstack-ai-vercel-ai-gateway): Connect TanStack AI to Vercel AI Gateway with the @tanstack/ai-vercel-gateway adapter to stream chat, route across providers, and generate embeddings and images with one API key.
- [Run recurring security reviews with deepsec on Vercel](/kb/guide/deepsec-reviews-on-vercel): Learn how to run periodic security scans on your code with deepsec. Set up deepsec to review GitHub repositories and deliver findings to GitHub and Slack using Vercel Connect, Workflows, Sandbox, and AI Gateway.
- [How to route your coding agent spend through AI Gateway](/kb/guide/route-coding-agent-spend-through-ai-gateway): Point Claude Code, Codex, Cursor, and every other harness on your machine at AI Gateway with one CLI command, on a budgeted key, so all of your coding agent spend lands in one place.
- [How to build your own AI model router](/kb/guide/how-to-build-your-own-ai-model-router): Build an AI model router with Vercel AI Gateway. Keep routing, key, and retention decisions in your code while the gateway handles provider integrations, failover, and cost metering
- [Ship social posts from Slack with eve and Typefully](/kb/guide/eve-typefully-social-media-agent): A Slack-based social media agent built on eve. It drafts posts and threads for X, LinkedIn, Threads, Bluesky, and Mastodon through Typefully, manages the publishing queue, reads analytics, and drafts long-form pieces into Notion.
- [Manage your Sanity project from Slack with eve](/kb/guide/eve-sanity-copilot): A Slack-based Sanity copilot built on eve. It queries and edits content with GROQ, shapes schemas, manages releases, and drafts long-form pieces into Notion.
- [How to build a Slack bot that manages files in Vercel Blob](/kb/guide/slack-bot-vercel-blob): Build a Slack bot using Chat SDK, AI SDK, and Files SDK that can list, read, upload, and delete files in Vercel Blob through tool calls. Vercel Connect supplies runtime Slack tokens and forwards triggers.
- [Build a Linear agent with Vercel Connect](/kb/guide/linear-agent-vercel-connect): Build a native Linear Agent that helps your team manage issues. Mention it on any issue and it responds in real time, powered by Chat SDK and AI SDK.
- [Build a GitHub agent with Vercel Connect](/kb/guide/github-agent-vercel-connect): Build a GitHub agent that helps your team work through issues and PRs. Chat SDK handles the interactivity and AI SDK runs the tool-calling loop.
- [Draft documentation fixes from reader feedback with Sanity and eve](/kb/guide/sanity-eve-agent): Build an autonomous agent that drafts fixes in Sanity, stages them for human review, and calls the model through AI Gateway.
- [Investigate GitHub issues with \`HarnessAgent\` and Vercel Sandbox](/kb/guide/sandboxed-coding-agent-with-harnessagent): Use HarnessAgent to run coding agent harnesses like Claude Code or Codex against untrusted code inside Vercel Sandbox. Reproduce GitHub issues with the agent harness and generate a report for the maintainer.
- [Build your own Slackbot with Vercel Connect](/kb/guide/build-a-slack-bot-with-vercel-connect): Learn how to build your very own Slackbot with Chat SDK and AI SDK. Vercel Connect supplies runtime Slack tokens and forwards triggers, so you never store a long-lived bot token.
- [Build your first Slack agent with eve](/kb/guide/eve-slack-agent-starter): Deploy the eve Slack agent template: a starter Slack bot built on the eve framework with an example tool and skill.
- [Build a web research agent with Workflow SDK](/kb/guide/durable-web-research-agent-with-workflow-sdk): Build a web research agent that searches the web and returns a cited report. Powered by AI SDK and Workflow SDK, it journals every step so progress survives any crash or retries.
- [Cost-aware model routing through AI Gateway](/kb/guide/cost-aware-model-routing-with-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.
- [Build a daily digest bot with Chat SDK and Workflow SDK](/kb/guide/daily-digest-bot-with-chat-sdk-and-workflow-sdk): Build a daily digest bot that posts a daily digest of GitHub stats to Slack. Learn how to use Vercel Connect to set up Slack and GitHub app securely in your project.
- [Build AI agents with AI Gateway and AI SDK](/kb/guide/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 agent for Liveblocks with Chat SDK and AI SDK](/kb/guide/liveblocks-chat-sdk-ai-sdk): Build an AI agent that replies to @-mentions in Liveblocks comment threads with streamed responses and tool calling, using Chat SDK, AI SDK, and Redis.
- [How to build a durable AI code agent on Vercel](/kb/guide/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.

## Explore other topics in the Vercel Knowledge Base

- [Vercel Sandbox](/kb/vercel-sandbox): The compute primitive designed to safely run untrusted or user-generated code on Vercel.
- [Infrastructure and Compute](/kb/infrastructure-and-compute): Scale and deliver applications efficiently across regions using Vercel's Fluid Compute and CDN.
- [Migrations](/kb/migrations): Learn how to migrate your application or agent to Vercel's agentic infrastructure.
- [Backends](/kb/backends): Backends on Vercel run on Fluid compute with Active CPU pricing, plus Instant Rollback, the Vercel Firewall, protected previews, and rolling releases.
