Multi-AI Aggregator with tabs, E2EE, and biometrics.
- Signal Protocol: Open Whisper Systems (MIT: https://github.com/signalapp/libsignal-protocol-javascript)
- Trakt API Wrapper: Trakt API (MIT: https://github.com/trakt/trakt-api)
- Plex API Wrapper: jzaun/plex-api (MIT: https://github.com/jzaun/plex-api)
- Shazam API Wrapper: johnnyoshika/shazam-api (MIT: https://github.com/johnnyoshika/shazam-api)
- LastFM API Wrapper: dwyl/lastfm-api (MIT: https://github.com/dwyl/lastfm-api)
- WebAuthn: W3C (https://webauthn.guide)
All open-source under MIT license for app store compliance.
This project includes optional Pinecone vector store integration for embeddings search (cosine similarity, 1536 dimensions). The branch add/pinecone-support adds:
- .env.example
- src/lib/pinecone.ts (server-side helper)
- src/pages/api/pinecone.ts (Next.js server-side proxy)
Add these env vars to your local .env and to Vercel (Production/Preview as appropriate). Do NOT store the API key in client-side code.
PINECONE_API_KEY=your-pinecone-api-key-here
PINECONE_BASE_URL=https://ai-hub-12ilmwx.svc.aped-4627-b74a.pinecone.io
PINECONE_INDEX=ai-hub-index
PINECONE_DIMENSIONS=1536
PINECONE_METRIC=cosine
You must create an index in the Pinecone console or via the controller API with:
- dimension: 1536
- metric: cosine
- name: ai-hub-index (or set PINECONE_INDEX to your name)
Example controller curl (replace API key and desired index name):
export PINECONE_API_KEY="your-key"
curl -X POST "https://controller.us-east-1.pinecone.io/databases" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "ai-hub-index",
"dimension": 1536,
"metric": "cosine"
}'Notes:
- If your Pinecone project is serverless, prefer creating the index in the Pinecone console.
- Ensure the index status is READY before upserting/querying.
Use the helper in src/lib/pinecone.ts or the API proxy at /api/pinecone.
Example using the API proxy (client -> server):
- Client POST /api/pinecone with JSON:
{
"path": "/vectors/upsert",
"body": {
"vectors": [
{ "id": "example-1", "values": [0.0, 0.0, ... 1536 numbers ...], "metadata": {"source":"doc"} }
]
}
}- Server will forward to Pinecone using the Api-Key in server env.
Direct curl to index host (server-side only, requires Api-Key):
curl -X POST "https://ai-hub-12ilmwx.svc.aped-4627-b74a.pinecone.io/vectors/upsert" \
-H "Content-Type: application/json" \
-H "Api-Key: $PINECONE_API_KEY" \
-d '{
"vectors": [
{ "id": "example-1", "values": [0.0, 0.0, ... 1536 numbers ...], "metadata": {"source":"doc"} }
]
}'Query via the helper or the API proxy.
Client -> server example: POST /api/pinecone body:
{
"path": "/query",
"body": {
"topK": 5,
"vector": [0.0, 0.0, ...1536 numbers...],
"includeMetadata": true,
"includeValues": false
}
}Server-side curl (for debugging):
curl -X POST "https://ai-hub-12ilmwx.svc.aped-4627-b74a.pinecone.io/query" \
-H "Content-Type: application/json" \
-H "Api-Key: $PINECONE_API_KEY" \
-d '{
"topK": 5,
"vector": [0.0, 0.0, ...1536 numbers...],
"includeMetadata": true,
"includeValues": false
}'If you see errors on Vercel deployments (like the deployments you referenced), check the following:
- Environment variables:
- Ensure PINECONE_API_KEY, PINECONE_BASE_URL, PINECONE_INDEX, PINECONE_DIMENSIONS are set for the deployment type (Production/Preview).
- After changing env vars, re-deploy.
- Server vs client:
- Do not call the Pinecone host directly from client-side code. Use /api/pinecone to keep the key secret.
- Common errors and fixes:
- 401 Unauthorized or 403 Forbidden: API key missing or invalid.
- 404 Not Found calling /vectors/upsert or /query: wrong BASE_URL or path.
- 400 / 422 mentioning vector length: your vector length does not equal 1536.
- CORS errors in browser console: client calling Pinecone directly (move to server).
- Inspect Vercel logs:
- Vercel Dashboard -> Projects -> Select project -> Deployments -> select deployment -> Logs/Functions.
- Look for server errors and full stack traces; paste them here and I’ll analyze line-by-line.
Use curl from a machine to confirm authentication and host connectivity:
# small auth/network test (vector must be 1536 length for a full request)
curl -s -X POST "https://ai-hub-12ilmwx.svc.aped-4627-b74a.pinecone.io/query" \
-H "Content-Type: application/json" \
-H "Api-Key: $PINECONE_API_KEY" \
-d '{
"topK": 1,
"vector": [0.0, 0.0, ...1536 numbers...],
"includeMetadata": false,
"includeValues": false
}'- Never put PINECONE_API_KEY in browser code or public repo.
- Use Vercel Secrets or Environment variables for Production keys.
- Use namespaces in Pinecone if you need logical separation.
- Confirm embedding model outputs 1536 dims; otherwise recreate index with correct dimension.
- Push these files to branch add/pinecone-support and open a PR (done by this commit).
- Inspect Vercel logs if you paste the full stack trace(s) from the deployments you referenced and I’ll diagnose errors line-by-line.