HacxGPT API

(Under Devlopment)

HacxGPT exposes an OpenAI-compatible API. Use your favorite OpenAI clients by pointing to our base URL and passing your HacxGPT API key. Keys and endpoint URL are provided on request via our Telegram community.

Base URL

Base: https://api.hacxgpt.example/v1 request access

Auth: Authorization: Bearer YOUR_API_KEY

Chat Completions

Compatible with /v1/chat/completions (OpenAI style). Models: hacxgpt-lightning, hacxgpt-vision, hacxgpt-code.

curl
curl https://api.hacxgpt.example/v1/chat/completions \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hacxgpt-lightning",
    "messages": [
      {"role":"system","content":"You are HacxGPT."},
      {"role":"user","content":"Explain mixture-of-experts in simple terms."}
    ],
    "temperature": 0.7,
    "stream": false
  }'
Node.js (fetch)
const res = await fetch("https://api.hacxgpt.example/v1/chat/completions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.HACXGPT_API_KEY,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "hacxgpt-lightning",
    messages: [
      { role: "system", content: "You are HacxGPT." },
      { role: "user", content: "Write a haiku about speed." }
    ]
  })
});
const json = await res.json();
console.log(json.choices?.[0]?.message?.content);
Python (requests)
import os, requests, json

API_KEY = os.environ.get("HACXGPT_API_KEY")
url = "https://api.hacxgpt.example/v1/chat/completions"
payload = {
  "model": "hacxgpt-lightning",
  "messages": [
    {"role": "system", "content": "You are HacxGPT."},
    {"role": "user", "content": "Summarize mixture-of-experts in 3 bullets."}
  ]
}
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
r = requests.post(url, headers=headers, data=json.dumps(payload))
print(r.json())

Get an API Key

API URL and keys are issued on request. Join our Telegram community and message the admins to request access.