Open Source LLMs

Use our OpenAI compatible API endpoints with any application supporting a custom base URL

Set base_url to https://api.repocloud.io/openai/v1 and specify one of the models below to use your API key in an application that supports OpenAI compatible endpoints. Try in Google Sheets.

Available Models

Llama 3 70B

Model Code: llama3-70b-8192

$0.59/million tokens input

$0.79/million tokens output

Mixtral 8x7B

Model Code: mixtral-8x7b-32768

$0.24/million tokens input

$0.24/million tokens output

Llama 3 8B

Model Code: llama3-8b-8192

$0.05/million tokens input

$0.10/million tokens output

CURL Request Example

curl -X POST https://api.repocloud.io/openai/v1/chat/completions \
                -H 'Content-Type: application/json' \
                -H 'Authorization: Bearer YOUR_API_KEY' \
                -d '{
                    "model": "llama3-70b-8192",
                    "messages": [
                        {
                        "role": "user",
                        "content": "Hello, world!"
                        }
                    ]
                }'
Python Example

import openai

openai.api_key = 'YOUR_API_KEY'
openai.base_url = "https://api.repocloud.io/openai/v1/"

completion = openai.chat.completions.create(
model="llama3-70b-8192",
messages=[
    {"role": "user", "content": "Hello world"},
    ],
)

print(completion.choices[0].message.content)
Python Requests Example

import requests
import json

url = "https://api.repocloud.io/openai/v1/chat/completions"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY"
    }
data = {
    "model": "llama3-70b-8192",
    "messages": [
        {"role": "user", "content": "Hello world"}
    ]
}

response = requests.post(url, headers=headers, data=json.dumps(data))
completion = response.json()

print(completion['choices'][0]['message']['content'])
Node.js Example

import OpenAI from 'openai';

const openai = new OpenAI({
    apiKey: "YOUR_API_KEY",
    baseURL: "https://api.repocloud.io/openai/v1",
});

const chatCompletion = await openai.chat.completions.create({
  messages: [{ role: 'user', content: 'Hello world' }],
  model: 'llama3-70b-8192',
});

console.log(chatCompletion.choices[0].message.content);
                    
Node.js Requests Example

import axios from 'axios';

const url = "https://api.repocloud.io/openai/v1/chat/completions";
const headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY"
};
const data = {
    model: "llama3-70b-8192",
    messages: [
        { role: "user", content: "Hello world" }
    ]
};

axios.post(url, data, { headers })
    .then(response => {
        const completion = response.data;
        console.log(completion.choices[0].message.content);
    })
    .catch(error => {
        console.error(error);
    });