HiveOps Logo
HiveOps
/Quickstart Guide

Quickstart Guide

Get started with HiveOps in 5 minutes

Quickstart Guide

Get started with HiveOps in under 5 minutes. Run your first AI inference request using affordable, open-source models.

What is HiveOps?

HiveOps is an affordable AI inference API that provides access to powerful open-source language models like Llama 3, Gemma 3, and Mistral. We're fully compatible with OpenAI's API, so you can switch seamlessly with minimal code changes.

Why Choose HiveOps?

  • šŸ’° Up to 90% cheaper than proprietary AI APIs
  • šŸ”“ Open-source models - no censorship, full transparency
  • šŸ”Œ Drop-in replacement for OpenAI - works with existing SDKs
  • ⚔ Fast inference with typical 1-3 second response times

Step 1: Create an Account

  1. Visit hiveops.io and click Sign Up
  2. Choose to sign up with:
    • Google account
    • GitHub account
  3. After signing up, you'll be taken to your HiveOps dashboard where you can manage API keys, view usage, and add funds.
  4. Bonus Credit: Receive 50% credit on your first deposit (up to $50) to get started!

Step 2: Generate an API Key

  1. Log in to your HiveOps dashboard
  2. Navigate to API Keys in the sidebar
  3. Click + New Key
  4. Give your key a descriptive name (e.g., "Development", "Production")
  5. Click Create
  6. āš ļø IMPORTANT: Copy your API key immediately - it will never be shown again!
# Your API key looks like this:
sk-...Etgg

Step 3: Make Your First Request

Python

Install the official OpenAI SDK (yes, it works with HiveOps!):

pip install openai
from openai import OpenAI

# Initialize the client with HiveOps endpoint
client = OpenAI(
    api_key="sk-YOUR-HIVEOPS-API-KEY",
    base_url="https://ai.hiveops.io"
)

# Make your first request
response = client.chat.completions.create(
    model="llama3:8b-instruct-q8_0",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "What is the capital of France?"}
    ]
)

print(response.choices[0].message.content)

Output:

The capital of France is Paris.

JavaScript/TypeScript

Install the official OpenAI SDK:

npm install openai
# or
yarn add openai
import OpenAI from "openai";

// Initialize the client with HiveOps endpoint
const client = new OpenAI({
  apiKey: "sk-YOUR-HIVEOPS-API-KEY",
  baseURL: "https://ai.hiveops.io",
});

async function main() {
  const response = await client.chat.completions.create({
    model: "llama3:8b-instruct-q8_0",
    messages: [
      { role: "system", content: "You are a helpful assistant." },
      { role: "user", content: "What is the capital of France?" },
    ],
  });

  console.log(response.choices[0].message.content);
}

main();

cURL

Test directly from your terminal:

curl https://ai.hiveops.io/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-YOUR-HIVEOPS-API-KEY" \
  -d '{
    "model": "gemma3:4b",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "What is the capital of France?"
      }
    ]
  }'

Step 4: Try Streaming

Streaming allows you to receive responses incrementally, perfect for chat interfaces:

Python

response = client.chat.completions.create(
    model="gpt-oss:120b",
    messages=[
        {"role": "user", "content": "Write a haiku about coding."}
    ],
    stream=True
)

for chunk in response:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

JavaScript

const stream = await client.chat.completions.create({
  model: "deepseek-r1:8b",
  messages: [{ role: "user", content: "Write a haiku about coding." }],
  stream: true,
});

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

Available Models

ModelContext WindowInput PriceOutput Price
llama3:8b-instruct-q8_08K tokens$0.010/1M$0.020/1M
llama-3-70b-instruct16K tokens$0.100/1M$0.200/1M
gemma-2-9b-it8K tokens$0.005/1M$0.010/1M
mistral-7b-instruct-v0.34K tokens$0.001/1M$0.002/1M

šŸ’” Tip: Start with llama3:8b-instruct-q8_0 for general tasks or mistral-7b-instruct-v0.3 for the lowest cost.


Managing Your Balance

Check Balance

View your current balance in the dashboard.

Add Funds

  1. Go to Billing in your dashboard
  2. Click Add Funds
  3. Enter amount (minimum $10)
  4. Complete payment via Stripe

Low Balance Alert

āš ļø When your balance reaches $0, API requests will be blocked. We recommend:

  • Setting up auto top-up (coming soon)
  • Monitoring your usage regularly
  • Setting up balance alerts

Next Steps

āœ… Quickstart Complete! Here's what to explore next:


Support

Need help? We're here for you:

Happy building! šŸš€