Documentation Index
Fetch the complete documentation index at: https://docs.tensormesh.ai/llms.txt
Use this file to discover all available pages before exploring further.
Install
npm install ai @tensormesh/ai-sdk-provider
Set your inference API key:
export TENSORMESH_INFERENCE_API_KEY="YOUR_INFERENCE_API_KEY"
Generate Text
import { generateText } from "ai";
import { tensormesh } from "@tensormesh/ai-sdk-provider";
const { text } = await generateText({
model: tensormesh("mistralai/Devstral-2-123B-Instruct-2512"),
prompt: "Explain Tensormesh in one sentence.",
});
console.log(text);
Stream Text
import { streamText } from "ai";
import { tensormesh } from "@tensormesh/ai-sdk-provider";
const result = streamText({
model: tensormesh("mistralai/Devstral-2-123B-Instruct-2512"),
prompt: "Count from 1 to 5 as a short comma-separated list.",
});
for await (const chunk of result.textStream) {
process.stdout.write(chunk);
}
process.stdout.write("\n");
List Model IDs
Use the exact model IDs returned by the models endpoint.
import { tensormesh } from "@tensormesh/ai-sdk-provider";
const models = await tensormesh.models.list();
for (const model of models.data) {
console.log(model.id);
}