Skip to content
'; user_status_content.firstChild.appendChild(avatarContainer); } else { // Placeholder for LoggedOutUserMenu let loggedOutContainer = document.createElement('div'); // if LoggedOutUserMenu fallback let userBtn = document.createElement('button'); userBtn.style.width = "33px"; userBtn.style.height = "33px"; userBtn.style.display = "flex"; userBtn.style.alignItems = "center"; userBtn.style.justifyContent = "center"; userBtn.style.color = "var(--ds-gray-900)"; userBtn.style.border = "1px solid var(--ds-gray-300)"; userBtn.style.borderRadius = "100%"; userBtn.style.cursor = "pointer"; userBtn.style.background = "transparent"; userBtn.style.padding = "0"; // user icon ( from geist) let svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute('data-testid', 'geist-icon'); svg.setAttribute('height', '16'); svg.setAttribute('stroke-linejoin', 'round'); svg.setAttribute('style', 'color:currentColor'); svg.setAttribute('viewBox', '0 0 16 16'); svg.setAttribute('width', '16'); let path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); path.setAttribute('fill-rule', 'evenodd'); path.setAttribute('clip-rule', 'evenodd'); path.setAttribute('d', 'M7.75 0C5.95507 0 4.5 1.45507 4.5 3.25V3.75C4.5 5.54493 5.95507 7 7.75 7H8.25C10.0449 7 11.5 5.54493 11.5 3.75V3.25C11.5 1.45507 10.0449 0 8.25 0H7.75ZM6 3.25C6 2.2835 6.7835 1.5 7.75 1.5H8.25C9.2165 1.5 10 2.2835 10 3.25V3.75C10 4.7165 9.2165 5.5 8.25 5.5H7.75C6.7835 5.5 6 4.7165 6 3.75V3.25ZM2.5 14.5V13.1709C3.31958 11.5377 4.99308 10.5 6.82945 10.5H9.17055C11.0069 10.5 12.6804 11.5377 13.5 13.1709V14.5H2.5ZM6.82945 9C4.35483 9 2.10604 10.4388 1.06903 12.6857L1 12.8353V13V15.25V16H1.75H14.25H15V15.25V13V12.8353L14.931 12.6857C13.894 10.4388 11.6452 9 9.17055 9H6.82945Z'); path.setAttribute('fill', 'currentColor'); svg.appendChild(path); userBtn.appendChild(svg); loggedOutContainer.appendChild(userBtn); loggedOutContainer.style.display = 'flex'; loggedOutContainer.style.gap = '8px'; loggedOutContainer.style.alignItems = 'center'; user_status_content.firstChild.appendChild(loggedOutContainer); } })();
Menu

Capabilities

Last updated March 18, 2026

In addition to text generation, you can use AI Gateway to enable reasoning, generate images, generate videos, search the web, track requests with observability, monitor usage, and enforce data retention policies. These features work across providers through a unified API, so you don't need separate integrations for each provider.

  • Custom reporting: Query usage data by model, user, tag, provider, or credential type with the Custom Reporting API
  • Complex problem solving: Enable models to think step-by-step for coding, math, and analysis with Reasoning
  • Visual content apps: Generate product images, marketing assets, or UI mockups with Image Generation
  • Video content: Create videos from text prompts, images, or video input with Video Generation
  • Research assistants: Give models access to current information with Web Search
  • Production dashboards: Monitor costs, latency, and usage across all your AI requests with Observability
  • Compliant applications: Meet data privacy requirements with Zero Data Retention
  • Usage tracking: Check credit balances and look up generation details with the Usage API
  • Flexible processing: Get faster processing or optimize costs for OpenAI models with Service Tiers
CapabilityWhat it doesKey features
Custom ReportingQuery usage data with flexible groupingGroup by model, user, tag, provider; filter by date, user, tags
ReasoningEnable step-by-step thinkingOpenAI, Anthropic, Google, Vertex, Bedrock; normalized across providers
Image GenerationCreate images from text promptsMulti-provider support, edit existing images, multiple output formats
Video GenerationCreate videos from text, images, or videoText-to-video, image-to-video, video-to-video, resolution and duration control
Web SearchAccess real-time web informationPerplexity search for any model, native provider search tools
ObservabilityMonitor and debug AI requestsRequest traces, token counts, latency metrics, spend tracking
Zero Data RetentionEnsure data privacy complianceDefault ZDR policy, per-request enforcement, provider agreements
Usage & BillingTrack credits and generationsCredit balance API, generation lookup, cost tracking
Service TiersControl processing priority and costProcessing tiers for OpenAI models

The Custom Reporting API lets you break down costs and token consumption by model, user, tag, provider, or credential type. Filter by date range, specific users, models, and tags to understand exactly where your AI spend is going.

curl "https://ai-gateway.vercel.sh/v1/report?start_date=2026-01-01&end_date=2026-01-31&group_by=model" \
  -H "Authorization: Bearer YOUR_API_KEY"

Attach user and tags to your requests to enable per-user and per-tag reporting. See the Custom Reporting docs for the full API reference.

Reasoning models can think through problems before responding, producing higher-quality answers for complex tasks. AI Gateway supports reasoning across OpenAI, Anthropic, Google, Vertex AI, and Amazon Bedrock, normalizing the different formats so you can switch providers without rewriting your code.

import { generateText } from 'ai';
 
const { text, reasoning } = await generateText({
  model: 'openai/gpt-5.4',
  prompt: 'Explain the Monty Hall problem step by step.',
  providerOptions: {
    openai: { reasoningSummary: 'detailed' },
  },
});

Each provider has its own configuration. See the Reasoning docs for provider-specific setup and examples.

Generate images using AI models through a single API. Requests route to the best available provider, with authentication and response formatting handled automatically.

import { gateway } from '@ai-sdk/gateway';
import { experimental_generateImage as generateImage } from 'ai';
 
const { image } = await generateImage({
  model: gateway.imageModel('openai/dall-e-3'),
  prompt: 'A serene mountain landscape at sunset',
});

Supported providers include OpenAI (DALL-E), Google (Imagen), and multimodal LLMs with image capabilities. See the Image Generation docs for implementation details.

Generate videos from text prompts, images, or video input using AI models through a single API. Control resolution, duration, aspect ratio, and audio generation across providers.

import { experimental_generateVideo as generateVideo } from 'ai';
 
const { videos } = await generateVideo({
  model: 'google/veo-3.1-generate-001',
  prompt: 'A serene mountain landscape at sunset with clouds drifting by',
  aspectRatio: '16:9',
  resolution: '1920x1080',
  duration: 8,
});

Supported providers include Google (Veo 3.1), KlingAI (motion control), and Wan. See the Video Generation docs for implementation details.

Enable AI models to search the web during conversations. This capability helps answer questions about current events, recent developments, or any topic requiring up-to-date information.

Two approaches are supported:

AI Gateway automatically logs every request with metrics you can view in the Vercel dashboard:

  • Requests by model: See which models your application uses most
  • Time to first token (TTFT): Monitor response latency
  • Token counts: Track input and output token usage
  • Spend: View costs broken down by model and time period

Access these metrics from the Observability tab at both team and project levels.

AI Gateway uses zero data retention by default—it permanently deletes your prompts and responses after requests complete. For applications with strict compliance requirements, you can also enforce ZDR at the provider level:

const result = await streamText({
  model: 'anthropic/claude-opus-4.6',
  prompt: 'Analyze this sensitive data...',
  providerOptions: {
    gateway: { zeroDataRetention: true },
  },
});

When zeroDataRetention is enabled, requests only route to providers with verified ZDR agreements. See the ZDR documentation for the list of compliant providers.


Was this helpful?

supported.