npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mantey/saia-ai-sdk

v0.1.0

Published

Vercel AI SDK provider for GWDG's SAIA (Scalable Artificial Intelligence Accelerator) API

Readme

@mantey/saia-ai-sdk

Vercel AI SDK provider for GWDG's SAIA (Scalable Artificial Intelligence Accelerator) API. This package provides an OpenAI-compatible interface for the SAIA API, allowing seamless integration with the Vercel AI SDK.

Installation

npm install @mantey/saia-ai-sdk
pnpm add @mantey/saia-ai-sdk
yarn add @mantey/saia-ai-sdk

Setup

1. Get your SAIA API Key

To use SAIA, you need access to the GWDG SAIA service:

  1. Visit the GWDG SAIA Documentation
  2. Request access to the SAIA service if you're affiliated with a GWDG member institution
  3. Obtain your API key

2. Install Dependencies

This package requires the Vercel AI SDK:

npm install ai @mantey/saia-ai-sdk

Note:

  • ai - The Vercel AI SDK (required for using any of vercel's core AI SDK)
  • @ai-sdk/openai-compatible, @ai-sdk/provider, and @ai-sdk/provider-utils are regular dependencies and will be installed automatically

Usage

Basic Setup

import { createSaia } from '@mantey/saia-ai-sdk';
import { generateText } from 'ai';

const saia = createSaia({
  apiKey: process.env.SAIA_API_KEY,
});

const { text } = await generateText({
  model: saia('meta-llama-3.1-8b-instruct'),
  prompt: 'Explain quantum computing in simple terms',
});

console.log(text);

Using the Default Instance

import { saia } from '@mantey/saia-ai-sdk';
import { generateText } from 'ai';

// Uses SAIA_API_KEY environment variable
const { text } = await generateText({
  model: saia('meta-llama-3.1-8b-instruct'),
  prompt: 'Write a haiku about TypeScript',
});

Streaming Responses

import { createSaia } from '@mantey/saia-ai-sdk';
import { streamText } from 'ai';

const saia = createSaia({
  apiKey: process.env.SAIA_API_KEY,
});

const { textStream } = await streamText({
  model: saia('meta-llama-3.1-8b-instruct'),
  prompt: 'Count from 1 to 10',
});

for await (const chunk of textStream) {
  process.stdout.write(chunk);
}

Chat Completions

import { createSaia } from '@mantey/saia-ai-sdk';
import { generateText } from 'ai';

const saia = createSaia({
  apiKey: process.env.SAIA_API_KEY,
});

const { text } = await generateText({
  model: saia('meta-llama-3.1-8b-instruct'),
  messages: [
    { role: 'system', content: 'You are a helpful assistant.' },
    { role: 'user', content: 'What is the capital of France?' },
  ],
});

Vision Models (Image Understanding)

import { createSaia } from '@mantey/saia-ai-sdk';
import { generateText } from 'ai';
import fs from 'fs';

const saia = createSaia({
  apiKey: process.env.SAIA_API_KEY,
});

// Read image and convert to base64
const imageBuffer = fs.readFileSync('./path/to/image.jpg');
const base64Image = imageBuffer.toString('base64');

const { text } = await generateText({
  model: saia('gemma-3-27b-it'),
  messages: [
    {
      role: 'user',
      content: [
        { type: 'text', text: 'What is in this image?' },
        {
          type: 'image',
          image: `data:image/jpeg;base64,${base64Image}`
        },
      ],
    },
  ],
});

console.log(text);

Note: SAIA requires images to be uploaded as base64-encoded data or file uploads. Fetching images from URLs is not supported.

Embeddings

import { createSaia } from '@mantey/saia-ai-sdk';
import { embed } from 'ai';

const saia = createSaia({
  apiKey: process.env.SAIA_API_KEY,
});

const { embedding } = await embed({
  model: saia.textEmbeddingModel('multilingual-e5-large-instruct'),
  value: 'Hello, world!',
});

console.log(embedding);

Configuration

Provider Options

import { createSaia } from '@mantey/saia-ai-sdk';

const saia = createSaia({
  // Your SAIA API key (can also use SAIA_API_KEY environment variable)
  apiKey: 'your-api-key',

  // Custom base URL (optional)
  baseURL: 'https://chat-ai.academiccloud.de/v1',

  // Custom headers (optional)
  headers: {
    'X-Custom-Header': 'value',
  },

  // Custom fetch implementation (optional)
  fetch: customFetch,
});

Available Models (From SAIA Documentation)

Chat Models

General purpose text generation models:

  • meta-llama-3.1-8b-instruct
  • llama-3.3-70b-instruct
  • openai-gpt-oss-120b
  • mistral-large-instruct
  • teuken-7b-instruct-research

Code Generation:

  • qwen2.5-coder-32b-instruct
  • codestral-22b

Reasoning Models:

  • deepseek-r1
  • qwen3-235b-a22b
  • qwq-32b
  • qwen3-32b

RAG-Enabled Models:

  • meta-llama-3.1-8b-rag
  • llama-3.1-sauerkrautlm-70b-instruct

Vision Models (Multimodal)

Models that can analyze images and videos:

  • gemma-3-27b-it
  • qwen2.5-vl-72b-instruct
  • medgemma-27b-it - Medical image analysis (Text + Image)
  • internvl2.5-8b
  • qwen2.5-omni-7b

Note: Images must be uploaded as part of requests (base64 or file upload). Fetching images from URLs is not supported.

Embedding Models

Text embedding models for semantic search and similarity:

  • e5-mistral-7b-instruct
  • multilingual-e5-large-instruct - Multilingual support
  • qwen3-embedding-4b

Environment Variables

You can set your SAIA API key via environment variable:

export SAIA_API_KEY=your-api-key

Or use a .env file:

SAIA_API_KEY=your-api-key

TypeScript Support

This package is written in TypeScript and provides full type definitions. All model IDs, settings, and options are properly typed.

import type {
  SAIAChatModelId,
  SAIAEmbeddingModelId,
  SAIAProviderOptions
} from '@mantey/saia-ai-sdk';

const modelId: SAIAChatModelId = 'meta-llama-3.1-8b-instruct';

API Reference

createSaia(options?)

Creates a new SAIA provider instance.

Parameters:

  • options (optional): Provider configuration options
    • apiKey: Your SAIA API key
    • baseURL: Custom base URL (default: https://chat-ai.academiccloud.de/v1)
    • headers: Custom headers to include in requests
    • fetch: Custom fetch implementation

Returns: SAIA provider instance compatible with Vercel AI SDK

saia

Default SAIA provider instance that uses the SAIA_API_KEY environment variable.

Examples

Check out the examples directory for more usage examples.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Links

Support

For issues and questions: