Tools
Tools 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
Tools
Tools Curl Integration
Log any external tools used in your LLM applications 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: "tool";
toolName: string;
input: any;
[key: string]: any;
};
meta: Record<string, string>;
};
export type ProviderResponse = {
json: {
_type?: "tool";
toolName: string;
[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": "tool",
"toolName": "toolName",
"input": "input",
... // other data about the vector db request here
},
"meta": {
"metaKey1": "metaValue1",
"metaKey2": "metaValue2"
}
},
"providerResponse": {
"json": {
"_type": "tool",
"toolName": "toolName",
"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?