Vector DB
Vector DB Curl Integration
Getting Started
Dev Integrations
- Generic Gateway
- Async Logging
- OpenAI
- Azure OpenAI
- Anthropic
- Ollama
- AWS Bedrock
- Gemini
- Vercel AI
- Anyscale
- Together AI
- Hyperbolic
- Groq
- Instructor
- Deepinfra
- OpenRouter
- LiteLLM
- Fireworks AI
- Vector DB
- Tools
Other Integrations
Features
Vector DB
Vector DB Curl Integration
Log any Vector DB interactions to Helicone using cURL.
Request Structure
A typical request will have the following structure:
Endpoint
POST https://api.us.helicone.ai/custom/v1/log
Headers
Name | Value |
---|---|
Authorization | Bearer {API_KEY} |
Replace {API_KEY}
with your actual API Key.
Body
export type HeliconeAsyncLogRequest = {
providerRequest: ProviderRequest;
providerResponse: ProviderResponse;
timing: Timing;
};
export type ProviderRequest = {
url: "custom-model-nopath";
json: {
_type: "vector_db";
operation: "search" | "insert" | "delete" | "update";
text?: string;
vector?: number[];
topK?: number;
filter?: object;
databaseName?: string;
[key: string]: any;
};
meta: Record<string, string>;
};
export type ProviderResponse = {
json: {
_type?: "vector_db";
[key: string]: any;
};
status: number;
headers: Record<string, string>;
};
export type Timing = {
// From Unix epoch in Milliseconds
startTime: {
seconds: number;
milliseconds: number;
};
endTime: {
seconds: number;
milliseconds: number;
};
};
Example Usage
curl -X POST https://api.us.helicone.ai/custom/v1/log \
-H 'Authorization: Bearer your_api_key' \
-H 'Content-Type: application/json' \
-d '{
"providerRequest": {
"url": "custom-model-nopath",
"json": {
"_type": "vector_db",
"operation": "search",
... // other data about the vector db request here
},
"meta": {
"metaKey1": "metaValue1",
"metaKey2": "metaValue2"
}
},
"providerResponse": {
"json": {
"_type": "vector_db",
"responseKey1": "responseValue1",
"responseKey2": "responseValue2"
},
"status": 200,
"headers": {
"headerKey1": "headerValue1",
"headerKey2": "headerValue2"
}
},
"timing": {
"startTime": {
"seconds": 1625686222,
"milliseconds": 500
},
"endTime": {
"seconds": 1625686244,
"milliseconds": 750
}
}
}'
Was this page helpful?