Getting Started

Build apps that chat with AI and search your documents using the IntelligenceBox API.

1Get Your API Key

Open IntelligenceBox → SettingsSystemAPI key

  1. Enter a label (e.g., "my-app")
  2. Click "Genera API key"
  3. Copy the key that starts with key-...

Keep your API key secret. Anyone with your key can access your IntelligenceBox.

2Your Server URL

Your IntelligenceBox has a URL. Find it in SettingsDevice Info.

Local:http://192.168.1.100 or http://intelligencebox.local
Remote:https://your-subdomain.intelligencebox.it

We'll use BOX_URL as placeholder in examples. Replace it with your actual URL.

3Test Connection

curl BOX_URL/health

Response:

{"status":"ok"}

4Your First Chat

curl -N -X POST BOX_URL/api/ai/chat \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "my-first-chat",
    "messages": [{"role": "user", "content": "Hello!"}],
    "boxAddress": "BOX_URL"
  }'

You'll see a streaming response:

data: {"type":"text-delta","textDelta":"Hello"}
data: {"type":"text-delta","textDelta":"! How can I help?"}
data: {"type":"finish","finishReason":"stop"}

Postman Collection

Test the API easily with Postman:

Download Postman Collection

After importing, set these variables:

  • box_server_url → Your server URL
  • api_key → Your API key

What's Next?