Skip to main content

Morph + Vercel AI SDK

Stream code edits at 10,500+ tokens/second using the Vercel AI SDK with Morph’s fast apply model. Use Vercel’s AI Gateway for unified billing, rate limits, and failover across 100+ AI models.

Setup

  1. Get an AI Gateway API key from Vercel
  2. Add it to your environment variables as OPENAI_API_KEY
  3. Install the AI SDK:

Option 2: Direct API

  1. Get a Morph API key from the Morph dashboard
  2. Add it to your environment variables as MORPH_API_KEY
  3. Install the AI SDK:

Implementation

That’s it! Stream fast code edits with Morph using the Vercel AI SDK.