OpenAI-compatible API. One key, every major model.
Get started in under a minute. Replace YOUR_KEY with your API key from the dashboard.
cURL
curl https://hjleone.com/v1/chat/completions \ -H "Authorization: Bearer hjl_sk_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "messages": [{"role": "user", "content": "Hello"}] }'
Python (OpenAI SDK)
from openai import OpenAI client = OpenAI( base_url="https://hjleone.com/v1", api_key="hjl_sk_YOUR_KEY", ) response = client.chat.completions.create( model="claude-sonnet-4-20250514", messages=[{"role": "user", "content": "Hello"}], ) print(response.choices[0].message.content)
JavaScript (Node.js)
import OpenAI from 'openai'; const client = new OpenAI({ baseURL: 'https://hjleone.com/v1', apiKey: 'hjl_sk_YOUR_KEY', }); const response = await client.chat.completions.create({ model: 'gpt-4o', messages: [{ role: 'user', content: 'Hello' }], }); console.log(response.choices[0].message.content);
All API requests require a valid API key passed in the Authorization header.
Authorization: Bearer hjl_sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API keys begin with the prefix hjl_sk_ followed by 32 alphanumeric characters. Generate keys from your dashboard. Each key is shown only once at creation — store it securely. Keys can be revoked at any time.
/v1/chat/completions
Create a chat completion. Fully compatible with the OpenAI API format.
Request Body
{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain quantum computing."}
],
"temperature": 0.7,
"max_tokens": 1024,
"stream": false
}
Response
{
"id": "hjl-abc123",
"object": "chat.completion",
"created": 1719000000,
"model": "gpt-4o",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "Quantum computing leverages..."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 24,
"completion_tokens": 156,
"total_tokens": 180,
"cost_usd": 0.0027
}
}
/v1/models
List all available models and their pricing.
{
"object": "list",
"data": [
{"id": "gpt-4o", "object": "model", "owned_by": "openai"},
{"id": "claude-sonnet-4-20250514", "object": "model", "owned_by": "anthropic"},
...
]
}
Set "stream": true to receive Server-Sent Events (SSE). Each event contains a delta chunk in OpenAI-compatible format.
// Stream response const stream = await client.chat.completions.create({ model: 'gpt-4o', messages: [{ role: 'user', content: 'Hello' }], stream: true, }); for await (const chunk of stream) { process.stdout.write(chunk.choices[0]?.delta?.content || ''); }
SSE format: each line is data: {json}, terminated by data: [DONE].
Token usage and cost are included in the final chunk.
| Code | HTTP | Description |
|---|---|---|
| HJL-400 | 400 | Bad request — malformed JSON or missing required fields |
| HJL-401 | 401 | Invalid or missing API key |
| HJL-402 | 402 | Insufficient balance — top up your account |
| HJL-403 | 403 | API key revoked or account suspended |
| HJL-404 | 404 | Model not found |
| HJL-429 | 429 | Rate limit exceeded — retry after Retry-After header |
| HJL-500 | 500 | Internal server error |
| HJL-502 | 502 | Upstream provider error |
| HJL-503 | 503 | Service temporarily unavailable |
Rate limits are applied per API key. Headers X-RateLimit-Remaining and X-RateLimit-Reset are included in every response.
| Tier | Requests / Min | Tokens / Min | Concurrent |
|---|---|---|---|
| Free | 20 | 40,000 | 5 |
| Standard | 120 | 200,000 | 20 |
| Pro | 600 | 1,000,000 | 50 |
Prices shown per 1M tokens. All prices include a small routing margin over provider costs.
| Model | Provider | Input / 1M | Output / 1M |
|---|---|---|---|
| gpt-4o | OpenAI | $2.75 | $11.00 |
| gpt-4o-mini | OpenAI | $0.165 | $0.66 |
| gpt-4.1 | OpenAI | $2.20 | $8.80 |
| gpt-4.1-mini | OpenAI | $0.44 | $1.76 |
| gpt-4.1-nano | OpenAI | $0.11 | $0.44 |
| o3 | OpenAI | $11.00 | $44.00 |
| o4-mini | OpenAI | $1.21 | $4.84 |
| claude-sonnet-4-20250514 | Anthropic | $3.30 | $16.50 |
| claude-3-5-haiku-20241022 | Anthropic | $0.88 | $4.40 |
| claude-opus-4-20250514 | Anthropic | $16.50 | $82.50 |
| gemini-2.5-pro | $1.38 | $11.00 | |
| gemini-2.5-flash | $0.083 | $0.33 | |
| deepseek-chat | DeepSeek | $0.15 | $0.33 |
| deepseek-reasoner | DeepSeek | $0.60 | $2.42 |
| llama-3.1-405b | Meta / Fireworks | $3.30 | $3.30 |
Start with $5. No subscriptions. Pay as you go.