/ API Reference

API Reference

The deathaiaustralia inference API is OpenAI-compatible. If you already use the OpenAI SDK, change the base URL and swap in your API key — nothing else needs to change.

Base URL: https://deathaiaustralia.com.au

Authentication

All /v1/* endpoints require a Bearer API key. Keys are issued from the dashboard.

Authorization: Bearer YOUR_API_KEY
Keys are shown in full once at creation time. Store them securely — lost keys cannot be recovered. Revoke and create a new one.

Rate Limits

Limits reset at midnight UTC. Requests over the daily limit receive a 429 response.

TierRequests/dayModels
free100aiaus-1
pro10,000all models

Rate limit headers are included in every response:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 2024-01-15T00:00:00Z

Errors

All errors return JSON with an error field:

{ "error": "Invalid or revoked API key" }
CodeMeaning
401Missing or invalid API key
403Key is revoked
429Daily rate limit exceeded
400Bad request — missing fields or invalid model
500Inference backend error
503Model loading or server busy

POST /v1/chat

Stream a chat completion. Response is NDJSON server-sent events — OpenAI-compatible.

POST /v1/chat streaming chat completion · SSE

Request body

FieldTypeDescription
modelrequiredstringModel ID. See /v1/models for available models.
messagesrequiredarrayArray of { role, content } objects. Roles: user, assistant, system.
systemoptionalstringSystem prompt. Prepended to messages as a system role.
temperatureoptionalnumberSampling temperature 0–2. Default: 0.8
max_tokensoptionalintegerMax tokens to generate. Default: 512
streamoptionalbooleanWhether to stream. Always treated as true for SSE.

Example

# Streaming chat request
curl -N -X POST https://deathaiaustralia.com.au/v1/chat \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "aiaus-1",
    "messages": [
      { "role": "user", "content": "What is the VITA language?" }
    ],
    "temperature": 0.8,
    "max_tokens": 512
  }'

Response (SSE stream)

# Each line is a server-sent event
data: {"choices":[{"delta":{"content":"VITA"}}]}
data: {"choices":[{"delta":{"content":" is"}}]}
...
data: {"choices":[{"delta":{"content":""},"finish_reason":"stop"}],"usage":{"prompt_tokens":12,"completion_tokens":48}}
data: [DONE]

JavaScript (fetch + stream)

const res = await fetch('https://deathaiaustralia.com.au/v1/chat', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    model: 'aiaus-1',
    messages: [{ role: 'user', content: prompt }]
  })
});

const reader = res.body.getReader();
const decoder = new TextDecoder();

while (true) {
  const { done, value } = await reader.read();
  if (done) break;
  const lines = decoder.decode(value).split('\n');
  for (const line of lines) {
    if (!line.startsWith('data: ')) continue;
    const raw = line.slice(6);
    if (raw === '[DONE]') break;
    const delta = JSON.parse(raw).choices?.[0]?.delta?.content || '';
    process.stdout.write(delta);
  }
}

GET /v1/models

List all available models. Includes base chat and embedding models, plus the full roster of persona models — each a distinct AI character you can embed directly in your product.

GET /v1/models list available models

Example

curl https://deathaiaustralia.com.au/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "object": "list",
  "data": [
    { "id": "aiaus-1",         "type": "chat",      "persona": false },
    { "id": "aiaus-embed",     "type": "embedding", "persona": false },
    { "id": "aiaus-lilly",     "type": "chat",      "persona": true },
    { "id": "aiaus-zomb",      "type": "chat",      "persona": true },
    { "id": "aiaus-sirloin",   "type": "chat",      "persona": true },
    { "id": "aiaus-ivan",      "type": "chat",      "persona": true },
    { "id": "aiaus-nightshade","type": "chat",      "persona": true },
    { "id": "aiaus-demonika",  "type": "chat",      "persona": true },
    { "id": "aiaus-luci",      "type": "chat",      "persona": true },
    { "id": "aiaus-unclechop", "type": "chat",      "persona": true },
    { "id": "aiaus-debbie",    "type": "chat",      "persona": true }
  ]
}

Persona models

Persona models have a locked system prompt — the character's personality is baked in. You supply the conversation; they supply the voice. Passing a system field is ignored for persona models.

Model IDCharacter
aiaus-lillyDeath goddess — dark wisdom, gothic warmth
aiaus-zombUndead creature — enthusiastic, lovably broken grammar
aiaus-sirloinNightclub bouncer — blunt, zero patience
aiaus-ivanEastern European venue operator — fatalistic, dry menace
aiaus-nightshadePunk witch — sharp, cynical, encyclopaedic
aiaus-demonikaAncient demon — sardonic, powerful, endlessly amused
aiaus-luciThe morning star — brilliant, disdainful, never boring
aiaus-unclechopOutback Australian — warm, weathered, full of stories
aiaus-debbiePunk grandma — no filter, been to every gig since '77

POST /v1/embeddings

Generate text embeddings. Returns a high-dimensional vector suitable for semantic search, clustering, and RAG pipelines.

POST /v1/embeddings text embeddings

Request body

FieldTypeDescription
inputrequiredstringText to embed.
modeloptionalstringDefault: aiaus-embed

Response

{
  "embedding": [0.023, -0.154, 0.891, /* ... */],
  "model": "aiaus-embed",
  "tokens": 12
}

GET /v1/usage

Retrieve usage statistics for all API keys associated with your account.

GET /v1/usage usage stats for your keys

Response

{
  "keys": [
    {
      "key_id": 1,
      "name": "My App",
      "tier": "free",
      "requests_today": 42,
      "requests_total": 387,
      "limit_today": 100
    }
  ]
}

POST /api/auth/login

Authenticate with username/email and password. Returns a session cookie used for browser-based access — the rotvice community, dashboard, etc.

POST /api/auth/login
{ "username": "yourusername", "password": "yourpassword" }

Response: { "user": { "id", "username", "email" } } + session cookie.

GET /api/auth/me

Returns the currently authenticated user based on the active session or Bearer token.

GET /api/auth/me
{ "id": 1, "username": "you", "email": "..." }

Returns 401 if not authenticated.

POST /api/auth/logout

Clears the session cookie.

POST /api/auth/logout

Returns { "ok": true }.

GET /api/api-keys

List all API keys for the authenticated user, including today's usage.

GET /api/api-keys
[
  {
    "id": 1, "name": "My App",
    "tier": "free", "revoked": false,
    "requests_today": 42, "created_at": "2024-01-15T..."
  }
]

POST /api/api-keys

Create a new API key. The full key is returned once in the response and never stored in plaintext.

POST /api/api-keys
{ "name": "My App", "tier": "free" }
{ "key": "YOUR_NEW_API_KEY", "id": 1 }
Store the returned key immediately. It cannot be retrieved again.

DELETE /api/api-keys/:id

Revoke an API key. Immediately invalidates all requests using that key. Cannot be undone.

DELETE /api/api-keys/:id

Returns { "ok": true } on success. Returns 404 if key not found or belongs to another user.