AI models and providers
The one AI call LinkNest makes - which provider and model, what is sent, what it costs you, how to change it, and what runs without AI.
2 min readUpdated Oct 17, 2026Applies to LinkNest 1.0.0
LinkNest uses AI in exactly one place: the AI page co-pilot. Everything else that might sound like AI (the Insights tips, post ideas, keyword replies, the weekly letter) is rule-based or template text and runs without any provider.
Provider and model
| Setting | Value |
|---|---|
| Provider | xAI, through its chat completions API at https://api.x.ai/v1/chat/completions |
| Model | grok-4-1-fast-non-reasoning |
| Temperature | 0.4 |
| Key | XAI_API_KEY in the server environment. There is no admin setting for it. |
| Without a key | The built-in rule-based planner. The co-pilot still works. |
There are no other AI providers to connect in 1.0.0, and no per-plan choice of model.
What is sent to xAI
Each Generate plan sends one request containing:
- the creator's display name and username;
- their current bio, or the text they pasted (up to 4,000 characters);
- the product list they typed (up to 1,000 characters);
- the Instagram URL they typed, as text (it is not fetched);
- fixed instructions asking for a JSON plan with a headline, bio, link order, links, a four-step week and notes.
Nothing about visitors, analytics, earnings or other creators is sent. The reply is checked for the expected shape; anything that does not parse falls back to the built-in planner.
The input and the plan are also stored in your database, in copilot_plans.
What it costs
xAI bills you per token on your own account. One run is a single short request and reply, and each page can run the co-pilot at most 40 times in total (see Usage cap), so the cost per creator is bounded. Check xAI's current price for the model and set a spending limit in the xAI console before you open sign-ups.
Changing the model or provider
The whole call is one short function, xaiCopilot() in src/lib/grove/copilot.ts:
- Another xAI model: change the
modelstring. - An OpenAI-compatible provider: change the URL, the key variable and the model. The request is a standard chat completions call with a system and a user message, and the code reads
choices[0].message.content. - Any other provider: replace the function body; it must return a
CopilotPlan(seesrc/lib/grove/copilot-plan.ts) ornullto fall back.
Keep the key server-side. A variable whose name starts with VITE_ is compiled into the browser bundle and would publish the key.