Google: Gemma 2 9B (free)

google/gemma-2-9b-it:free

Gemma 2 9B by Google is an advanced, open-source language model that sets a new standard for efficiency and performance in its size class. Designed for a wide variety of tasks, it empowers developers and researchers to build innovative applications, while maintaining accessibility, safety, and cost-effectiveness. See the [launch announcement](https://blog.google/technology/developers/google-gemma-2/) for more details. Usage of Gemma is subject to Google's [Gemma Terms of Use](https://ai.google.dev/gemma/terms).

Pricing

Price per input token: $0

Price per output token: $0

Usage Example

NOTE: BrainLink is compatible with the OpenAI API, which allows you to use the OpenAI SDK even with non-OpenAI models

import OpenAI from "openai";
const userAccessToken = await BrainLink.getUserToken();
const openai = new OpenAI({
    baseURL: "https://www.brainlink.dev/api/v1",
    apiKey: userAccessToken,
});
const completion = await openai.chat.completions.create({
    model: "google/gemma-2-9b-it:free",
    messages: [
      { role: "user", content: "Hi! How are you today?" }
    ],
});