I have a very low tolerance for pain. Engineering pain, that is.
When I encounter friction in a process, there’s a tell. My eye twitches, just a little bit. It’s like a little friend, tapping me on the shoulder, saying, “Hm, that wasn’t great. You should probably fix it. Smooth it out. Get out the ol’ digital sandpaper.”
Take Laravel’s AI SDK for example. It’s a dream to work with, it abstracts away a lot of complicated logic when integrating models into your application, and agents love to build with it. The issue arrives when it’s time to actually set up your provider config. You know what that means: time to forage for keys!
Let’s see… I’m using an Anthropic model, so I have to go to claude.ai and… oh, wait, not .ai, claude.com… oh wait no it’s platform.claude.com, I always forget that (twitch). Ok, now sign in there because I rarely go to this site (twitch, twitch)… now to the keys screen, hit the Create Key button, copy it (twitch, twitch, twitch)… put it in my .env … what was the correct var name again? Oh right ANTHROPIC_API_KEY (twitch, twitch, twitch, twitch). And now let’s do the same for OpenAI because one part of my app needs a different model (twitch, twitch, twitch, twitch, twi-).
So, we got out the sandpaper.
Today, we’re announcing early access for the Laravel Cloud Model Gateway. One key. All the models you know and love. Seamless integration with Laravel Cloud.
Instead of foraging for keys with each provider, you can now just run this:
This command mints a new Model Gateway key in Cloud and sets the correct variable in your local app. That’s it. That’s the whole thing. Use whichever model you’d like.
Laravel’s AI SDK 1.5 and later supports the Model Gateway as a provider out of the box:
Even better, the gateway isn’t restricted to our SDK: any library with gateway support will work with a simple config change. For example, to use the gateway with Vercel’s AI SDK:
You’re in control
When you’re integrating AI into an application, budget is top of mind. It’s scary to think about an agent getting stuck in a loop, generating a runaway bill. Laravel Cloud gives you granular controls to ensure that this doesn’t happen.
Model Gateway is billed via a dedicated wallet with optional automatic top-up at a threshold. In addition, you can set a budget per gateway key that resets on every billing cycle. When the budget runs out, the key simply rejects additional requests until the next cycle starts, unless you decide to increase the budget.
You can even specify that the key is only allowed to be used on Cloud, so it can’t be used locally or on another host, locking the key down further.
Additionally, you have full insight into each request’s timestamp, cost, and duration in real time:

Attach it from anywhere
Using the Cloud MCP?
Cloud CLI?
Dashboard? Simply add the Model Gateway as an environment resource just like you would cache, database, or bucket and Cloud will inject the correct env variables for you.

Get early access today
Great news, gang: My eye hasn’t twitched in weeks. The Model Gateway is the easiest way to integrate AI into your application.
Sign up for early access today.