API Documentation

280108 AI API

A simple AI messages API. The server handles model selection, token limits, and API configuration.

Version: v1 Base URL: https://ai.280108.xyz Generated: 2026-06-27 01:48:47 Model: Llama 3.3 (Llama 3.3)

Authentication

Sign in with Discord to create or retrieve your account and API key.

Login with Discord

x-api-key: YOUR_API_KEY

Server managed settings

The client only needs to send the API key and message content. The server handles the rest.

Privacy

Messages are never stored, they pass through in memory only and are not logged. We store only your Discord ID, username, and API key for authentication. No tracking, no analytics.

POST /v1/messages

Create a message

Send a user message to the AI model and receive an response.

Request fields

Field Type Required Description
message string optional The simplest way to send one user message.
prompt string optional Alias for message. You can use either message or prompt.
messages array optional Advanced format for multi-turn conversations.
system string optional Optional system instruction for the assistant.

Simple request

{
  "message": "Hello, what can this API do?"
}

Advanced request

{
  "system": "You are a helpful assistant.",
  "messages": [
    {
      "role": "user",
      "content": "Explain this API in one sentence."
    }
  ]
}

PowerShell

Invoke-RestMethod -Method Post -Uri "https://ai.280108.xyz/v1/messages" -Headers @{"x-api-key"="YOUR_API_KEY"} -ContentType "application/json" -Body '{"message":"Hello from the API"}'

curl.exe

curl.exe -X POST "https://ai.280108.xyz/v1/messages" -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" -d "{\"message\":\"Hello from the API\"}"

JavaScript

const response = await fetch("https://ai.280108.xyz/v1/messages", {
  method: "POST",
  headers: {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    message: "Hello from the API"
  })
});

const data = await response.json();
console.log(data);

Example response

{
  "id": "280108-a3f8c21d94b06e7f3a2c1d05",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "Hello! How can I help?"
    }
  ],
  "model": "280108-AI/standard",
  "stop_reason": "end_turn"
}

Errors

Status Name Description
400 Bad Request The JSON body is invalid or missing required content.
401 Unauthorized The API key is missing or invalid.
405 Method Not Allowed Only POST requests are allowed for this endpoint.
502 AI Error The AI service could not be reached.
GET /v1/health

Health check

Returns the current status of the API and its dependencies.

PowerShell

Invoke-RestMethod -Method Get -Uri "https://ai.280108.xyz/v1/health"

curl.exe

curl.exe "https://ai.280108.xyz/v1/health"

JavaScript

const response = await fetch("https://ai.280108.xyz/v1/health");
const data = await response.json();
console.log(data);

Example response

{
  "status": "ok",
  "database": "ok",
  "timestamp": "2026-06-27T12:00:00+00:00"
}

Errors

Status Name Description
503 Service Unavailable The database could not be reached.