Installation¶
Install the Vectorcache SDK for your preferred language.
JavaScript/TypeScript¶
NPM¶
Yarn¶
pnpm¶
Requirements¶
- Node.js 16.x or higher
- TypeScript 4.5+ (if using TypeScript)
Python¶
pip¶
Poetry¶
Requirements¶
- Python 3.8 or higher
Direct API (No SDK)¶
You can also use Vectorcache without an SDK by making direct HTTP requests to our REST API.
cURL¶
No installation needed - just use cURL:
curl -X POST "https://api.vectorcache.ai/v1/cache/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Your prompt here",
"model": "gpt-4o",
"similarity_threshold": 0.85
}'
HTTP Clients¶
Any HTTP client library works:
import httpx
async with httpx.AsyncClient() as client:
response = await client.post(
'https://api.vectorcache.ai/v1/cache/query',
json={
'prompt': 'Your prompt here',
'model': 'gpt-4o',
'similarity_threshold': 0.85
},
headers={
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
)
result = response.json()
Verify Installation¶
Next Steps¶
- Quick Start Guide - Make your first request
- Configuration - Configure the SDK
- API Reference - Explore all endpoints