HelyxAI Documentation
HelyxAI provides a unified, fast, and fully OpenAI-compatible REST API. Access dozens of frontier models from Meta, Anthropic, Google, and Mistral through a single endpoint and a unified billing balance.
Base URL & Authentication
All API requests should be made to our unified V1 endpoint. You must authenticate using your secure hx-... API key passed in the Authorization header as a Bearer token.
You can generate and manage your API keys in the API Keys dashboard.
Quick Start
Because HelyxAI is strictly compatible with the OpenAI specification, you do not need to install a new SDK. You can use the official OpenAI Python or Node.js libraries—just change the base_url and api_key.
from openai import OpenAI
# 1. Initialize client pointing to HelyxAI
client = OpenAI(
api_key="hx-your-api-key",
base_url="https://helyxai.space/api/v1"
)
# 2. Request a completion using any supported model
response = client.chat.completions.create(
model="claude-3-5-sonnet", # Or "gpt-4o", "llama-3-70b", etc.
messages=[
{"role": "system", "content": "You are a helpful coding assistant."},
{"role": "user", "content": "Write a Python script to reverse a string."}
],
stream=False
)
print(response.choices[0].message.content)
import OpenAI from 'openai';
// 1. Initialize client pointing to HelyxAI
const openai = new OpenAI({
apiKey: 'hx-your-api-key',
baseURL: 'https://helyxai.space/api/v1',
});
async function main() {
// 2. Request a completion using any supported model
const response = await openai.chat.completions.create({
model: 'gpt-4o', // Or "gemini-1-5-pro", "mixtral-8x22b", etc.
messages: [
{ role: 'system', content: 'You are a helpful coding assistant.' },
{ role: 'user', content: 'Write a JS script to reverse a string.' },
],
});
console.log(response.choices[0].message.content);
}
main();
curl https://helyxai.space/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer hx-your-api-key" \
-d '{
"model": "llama-3-70b",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello! How are you?"
}
]
}'
Available Models
You can pass any supported model identifier into the model parameter of your request. To see the full list of available models, their capabilities, and precise per-token pricing, please visit the Directory.
View Model DirectoryError Handling & Status Codes
HelyxAI utilizes standard HTTP status codes to indicate the success or failure of your API requests. If an error occurs, the response body will contain a JSON object with an error.message detailing the issue.
OK
The request was successful and credits were deducted based on token usage.
Bad Request
The request was malformed or missing required parameters (e.g., missing the model field).
Unauthorized
Your API key is missing, invalid, or has been revoked. Ensure you are passing it as a Bearer token.
Payment Required
Your independent USD API balance is empty. You must add funds to continue making requests.
Not Found
The requested model string does not exist in our directory or is temporarily offline.