Vercel AI SDK logo

Integration guide · Agent framework (TypeScript)

Vercel AI SDK on EU-hosted open models

Create an OpenAI-compatible provider for Frontière AI in the Vercel AI SDK and stream text, tools and embeddings from EU-hosted open models. createOpenAICompatible({ name, baseURL, apiKey }) from @ai-sdk/openai-compatible.

Tested on 13 October 2026. streamText with usage (includeUsage), generateText with a tool and bge-m3 embeddings against the gateway, with ai 7.0.138, @ai-sdk/openai-compatible 3.0.68 and gpt-oss-120b on OVHcloud (bge-m3 has been paused since 20 October 2026; the example now uses qwen3-embedding-8b).

API format
OpenAI-compatible
Base URL
https://getfrontiereai.eu/api/v1
Where it goes
createOpenAICompatible({ name, baseURL, apiKey }) from @ai-sdk/openai-compatible.
Your prompts
Straight from your machine to us

Setup

1.Create the provider

includeUsage is off by default: turn it on to get token counts on streamed responses. Always pass the provider's model object: a bare string model id goes to the global provider, which defaults to the Vercel AI Gateway.

typescript
// npm i ai @ai-sdk/openai-compatible
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { embed, streamText } from "ai";

const frontiere = createOpenAICompatible({
  name: "frontiere",
  baseURL: "https://getfrontiereai.eu/api/v1",
  apiKey: process.env.FRONTIERE_API_KEY, // sk-front-...
  includeUsage: true,
});

const result = streamText({
  model: frontiere("glm-5.2"), // not the bare string "glm-5.2"
  prompt: "Hello from Europe",
});

const { embedding } = await embed({
  model: frontiere.embeddingModel("qwen3-embedding-8b"),
  value: "sunny day at the beach",
});

Which model to pick

24 live models have tool calling measured by a real call through the gateway. Models labeled EU sovereign run at European providers; fast-access models are served through US-controlled infrastructure. Prices are per 100,000 tokens, margin and VAT included.

Model idProviderLabelContextInputOutput
pixtral-12bScalewayEU sovereign131k€0.0336€0.0336
mistral-small-3.2-24bScalewayEU sovereign—€0.0252€0.0588
gemma-4-26bAKI.IOEU sovereign256k€0.0168€0.084
gpt-oss-120bScalewayEU sovereign—€0.0252€0.1008
mistral-small-4-119bMistral AIEU sovereign262k€0.0278€0.1109
deepseek-v4-flash-0731ScalewayEU sovereign256k€0.0672€0.1344
qwen3-coder-30bScalewayEU sovereign262k€0.0336€0.1344
llama-3.3-70bScalewayEU sovereign—€0.1512€0.1512
qwen3.6-35bScalewayEU sovereign262k€0.042€0.252
deepseek-v4.1-flashAKI.IOEU sovereign1M€0.1008€0.3024
qwen3-235bScalewayEU sovereign—€0.126€0.378
apertus-v1.5-70bInfomaniakEU sovereign100k€0.1294€0.462
qwen3.8-27bScalewayEU sovereign262k€0.1008€0.5544
qwen3.5-397bScalewayEU sovereign—€0.1008€0.6048
mistral-large-4Mistral AIEU sovereign524k€0.2514€0.7725
glm-5.2ScalewayEU sovereign256k€0.3024€0.924
glm-5.3AKI.IOEU sovereign524k€0.3024€0.924
gemma-3-27bOpenRouterFast access (US)131k€0.0135€0.074
qwen3.8-flashOpenRouterFast access (US)—€0.0252€0.0773
glm-5.3-flashModalFast access (US)1M€0.0689€0.2268
deepseek-v4-proOpenRouterFast access (US)—€0.2453€0.5124
muse-spark-1.1OpenRouterFast access (US)—€0.205€0.6956
muse-spark-1.2OpenRouterFast access (US)—€0.205€0.6956
kimi-k3ModalFast access (US)1M€0.4536€2.268

Good to know

  • Tool calling, streamed or not, works with the openai-compatible chat models and depends on the Frontière AI model you pick.
  • Set supportsStructuredOutputs: true only for models that accept a json_schema response format.

Where your prompts go

The SDK calls baseURL directly from your server. Only the bare-string shortcut goes to the Vercel AI Gateway, a US service.

On our side, a model labeled EU sovereign runs at a European provider, and the gateway itself runs in Paris on Vercel, a US company — our privacy page says so. Billing keeps the model, the token counts and the amount, never the prompt or the reply.

Sovereignty →Privacy →

Sources

Official documentation, checked on 12 October 2026:

FAQ

Does Vercel AI SDK work with Frontière AI?

Yes. createOpenAICompatible({ name, baseURL, apiKey }) from @ai-sdk/openai-compatible. We ran it ourselves: streamText with usage (includeUsage), generateText with a tool and bge-m3 embeddings against the gateway, with ai 7.0.138, @ai-sdk/openai-compatible 3.0.68 and gpt-oss-120b on OVHcloud (bge-m3 has been paused since 20 October 2026; the example now uses qwen3-embedding-8b).

Which Frontière AI model should I use with Vercel AI SDK?

One with measured tool calling, preferably labeled EU sovereign: pixtral-12b, mistral-small-3.2-24b, gemma-4-26b and gpt-oss-120b. The 24 candidates are listed on this page with their context window and price.

Do my prompts stay in Europe with Vercel AI SDK?

The SDK calls baseURL directly from your server. Only the bare-string shortcut goes to the Vercel AI Gateway, a US service. On our side, a model labeled EU sovereign runs at a European provider, and the gateway itself runs in Paris on Vercel, a US company — our privacy page says so. Billing keeps the model, the token counts and the amount, never the prompt or the reply.

Other guides

Get a key and try it

Prepaid credit from €10, no subscription. The key works with every guide on this site.

Create an API key

All integrations →

Create an account