Quickstart

This guide walks you through creating an API key, making your first request and streaming a response.

1. Create an API key

Sign in to the dashboard, open Settings → API keys and create a new secret key. Store it securely — it is shown only once.

2. Install an SDK

# Python
pip install qaq-ai

# Node.js
npm install @qaq/ai

3. Make a request

import { QAQ } from "@qaq/ai";
const client = new QAQ({ apiKey: process.env.QAQ_API_KEY });

const stream = await client.chat.completions.create({
  model: "qaq-large",
  stream: true,
  messages: [{ role: "user", content: "Write a haiku about latency." }],
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

4. Add retrieval

Attach a knowledge base to ground responses in your own data:

const answer = await client.rag.query({
  collection: "handbook",
  query: "What is our refund policy?",
  model: "qaq-large",
});
console.log(answer.text, answer.citations);

Rate limits

Free tier is limited to 60 requests/min. Pro and Enterprise plans have higher limits documented in your dashboard.