Skip to content

Free AI for testing

View as Markdown

You do not need a paid plan to try AI insights. Pick one of the routes below, wire the model into your server assembly, then enable a profile for a test project.

Run a local server such as Ollama, which exposes an OpenAI-compatible API, and connect through the OpenAI-compatible provider:

import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { createAi } from "@storyshelf/ai";
const local = createOpenAICompatible({ name: "ollama", baseURL: "http://localhost:11434/v1" });
const ai = createAi({
profiles: { default: { defaultModel: local("<model-id you pulled>") } },
budget: { perProjectCallsPerHour: 20 },
});

Small local models are slow and may need a longer timeoutMs ({ model, timeoutMs: 180_000 }). Skip screenshots by leaving the model text-only (the default).

Create an API key in AI Studio, then use the Google provider with a model that is available on your key’s free tier:

import { createGoogleGenerativeAI } from "@ai-sdk/google";
const google = createGoogleGenerativeAI({ apiKey: process.env.GOOGLE_API_KEY });
const ai = createAi({
profiles: { default: { defaultModel: google("<free-tier model id>") } },
budget: { dailyTokens: 200_000, perProjectCallsPerHour: 10 },
});

OpenRouter offers some models at no cost and many at low cost behind one API key:

import { createOpenRouter } from "@openrouter/ai-sdk-provider";
const openrouter = createOpenRouter({ apiKey: process.env.OPENROUTER_API_KEY });
const ai = createAi({
profiles: { default: { defaultModel: openrouter("<model id>") } },
budget: { dailyTokens: 200_000, perProjectCallsPerHour: 10 },
});

Free-tier and small reasoning models can spend the whole output cap thinking. Lower the effort for the slot with providerOptions (see Setup), for example { model, providerOptions: { google: { thinkingConfig: { thinkingBudget: 0 } } } }; check your provider’s current option names.

  • Keep the budget small so a test run cannot burn through a free quota.
  • Start text-only; add a vision model only when you want screenshots analyzed.
  • Quality varies a lot between models. If answers are rejected as invalid, try a model with reliable JSON output.
  • Remove the profile (Project settings → AI → Off) when you finish testing.