neon-ai-gateway

Route LLM requests through Neon's branch-scoped gateway using one credential across providers.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/akira777777/vladfsBET --skill neon-ai-gateway-akira777777
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neon-ai-gateway
Source: https://github.com/akira777777/vladfsBET/tree/main/.grok/skills/neon-ai-gateway
Command: npx skills add https://github.com/akira777777/vladfsBET --skill neon-ai-gateway-akira777777

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @neon/ai-sdk-provider, @neon/env, @neon/config, ai, @mastra/core, openai.

What problem does it solve? Managing separate API keys, accounts, and billing for OpenAI, Anthropic, Google, and other LLM providers adds friction to building AI features. This Skill provides one Neon credential and one endpoint to reach the entire model catalog, with AI requests scoped to your Neon branch. ## Core Features & Use Cases - Unified Model Access: Call Claude, GPT, Gemini, and open-source models through a single OpenAI-compatible endpoint by changing only the model field. - SDK Compatibility: Works with the OpenAI SDK, Anthropic SDK, google-genai, Vercel AI SDK, and Mastra by changing only the base URL. - Branch-Scoped AI: Each Neon branch gets its own gateway host, so preview and CI environments have isolated AI inference. - Use Case: You are building a chat agent on a Neon preview branch. Enable aiGateway in neon.ts, run neon deploy, and use @neon/ai-sdk-provider to stream responses from any catalog model with zero extra configuration. ## Quick Start Enable the AI Gateway by adding aiGateway: true to neon.ts, run neon deploy, and ask the AI to write a streaming chat completion using the @neon/ai-sdk-provider with a catalog model like claude-sonnet-4-6.

Frequently Asked Questions about neon-ai-gateway

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call an LLM through the Neon AI Gateway?▼

Enable aiGateway in your neon.ts config and run neon deploy to provision the gateway and pull credentials into .env.local. Then use @neon/ai-sdk-provider or point any standard SDK's baseURL at the gateway host with NEON_AI_GATEWAY_TOKEN as the API key.

What models are available on the Neon AI Gateway?▼

The gateway serves frontier and open-source models from Anthropic, OpenAI, Google, Meta, and others hosted by Databricks. Query GET /v1/models on your branch endpoint or check models.dev/providers/neon for the current catalog, since the list changes over time.

Does the Neon AI Gateway work with the OpenAI SDK?▼

Yes, the OpenAI SDK works by setting apiKey to NEON_AI_GATEWAY_TOKEN and baseURL to the gateway host plus /v1 for chat completions or /openai/v1 for the Responses API. The Anthropic SDK and google-genai work similarly with /anthropic and /gemini paths.

Why is the Neon AI Gateway not provisioning on my project?▼

Provisioning fails on Free plans because the gateway requires a paid Neon plan, and neon config apply will refuse with an upgrade error. It is also only available in aws-us-east-2, aws-us-east-1, aws-eu-central-1, and aws-ap-southeast-1 regions.

Why is a model missing from the Neon AI Gateway catalog?▼

Paid-plan accounts can start with a reduced catalog where flagship models like Anthropic Opus or OpenAI Codex variants are absent. Verify availability with GET /v1/models and request access to more models from your branch's AI Gateway page in the Neon Console.

Can I use Mastra agents with the Neon AI Gateway?▼

Yes, with @mastra/core 1.47 or later, set the agent's model to a neon/<model> string such as neon/claude-haiku-4-5. Mastra reads NEON_AI_GATEWAY_BASE_URL and NEON_AI_GATEWAY_TOKEN from the environment automatically.