API Reference
The HelyxAI API provides unified access to 12 cutting-edge AI models via a single OpenAI-compatible endpoint. Whether you need speed, accuracy, specialized models, or image/video generation — we've got you covered.
API access is available on all plans. Requests deduct from your daily credit balance, just like chat usage.
Authentication
Generate API keys in Settings → Developer API. Keys are prefixed with hx- and persist across sessions.
🔒 Keep keys secret. They have full account permissions and deduct from your daily credits. Never expose in client-side code.
Pass it in the Authorization header:
Authorization: Bearer hx-YOUR_SECRET_KEY
Base URL
All requests go to:
https://helyxai.space/api/v1The full chat completions endpoint:
https://helyxai.space/api/v1/chat/completionsQuick Start
Get your first response in 30 seconds with cURL:
curl https://helyxai.space/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer hx-YOUR_SECRET_KEY" \
-d '{
"model": "claude-4.7",
"messages": [
{"role": "user", "content": "Explain quantum computing in 2 sentences."}
]
}'
Using OpenAI Python SDK
Drop in HelyxAI via base_url — works with all OpenAI SDKs:
from openai import OpenAI
client = OpenAI(
api_key="hx-YOUR_SECRET_KEY",
base_url="https://helyxai.space/api/v1"
)
response = client.chat.completions.create(
model="gpt-4-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a 100-word story."}
],
temperature=0.8,
max_tokens=512
)
print(response.choices[0].message.content)
print(f"Credits charged: {response.helyx.credits_charged}")
print(f"Credits remaining: {response.helyx.credits_remaining}")
Node.js with OpenAI SDK
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'hx-YOUR_SECRET_KEY',
baseURL: 'https://helyxai.space/api/v1',
});
const response = await client.chat.completions.create({
model: 'perplexity-sonar',
messages: [{ role: 'user', content: 'Latest AI news' }],
});
console.log(response.choices[0].message.content);
Chat Completions POST
The main endpoint. Pass a list of messages, get back an AI-generated reply with billing info.
/chat/completionsRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Any model from the list below (e.g., claude-4.7) |
| messages | array | Yes | Array of {role, content} objects (system, user, assistant) |
| temperature | number | No | 0–2. Default 0.7. Higher = creative |
| max_tokens | integer | No | Max output. Default 2048, max 4096 |
| top_p | number | No | 0–1. Nucleus sampling. Default 1.0 |
Response Format
Returns OpenAI-compatible format plus a helyx object with billing:
{
"id": "chatcmpl-abc...",
"object": "chat.completion",
"created": 1716000000,
"model": "claude-4.7",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Quantum computing leverages superposition..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 45,
"completion_tokens": 128,
"total_tokens": 173
},
"helyx": {
"credits_charged": 1.73,
"credits_remaining": 9998.27
}
}
All Models (12 Total)
Select any model. Input and output tokens bill at the same rate. All models available on every plan.
gpt-4-turbo
0.2 cr/tok
ChatGPT 5.5
Latest ChatGPT model optimized for advanced conversations and problem-solving.
claude-4.7
PRO
1.0 cr/tok
Claude 4.7
Best for complex reasoning, coding, and analysis. Requires Pro plan.
perplexity-sonar
0.1 cr/tok
Perplexity Sonar
Real-time web search integrated. Perfect for current events and fact-checking.
helyx-3.5
0.04 cr/tok
Helyx 3.5
Fast and efficient. Default model, excellent for high-volume tasks.
grok-pro
PRO
0.2 cr/tok
Grok Pro
xAI's advanced model. Requires Pro plan.
kimi-k2.6
0.2 cr/tok
Kimi K2.6 Pro
High intelligence model with strong multilingual support.
qwen-3.6-plus
0.2 cr/tok
Qwen 3.6 Plus
Alibaba's advanced model with broad knowledge coverage.
glm-5.1-pro
0.2 cr/tok
GLM 5.1 Pro
Zhipu's advanced reasoning model. Strong logical analysis.
minimax-m2.7
0.1 cr/tok
MiniMax M2.7
Efficient and fast. Great balance of speed and capability.
nano-banana-pro
200 cr/img
Nano Banana Pro
🎨 Image generation. Flat 200 credits per image, regardless of size.
vo3
PRO
TBD
Vo3
🎬 AI video generation. Premium feature. Requires Pro plan.
Pro models (Claude 4.7, Grok Pro, Vo3) require a Plus plan or higher. All other models are available on every plan.
Interactive Playground
Test the API directly below. Log in to test with your account balance
Log in to use the playground. You'll test against your account and see real credit deductions.
Billing & Credits
API requests deduct from your account's daily credit balance — the same pool used by chat.
- Same pricing: Models cost the same via API or chat.
- Per-token billing: Usage = (prompt tokens + completion tokens) × rate.
- Daily reset: Credits reset every 24 hours at 12:00 AM PKT.
- Real-time balance: Each response includes remaining credits.
| Plan | Daily Credits | API Access |
|---|---|---|
| Free | 1,000 | ✓ Included |
| Plus | 5,000 | ✓ Included |
| Pro | 10,000 | ✓ Included |
| Ultra | 25,000 | ✓ Included |
Error Codes
{
"error": {
"message": "You've used all of today's credits.",
"type": "insufficient_quota",
"code": "402"
}
}
| Status | Meaning | Action |
|---|---|---|
| 400 | Bad Request | Fix JSON or missing fields (model, messages) |
| 401 | Unauthorized | Invalid/missing API key |
| 402 | Insufficient Quota | Out of credits. Wait 24h or upgrade |
| 404 | Model Not Found | Unknown model name. Check list above |
| 429 | Rate Limited | Too many requests. Slow down |
| 500 | Server Error | Upstream issue. Retry in 30s |