Aethon is OpenAI-compatible. Switch from OpenAI in one line of code.
Aethon uses the OpenAI API format. If you already use OpenAI, switching takes one line:
from openai import OpenAI
client = OpenAI(
base_url="https://aethon-production.up.railway.app/v1",
api_key="your-aethon-api-key",
)
response = client.chat.completions.create(
model="llama3.1:8b",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)pip install aethon
from aethon import Aethon
client = Aethon(api_key="your-aethon-api-key")
response = client.chat.completions.create(
model="llama3.1:8b",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)curl https://aethon-production.up.railway.app/v1/chat/completions \
-H "Authorization: Bearer your-aethon-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "llama3.1:8b",
"messages": [{"role": "user", "content": "Hello!"}]
}'import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://aethon-production.up.railway.app/v1",
apiKey: "your-aethon-api-key",
});
const response = await client.chat.completions.create({
model: "llama3.1:8b",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);All API requests require a Bearer token. Get your API key from the Settings page after signing up.
Authorization: Bearer your-aethon-api-keyPOST /v1/chat/completions
OpenAI-compatible chat completions. Supports multi-turn conversations.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model name (e.g. "llama3.1:8b") |
| messages | array | Yes | Array of message objects with role and content |
| temperature | float | No | 0.0-2.0 (default: 0.7) |
| max_tokens | int | No | 1-4096 |
| stream | bool | No | Enable SSE streaming (default: false) |
{
"id": "chatcmpl-a1b2c3d4e5f6",
"object": "chat.completion",
"created": 1709827200,
"model": "llama3.1:8b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 8,
"total_tokens": 20
}
}POST /v1/completions
Legacy text completions API. Use prompt instead of messages.
curl https://aethon-production.up.railway.app/v1/completions \
-H "Authorization: Bearer your-aethon-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "llama3.1:8b",
"prompt": "The capital of France is"
}'Set stream: true to receive Server-Sent Events (SSE). Tokens are delivered as they are generated.
from openai import OpenAI
client = OpenAI(
base_url="https://aethon-production.up.railway.app/v1",
api_key="your-aethon-api-key",
)
stream = client.chat.completions.create(
model="llama3.1:8b",
messages=[{"role": "user", "content": "Write a haiku"}],
stream=True,
)
for chunk in stream:
content = chunk.choices[0].delta.content
if content:
print(content, end="", flush=True)GET /models/available — No auth required.
Returns all models currently available on the network with VRAM requirements and online GPU counts.
curl https://aethon-production.up.railway.app/models/availableFree tier models (unlimited, no credit card): llama3.1:8b, mistral:7b, qwen2.5:7b, gemma2:2b, phi3:mini, codellama:7b, and more. See the Models page for the full list.
GET /pricing — Full GPU rate card, tier info, and live availability.
GET /pricing/calculate?gpu_model=RTX+4090&duration_seconds=60&tier=premium — Cost calculator.
Billing is per-second. No minimums. Promo credits deducted first.
| Tier | Monthly | Discount | Rate Limit |
|---|---|---|---|
| Free | $0 | - | 5 req/min |
| Premium | $49 | 15% off | 60 req/min |
| Reserved | $199 | 30% off | 300 req/min |
Error responses follow the OpenAI format:
{
"detail": {
"error": {
"message": "Model 'unknown-model' not found",
"type": "invalid_request_error",
"code": "model_not_found"
}
}
}| Status | Meaning |
|---|---|
| 400 | Invalid request (bad model, missing fields) |
| 401 | Invalid or missing API key |
| 429 | Rate limit exceeded or daily limit reached |
| 502 | Inference failed on the GPU |
| 504 | Request timed out (job may still complete) |
Rate limit headers are included in every response:
X-RateLimit-Limit: 5
X-RateLimit-Remaining: 4
X-RateLimit-Reset: 1709827260Free tier also has a 50 calls/day limit on paid models (>8B). 8B and smaller models are unlimited (rate-limited only).
Aethon is OpenAI-compatible, so it works with any tool that supports custom OpenAI endpoints.
Questions? Check platform status or contact support.