Heurist LLM Gateway

Transform your AI capabilities with Heurist Gateway, an OpenAI-compatible LLM API endpoint. Seamlessly integrate with open source LLMs using the familiar OpenAI SDK and unlock the power of decentralized AI at a low cost. Make changes with just 3 lines of code and start integrating right away. Check out the example below to see how easy it is!

import OpenAI from "openai";

const openai = new OpenAI({
  apiKey: process.env["HEURIST_API_TOKEN"],
  baseURL: "https://llm-gateway.heurist.xyz",
});

const completions = await openai.chat.completions.create({
  model: "mistralai/mixtral-8x7b-instruct",
  messages: [
    {
      role: "user",
      content: "Write rap lyrics about Ethereum",
    },
  ],
  maxTokens: 64,
  stream: true,
});

for await (const part of completions) {
  process.stdout.write(part.choices[0]?.delta?.content || "");
}

For more examples, check https://github.com/heurist-network/dev-examples

Last updated