Skip to main content
Use the Vercel AI SDK against the Modellix LLM gateway. Create an OpenAI Compatible provider with baseURL set to https://llm.modellix.ai/v1, then call generateText / streamText with Modellix provider/name model IDs.
This page covers LLM text only (https://llm.modellix.ai).Modellix model IDs are provider/name (for example openai/gpt-5.5). Pass that full string to the provider model factory. See Models & Pricing.

Set Up the AI SDK

1

Install Packages

For the alternate @ai-sdk/openai path below, also install @ai-sdk/openai. For Anthropic Messages, install @ai-sdk/anthropic.
2

Set Credentials

Create a Modellix API key in the console:
Use a Modellix key, not an OpenAI platform key. Do not point the AI SDK at the media host (https://api.modellix.ai).
3

Create an OpenAI Compatible Provider (Recommended)

Prefer @ai-sdk/openai-compatible for third-party gateways:
Swap the model string for any catalog ID (anthropic/claude-sonnet-5, google/gemini-3.6-flash, and so on). Traffic still uses Chat Completions on https://llm.modellix.ai/v1.
4

Optional: Streaming

5

Optional: createOpenAI + Chat Completions

You can also customize @ai-sdk/openai. The default modellix("...") factory targets the Responses API. Modellix supports Responses, but for Chat Completions–only client code paths use .chat():
See AI SDK OpenAI provider for baseURL and .chat() details.
6

Optional: Anthropic Provider (Messages)

For native Anthropic Messages instead of OpenAI-compatible Chat Completions:
Same host shape as the Anthropic SDK: no /v1 on baseURL. Most AI SDK apps should stay on createOpenAICompatible + /v1 unless you specifically need Messages.

Troubleshooting