AICA Assistant — LLM API docs

Public developer documentation for the AICA Assistant enterprise chat API.

Base URL

Public APIhttps://api-athena.quebecstore.ca/aica/v1/

Authentication

Send the API key on every protected request:

X-API-Key: your-api-key

Optional body fields for your own tracking (not auth): username, client_user_id.

API keys

Limits

Endpoints

MethodURLAuthPurpose
GET/aica/v1/healthNoneService status
POST/aica/v1/chatX-API-KeyText chat with conversation memory + optional web

Health returns engine: "athena", assistant: "aica-v1:3b", and online (boolean).

Chat

The HTTP body is JSON. Only the response string contains Markdown.

Windows PowerShell — use single quotes around the JSON:

curl.exe -s -X POST "https://api-athena.quebecstore.ca/aica/v1/chat" `
  -H "X-API-Key: YOUR-KEY" `
  -H "Content-Type: application/json" `
  -d '{"prompt":"Ghost of Yotei Standard Edition - PlayStation 5: write a market-ready product title, suggest a CAD retail price, a 3-4 line description, and a 4-8 line sell overview (why buy, value vs higher store prices, awards, gameplay, characters, story). Markdown only.","web":"auto"}'

Simple offline reply (no live web):

curl.exe -s -X POST "https://api-athena.quebecstore.ca/aica/v1/chat" `
  -H "X-API-Key: YOUR-KEY" `
  -H "Content-Type: application/json" `
  -d '{"prompt":"Reply with exactly: OK","web":"off"}'

Continue with the returned conversation_id:

curl.exe -s -X POST "https://api-athena.quebecstore.ca/aica/v1/chat" `
  -H "X-API-Key: YOUR-KEY" `
  -H "Content-Type: application/json" `
  -d '{"conversation_id":"01HEXAMPLECONVERSATIONID000","prompt":"Summarize in 3 bullets.","web":"off"}'

Legacy clients may still send cache_id; prefer conversation_id.

web values

Sample response

Shape of a successful chat reply. Markdown lives only inside response.

{
  "ok": true,
  "request_id": "01KEXAMPLEREQUESTID00000000",
  "conversation_id": "01KEXAMPLECONVERSATIONID0000",
  "engine": "athena",
  "assistant": "aica-v1:3b",
  "response": "## Ghost of Yōtei Standard Edition — PlayStation 5\n\n**Suggested retail (CAD):** $89.99\n\n### Description\nStep into feudal Japan as a new legend in the *Ghost* lineage. Ghost of Yōtei delivers cinematic stealth, open-world exploration, and precision combat on PlayStation 5.\n\n### Why buy\n- Flagship PS5 action-adventure with award-caliber presentation\n- Strong value vs higher street prices at big-box retailers\n- Deep story, memorable characters, and refined Ghost gameplay\n- Ideal for single-player fans who want a complete, premium edition",
  "usage": {
    "prompt_tokens": 412,
    "completion_tokens": 286,
    "total_tokens": 698,
    "duration_seconds": 4.82,
    "timing": {
      "search": 0.94,
      "generate": 3.61
    }
  },
  "web": {
    "used": true,
    "providers": ["local"],
    "sources": [
      {
        "title": "Example source",
        "url": "https://example.com/ghost-of-yotei",
        "provider": "local",
        "snippet": "…"
      }
    ],
    "searches": []
  }
}

Language

Error codes

{
  "ok": false,
  "code": "AICA-E001",
  "message": "Access could not be granted. ..."
}
CodeHTTPMeaning
AICA-E001403Missing/invalid/revoked key, wrong IP/Origin
AICA-E002400Bad JSON / missing fields / invalid conversation_id
AICA-E003429Rate limit / quota
AICA-E004403conversation_id belongs to another key
AICA-E005503LLM engine unavailable / timeout
AICA-E006503Web search unavailable or budget-limited
AICA-E007400Response size exceeded
AICA-E008413Prompt too large
AICA-E000503Service registry unavailable