API Integration
FreshSource: docs.hindsight.vectorize.io/api-integration
API Endpoint
Base URL for all API requests:
https://api.hindsight.vectorize.ioAuthentication
All API requests require authentication using your API key in the Authorization header:
Authorization: Bearer your-api-keyAPI keys start with the prefix hsk_.
python
client = Hindsight(
base_url="https://api.hindsight.vectorize.io",
api_key="your-api-key"
)typescript
const client = new HindsightClient({
baseUrl: 'https://api.hindsight.vectorize.io',
apiKey: 'your-api-key'
});bash
curl -X POST https://api.hindsight.vectorize.io/v1/default/banks/my-bank/memories \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"items": [{"content": "The user prefers dark mode."}]}'Managing API Keys
Creating a New API Key
- Click Create API Key on the Connect page
- Enter a descriptive name (e.g., "Production Server", "Development")
- Choose an expiration period: Never, 30 days, 90 days, 1 year, or Custom
- Click Create
WARNING
Your API key is only shown once after creation. Store it securely immediately.
Viewing and Managing Keys
Click Manage API Keys to access the full API Keys page where you can:
- View all active and revoked keys
- Filter by status
- Revoke unnecessary keys
Error Codes
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request — Check your request parameters |
| 401 | Unauthorized — Invalid or expired API key |
| 402 | Payment Required — Insufficient credits |
| 403 | Forbidden — Insufficient permissions |
| 404 | Not Found — Resource does not exist |
| 500 | Server Error — Contact support |
Next Steps
- Python SDK — Full Python client reference
- TypeScript SDK — Full TypeScript client reference
- cURL Examples — Raw HTTP examples
- API Keys — Advanced key management