import honeyhive
from honeyhive.models import components, operations
s = honeyhive.HoneyHive(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.events.create_event(request=operations.CreateEventRequestBody(
event=components.CreateEventRequest(
project='Simple RAG',
source='playground',
event_name='Model Completion',
event_type=components.CreateEventRequestEventType.MODEL,
event_id='7f22137a-6911-4ed3-bc36-110f1dde6b66',
session_id='caf77ace-3417-4da4-944d-f4a0688f3c23',
parent_id='caf77ace-3417-4da4-944d-f4a0688f3c23',
children_ids=[
'<value>',
],
config={
'model': 'gpt-3.5-turbo',
'version': 'v0.1',
'provider': 'openai',
'hyperparameters': {
'temperature': 0,
'top_p': 1,
'max_tokens': 1000,
'presence_penalty': 0,
'frequency_penalty': 0,
'stop': [
'<value>',
],
'n': 1,
},
'template': [
{
'role': 'system',
'content': 'Answer the user\'s question only using provided context.
Context: {{ context }}',
},
{
'role': 'user',
'content': '{{question}}',
},
],
'type': 'chat',
},
inputs={
'context': 'Hello world',
'question': 'What is in the context?',
'chat_history': [
{
'role': 'system',
'content': 'Answer the user\'s question only using provided context.
Context: Hello world',
},
{
'role': 'user',
'content': 'What is in the context?',
},
],
},
outputs={
'role': 'assistant',
'content': 'Hello world',
},
error=None,
start_time=1714978764301,
end_time=1714978765301,
duration=999.8056,
metadata={
'cost': 0.00008,
'completion_tokens': 23,
'prompt_tokens': 35,
'total_tokens': 58,
},
feedback={
},
metrics={
'Answer Faithfulness': 5,
'Answer Faithfulness_explanation': 'The AI assistant\'s answer is a concise and accurate description of Ramp\'s API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp\'s financial services into their own applications. The answer is faithful to the provided context.',
'Number of words': 18,
},
user_properties={
'user': 'google-oauth2|111840237613341303366',
},
),
))
if res.object is not None:
# handle response
pass
import { HoneyHive } from "honeyhive";
import { CreateEventRequestEventType } from "honeyhive/dist/models/components";
async function run() {
const sdk = new HoneyHive({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
const res = await sdk.events.createEvent({
event: {
project: "Simple RAG",
source: "playground",
eventName: "Model Completion",
eventType: CreateEventRequestEventType.Model,
eventId: "7f22137a-6911-4ed3-bc36-110f1dde6b66",
sessionId: "caf77ace-3417-4da4-944d-f4a0688f3c23",
parentId: "caf77ace-3417-4da4-944d-f4a0688f3c23",
childrenIds: [
"<value>",
],
config: {
"model": "gpt-3.5-turbo",
"version": "v0.1",
"provider": "openai",
"hyperparameters": {
"temperature": 0,
"top_p": 1,
"max_tokens": 1000,
"presence_penalty": 0,
"frequency_penalty": 0,
"stop": [
"<value>",
],
"n": 1,
},
"template": [
{
"role": "system",
"content": "Answer the user's question only using provided context.
Context: {{ context }}",
},
{
"role": "user",
"content": "{{question}}",
},
],
"type": "chat",
},
inputs: {
"context": "Hello world",
"question": "What is in the context?",
"chat_history": [
{
"role": "system",
"content": "Answer the user's question only using provided context.
Context: Hello world",
},
{
"role": "user",
"content": "What is in the context?",
},
],
},
outputs: {
"role": "assistant",
"content": "Hello world",
},
error: null,
startTime: 1714978764301,
endTime: 1714978765301,
duration: 999.8056,
metadata: {
"cost": 0.00008,
"completion_tokens": 23,
"prompt_tokens": 35,
"total_tokens": 58,
},
feedback: {
},
metrics: {
"Answer Faithfulness": 5,
"Answer Faithfulness_explanation": "The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.",
"Number of words": 18,
},
userProperties: {
"user": "google-oauth2|111840237613341303366",
},
},
});
if (res.statusCode == 200) {
// handle response
}
}
run();
curl --request POST \
--url https://api.honeyhive.ai/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"event": {
"project": "Simple RAG",
"event_type": "model",
"event_name": "Model Completion",
"source": "playground",
"session_id": "caf77ace-3417-4da4-944d-f4a0688f3c23",
"event_id": "7f22137a-6911-4ed3-bc36-110f1dde6b66",
"parent_id": "caf77ace-3417-4da4-944d-f4a0688f3c23",
"children_ids": [],
"config": {
"model": "gpt-3.5-turbo",
"version": "v0.1",
"provider": "openai",
"hyperparameters": {
"temperature": 0,
"top_p": 1,
"max_tokens": 1000,
"presence_penalty": 0,
"frequency_penalty": 0,
"stop": [],
"n": 1
},
"template": [
{
"role": "system",
"content": "Answer the user's question only using provided context.\n\nContext: {{ context }}"
},
{
"role": "user",
"content": "{{question}}"
}
],
"type": "chat"
},
"inputs": {
"context": "Hello world",
"question": "What is in the context?",
"chat_history": [
{
"role": "system",
"content": "Answer the user's question only using provided context.\n\nContext: Hello world"
},
{
"role": "user",
"content": "What is in the context?"
}
]
},
"outputs": {
"role": "assistant",
"content": "Hello world"
},
"error": null,
"start_time": 1714978764301,
"end_time": 1714978765301,
"duration": 999.8056,
"metadata": {
"cost": 0.00008,
"completion_tokens": 23,
"prompt_tokens": 35,
"total_tokens": 58
},
"feedback": {},
"metrics": {
"Answer Faithfulness": 5,
"Answer Faithfulness_explanation": "The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.",
"Number of words": 18
},
"user_properties": {
"user": "google-oauth2|111840237613341303366"
}
}
}
EOF
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event: {
project: 'Simple RAG',
event_type: 'model',
event_name: 'Model Completion',
source: 'playground',
session_id: 'caf77ace-3417-4da4-944d-f4a0688f3c23',
event_id: '7f22137a-6911-4ed3-bc36-110f1dde6b66',
parent_id: 'caf77ace-3417-4da4-944d-f4a0688f3c23',
children_ids: [],
config: {
model: 'gpt-3.5-turbo',
version: 'v0.1',
provider: 'openai',
hyperparameters: {
temperature: 0,
top_p: 1,
max_tokens: 1000,
presence_penalty: 0,
frequency_penalty: 0,
stop: [],
n: 1
},
template: [
{
role: 'system',
content: 'Answer the user\'s question only using provided context.\n\nContext: {{ context }}'
},
{role: 'user', content: '{{question}}'}
],
type: 'chat'
},
inputs: {
context: 'Hello world',
question: 'What is in the context?',
chat_history: [
{
role: 'system',
content: 'Answer the user\'s question only using provided context.\n\nContext: Hello world'
},
{role: 'user', content: 'What is in the context?'}
]
},
outputs: {role: 'assistant', content: 'Hello world'},
error: null,
start_time: 1714978764301,
end_time: 1714978765301,
duration: 999.8056,
metadata: {cost: 0.00008, completion_tokens: 23, prompt_tokens: 35, total_tokens: 58},
feedback: {},
metrics: {
'Answer Faithfulness': 5,
'Answer Faithfulness_explanation': 'The AI assistant\'s answer is a concise and accurate description of Ramp\'s API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp\'s financial services into their own applications. The answer is faithful to the provided context.',
'Number of words': 18
},
user_properties: {user: 'google-oauth2|111840237613341303366'}
}
})
};
fetch('https://api.honeyhive.ai/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.honeyhive.ai/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => [
'project' => 'Simple RAG',
'event_type' => 'model',
'event_name' => 'Model Completion',
'source' => 'playground',
'session_id' => 'caf77ace-3417-4da4-944d-f4a0688f3c23',
'event_id' => '7f22137a-6911-4ed3-bc36-110f1dde6b66',
'parent_id' => 'caf77ace-3417-4da4-944d-f4a0688f3c23',
'children_ids' => [
],
'config' => [
'model' => 'gpt-3.5-turbo',
'version' => 'v0.1',
'provider' => 'openai',
'hyperparameters' => [
'temperature' => 0,
'top_p' => 1,
'max_tokens' => 1000,
'presence_penalty' => 0,
'frequency_penalty' => 0,
'stop' => [
],
'n' => 1
],
'template' => [
[
'role' => 'system',
'content' => 'Answer the user\'s question only using provided context.
Context: {{ context }}'
],
[
'role' => 'user',
'content' => '{{question}}'
]
],
'type' => 'chat'
],
'inputs' => [
'context' => 'Hello world',
'question' => 'What is in the context?',
'chat_history' => [
[
'role' => 'system',
'content' => 'Answer the user\'s question only using provided context.
Context: Hello world'
],
[
'role' => 'user',
'content' => 'What is in the context?'
]
]
],
'outputs' => [
'role' => 'assistant',
'content' => 'Hello world'
],
'error' => null,
'start_time' => 1714978764301,
'end_time' => 1714978765301,
'duration' => 999.8056,
'metadata' => [
'cost' => 0.00008,
'completion_tokens' => 23,
'prompt_tokens' => 35,
'total_tokens' => 58
],
'feedback' => [
],
'metrics' => [
'Answer Faithfulness' => 5,
'Answer Faithfulness_explanation' => 'The AI assistant\'s answer is a concise and accurate description of Ramp\'s API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp\'s financial services into their own applications. The answer is faithful to the provided context.',
'Number of words' => 18
],
'user_properties' => [
'user' => 'google-oauth2|111840237613341303366'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.honeyhive.ai/events"
payload := strings.NewReader("{\n \"event\": {\n \"project\": \"Simple RAG\",\n \"event_type\": \"model\",\n \"event_name\": \"Model Completion\",\n \"source\": \"playground\",\n \"session_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"event_id\": \"7f22137a-6911-4ed3-bc36-110f1dde6b66\",\n \"parent_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"children_ids\": [],\n \"config\": {\n \"model\": \"gpt-3.5-turbo\",\n \"version\": \"v0.1\",\n \"provider\": \"openai\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"top_p\": 1,\n \"max_tokens\": 1000,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 0,\n \"stop\": [],\n \"n\": 1\n },\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: {{ context }}\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{question}}\"\n }\n ],\n \"type\": \"chat\"\n },\n \"inputs\": {\n \"context\": \"Hello world\",\n \"question\": \"What is in the context?\",\n \"chat_history\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: Hello world\"\n },\n {\n \"role\": \"user\",\n \"content\": \"What is in the context?\"\n }\n ]\n },\n \"outputs\": {\n \"role\": \"assistant\",\n \"content\": \"Hello world\"\n },\n \"error\": null,\n \"start_time\": 1714978764301,\n \"end_time\": 1714978765301,\n \"duration\": 999.8056,\n \"metadata\": {\n \"cost\": 0.00008,\n \"completion_tokens\": 23,\n \"prompt_tokens\": 35,\n \"total_tokens\": 58\n },\n \"feedback\": {},\n \"metrics\": {\n \"Answer Faithfulness\": 5,\n \"Answer Faithfulness_explanation\": \"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.\",\n \"Number of words\": 18\n },\n \"user_properties\": {\n \"user\": \"google-oauth2|111840237613341303366\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.honeyhive.ai/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"project\": \"Simple RAG\",\n \"event_type\": \"model\",\n \"event_name\": \"Model Completion\",\n \"source\": \"playground\",\n \"session_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"event_id\": \"7f22137a-6911-4ed3-bc36-110f1dde6b66\",\n \"parent_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"children_ids\": [],\n \"config\": {\n \"model\": \"gpt-3.5-turbo\",\n \"version\": \"v0.1\",\n \"provider\": \"openai\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"top_p\": 1,\n \"max_tokens\": 1000,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 0,\n \"stop\": [],\n \"n\": 1\n },\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: {{ context }}\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{question}}\"\n }\n ],\n \"type\": \"chat\"\n },\n \"inputs\": {\n \"context\": \"Hello world\",\n \"question\": \"What is in the context?\",\n \"chat_history\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: Hello world\"\n },\n {\n \"role\": \"user\",\n \"content\": \"What is in the context?\"\n }\n ]\n },\n \"outputs\": {\n \"role\": \"assistant\",\n \"content\": \"Hello world\"\n },\n \"error\": null,\n \"start_time\": 1714978764301,\n \"end_time\": 1714978765301,\n \"duration\": 999.8056,\n \"metadata\": {\n \"cost\": 0.00008,\n \"completion_tokens\": 23,\n \"prompt_tokens\": 35,\n \"total_tokens\": 58\n },\n \"feedback\": {},\n \"metrics\": {\n \"Answer Faithfulness\": 5,\n \"Answer Faithfulness_explanation\": \"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.\",\n \"Number of words\": 18\n },\n \"user_properties\": {\n \"user\": \"google-oauth2|111840237613341303366\"\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.honeyhive.ai/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"project\": \"Simple RAG\",\n \"event_type\": \"model\",\n \"event_name\": \"Model Completion\",\n \"source\": \"playground\",\n \"session_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"event_id\": \"7f22137a-6911-4ed3-bc36-110f1dde6b66\",\n \"parent_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"children_ids\": [],\n \"config\": {\n \"model\": \"gpt-3.5-turbo\",\n \"version\": \"v0.1\",\n \"provider\": \"openai\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"top_p\": 1,\n \"max_tokens\": 1000,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 0,\n \"stop\": [],\n \"n\": 1\n },\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: {{ context }}\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{question}}\"\n }\n ],\n \"type\": \"chat\"\n },\n \"inputs\": {\n \"context\": \"Hello world\",\n \"question\": \"What is in the context?\",\n \"chat_history\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: Hello world\"\n },\n {\n \"role\": \"user\",\n \"content\": \"What is in the context?\"\n }\n ]\n },\n \"outputs\": {\n \"role\": \"assistant\",\n \"content\": \"Hello world\"\n },\n \"error\": null,\n \"start_time\": 1714978764301,\n \"end_time\": 1714978765301,\n \"duration\": 999.8056,\n \"metadata\": {\n \"cost\": 0.00008,\n \"completion_tokens\": 23,\n \"prompt_tokens\": 35,\n \"total_tokens\": 58\n },\n \"feedback\": {},\n \"metrics\": {\n \"Answer Faithfulness\": 5,\n \"Answer Faithfulness_explanation\": \"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.\",\n \"Number of words\": 18\n },\n \"user_properties\": {\n \"user\": \"google-oauth2|111840237613341303366\"\n }\n }\n}"
response = http.request(request)
puts response.read_body
Please refer to our instrumentation guide for detailed information
POST
/
events
Python
import honeyhive
from honeyhive.models import components, operations
s = honeyhive.HoneyHive(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.events.create_event(request=operations.CreateEventRequestBody(
event=components.CreateEventRequest(
project='Simple RAG',
source='playground',
event_name='Model Completion',
event_type=components.CreateEventRequestEventType.MODEL,
event_id='7f22137a-6911-4ed3-bc36-110f1dde6b66',
session_id='caf77ace-3417-4da4-944d-f4a0688f3c23',
parent_id='caf77ace-3417-4da4-944d-f4a0688f3c23',
children_ids=[
'<value>',
],
config={
'model': 'gpt-3.5-turbo',
'version': 'v0.1',
'provider': 'openai',
'hyperparameters': {
'temperature': 0,
'top_p': 1,
'max_tokens': 1000,
'presence_penalty': 0,
'frequency_penalty': 0,
'stop': [
'<value>',
],
'n': 1,
},
'template': [
{
'role': 'system',
'content': 'Answer the user\'s question only using provided context.
Context: {{ context }}',
},
{
'role': 'user',
'content': '{{question}}',
},
],
'type': 'chat',
},
inputs={
'context': 'Hello world',
'question': 'What is in the context?',
'chat_history': [
{
'role': 'system',
'content': 'Answer the user\'s question only using provided context.
Context: Hello world',
},
{
'role': 'user',
'content': 'What is in the context?',
},
],
},
outputs={
'role': 'assistant',
'content': 'Hello world',
},
error=None,
start_time=1714978764301,
end_time=1714978765301,
duration=999.8056,
metadata={
'cost': 0.00008,
'completion_tokens': 23,
'prompt_tokens': 35,
'total_tokens': 58,
},
feedback={
},
metrics={
'Answer Faithfulness': 5,
'Answer Faithfulness_explanation': 'The AI assistant\'s answer is a concise and accurate description of Ramp\'s API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp\'s financial services into their own applications. The answer is faithful to the provided context.',
'Number of words': 18,
},
user_properties={
'user': 'google-oauth2|111840237613341303366',
},
),
))
if res.object is not None:
# handle response
pass
import { HoneyHive } from "honeyhive";
import { CreateEventRequestEventType } from "honeyhive/dist/models/components";
async function run() {
const sdk = new HoneyHive({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
const res = await sdk.events.createEvent({
event: {
project: "Simple RAG",
source: "playground",
eventName: "Model Completion",
eventType: CreateEventRequestEventType.Model,
eventId: "7f22137a-6911-4ed3-bc36-110f1dde6b66",
sessionId: "caf77ace-3417-4da4-944d-f4a0688f3c23",
parentId: "caf77ace-3417-4da4-944d-f4a0688f3c23",
childrenIds: [
"<value>",
],
config: {
"model": "gpt-3.5-turbo",
"version": "v0.1",
"provider": "openai",
"hyperparameters": {
"temperature": 0,
"top_p": 1,
"max_tokens": 1000,
"presence_penalty": 0,
"frequency_penalty": 0,
"stop": [
"<value>",
],
"n": 1,
},
"template": [
{
"role": "system",
"content": "Answer the user's question only using provided context.
Context: {{ context }}",
},
{
"role": "user",
"content": "{{question}}",
},
],
"type": "chat",
},
inputs: {
"context": "Hello world",
"question": "What is in the context?",
"chat_history": [
{
"role": "system",
"content": "Answer the user's question only using provided context.
Context: Hello world",
},
{
"role": "user",
"content": "What is in the context?",
},
],
},
outputs: {
"role": "assistant",
"content": "Hello world",
},
error: null,
startTime: 1714978764301,
endTime: 1714978765301,
duration: 999.8056,
metadata: {
"cost": 0.00008,
"completion_tokens": 23,
"prompt_tokens": 35,
"total_tokens": 58,
},
feedback: {
},
metrics: {
"Answer Faithfulness": 5,
"Answer Faithfulness_explanation": "The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.",
"Number of words": 18,
},
userProperties: {
"user": "google-oauth2|111840237613341303366",
},
},
});
if (res.statusCode == 200) {
// handle response
}
}
run();
curl --request POST \
--url https://api.honeyhive.ai/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"event": {
"project": "Simple RAG",
"event_type": "model",
"event_name": "Model Completion",
"source": "playground",
"session_id": "caf77ace-3417-4da4-944d-f4a0688f3c23",
"event_id": "7f22137a-6911-4ed3-bc36-110f1dde6b66",
"parent_id": "caf77ace-3417-4da4-944d-f4a0688f3c23",
"children_ids": [],
"config": {
"model": "gpt-3.5-turbo",
"version": "v0.1",
"provider": "openai",
"hyperparameters": {
"temperature": 0,
"top_p": 1,
"max_tokens": 1000,
"presence_penalty": 0,
"frequency_penalty": 0,
"stop": [],
"n": 1
},
"template": [
{
"role": "system",
"content": "Answer the user's question only using provided context.\n\nContext: {{ context }}"
},
{
"role": "user",
"content": "{{question}}"
}
],
"type": "chat"
},
"inputs": {
"context": "Hello world",
"question": "What is in the context?",
"chat_history": [
{
"role": "system",
"content": "Answer the user's question only using provided context.\n\nContext: Hello world"
},
{
"role": "user",
"content": "What is in the context?"
}
]
},
"outputs": {
"role": "assistant",
"content": "Hello world"
},
"error": null,
"start_time": 1714978764301,
"end_time": 1714978765301,
"duration": 999.8056,
"metadata": {
"cost": 0.00008,
"completion_tokens": 23,
"prompt_tokens": 35,
"total_tokens": 58
},
"feedback": {},
"metrics": {
"Answer Faithfulness": 5,
"Answer Faithfulness_explanation": "The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.",
"Number of words": 18
},
"user_properties": {
"user": "google-oauth2|111840237613341303366"
}
}
}
EOF
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event: {
project: 'Simple RAG',
event_type: 'model',
event_name: 'Model Completion',
source: 'playground',
session_id: 'caf77ace-3417-4da4-944d-f4a0688f3c23',
event_id: '7f22137a-6911-4ed3-bc36-110f1dde6b66',
parent_id: 'caf77ace-3417-4da4-944d-f4a0688f3c23',
children_ids: [],
config: {
model: 'gpt-3.5-turbo',
version: 'v0.1',
provider: 'openai',
hyperparameters: {
temperature: 0,
top_p: 1,
max_tokens: 1000,
presence_penalty: 0,
frequency_penalty: 0,
stop: [],
n: 1
},
template: [
{
role: 'system',
content: 'Answer the user\'s question only using provided context.\n\nContext: {{ context }}'
},
{role: 'user', content: '{{question}}'}
],
type: 'chat'
},
inputs: {
context: 'Hello world',
question: 'What is in the context?',
chat_history: [
{
role: 'system',
content: 'Answer the user\'s question only using provided context.\n\nContext: Hello world'
},
{role: 'user', content: 'What is in the context?'}
]
},
outputs: {role: 'assistant', content: 'Hello world'},
error: null,
start_time: 1714978764301,
end_time: 1714978765301,
duration: 999.8056,
metadata: {cost: 0.00008, completion_tokens: 23, prompt_tokens: 35, total_tokens: 58},
feedback: {},
metrics: {
'Answer Faithfulness': 5,
'Answer Faithfulness_explanation': 'The AI assistant\'s answer is a concise and accurate description of Ramp\'s API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp\'s financial services into their own applications. The answer is faithful to the provided context.',
'Number of words': 18
},
user_properties: {user: 'google-oauth2|111840237613341303366'}
}
})
};
fetch('https://api.honeyhive.ai/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.honeyhive.ai/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => [
'project' => 'Simple RAG',
'event_type' => 'model',
'event_name' => 'Model Completion',
'source' => 'playground',
'session_id' => 'caf77ace-3417-4da4-944d-f4a0688f3c23',
'event_id' => '7f22137a-6911-4ed3-bc36-110f1dde6b66',
'parent_id' => 'caf77ace-3417-4da4-944d-f4a0688f3c23',
'children_ids' => [
],
'config' => [
'model' => 'gpt-3.5-turbo',
'version' => 'v0.1',
'provider' => 'openai',
'hyperparameters' => [
'temperature' => 0,
'top_p' => 1,
'max_tokens' => 1000,
'presence_penalty' => 0,
'frequency_penalty' => 0,
'stop' => [
],
'n' => 1
],
'template' => [
[
'role' => 'system',
'content' => 'Answer the user\'s question only using provided context.
Context: {{ context }}'
],
[
'role' => 'user',
'content' => '{{question}}'
]
],
'type' => 'chat'
],
'inputs' => [
'context' => 'Hello world',
'question' => 'What is in the context?',
'chat_history' => [
[
'role' => 'system',
'content' => 'Answer the user\'s question only using provided context.
Context: Hello world'
],
[
'role' => 'user',
'content' => 'What is in the context?'
]
]
],
'outputs' => [
'role' => 'assistant',
'content' => 'Hello world'
],
'error' => null,
'start_time' => 1714978764301,
'end_time' => 1714978765301,
'duration' => 999.8056,
'metadata' => [
'cost' => 0.00008,
'completion_tokens' => 23,
'prompt_tokens' => 35,
'total_tokens' => 58
],
'feedback' => [
],
'metrics' => [
'Answer Faithfulness' => 5,
'Answer Faithfulness_explanation' => 'The AI assistant\'s answer is a concise and accurate description of Ramp\'s API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp\'s financial services into their own applications. The answer is faithful to the provided context.',
'Number of words' => 18
],
'user_properties' => [
'user' => 'google-oauth2|111840237613341303366'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.honeyhive.ai/events"
payload := strings.NewReader("{\n \"event\": {\n \"project\": \"Simple RAG\",\n \"event_type\": \"model\",\n \"event_name\": \"Model Completion\",\n \"source\": \"playground\",\n \"session_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"event_id\": \"7f22137a-6911-4ed3-bc36-110f1dde6b66\",\n \"parent_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"children_ids\": [],\n \"config\": {\n \"model\": \"gpt-3.5-turbo\",\n \"version\": \"v0.1\",\n \"provider\": \"openai\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"top_p\": 1,\n \"max_tokens\": 1000,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 0,\n \"stop\": [],\n \"n\": 1\n },\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: {{ context }}\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{question}}\"\n }\n ],\n \"type\": \"chat\"\n },\n \"inputs\": {\n \"context\": \"Hello world\",\n \"question\": \"What is in the context?\",\n \"chat_history\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: Hello world\"\n },\n {\n \"role\": \"user\",\n \"content\": \"What is in the context?\"\n }\n ]\n },\n \"outputs\": {\n \"role\": \"assistant\",\n \"content\": \"Hello world\"\n },\n \"error\": null,\n \"start_time\": 1714978764301,\n \"end_time\": 1714978765301,\n \"duration\": 999.8056,\n \"metadata\": {\n \"cost\": 0.00008,\n \"completion_tokens\": 23,\n \"prompt_tokens\": 35,\n \"total_tokens\": 58\n },\n \"feedback\": {},\n \"metrics\": {\n \"Answer Faithfulness\": 5,\n \"Answer Faithfulness_explanation\": \"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.\",\n \"Number of words\": 18\n },\n \"user_properties\": {\n \"user\": \"google-oauth2|111840237613341303366\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.honeyhive.ai/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"project\": \"Simple RAG\",\n \"event_type\": \"model\",\n \"event_name\": \"Model Completion\",\n \"source\": \"playground\",\n \"session_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"event_id\": \"7f22137a-6911-4ed3-bc36-110f1dde6b66\",\n \"parent_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"children_ids\": [],\n \"config\": {\n \"model\": \"gpt-3.5-turbo\",\n \"version\": \"v0.1\",\n \"provider\": \"openai\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"top_p\": 1,\n \"max_tokens\": 1000,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 0,\n \"stop\": [],\n \"n\": 1\n },\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: {{ context }}\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{question}}\"\n }\n ],\n \"type\": \"chat\"\n },\n \"inputs\": {\n \"context\": \"Hello world\",\n \"question\": \"What is in the context?\",\n \"chat_history\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: Hello world\"\n },\n {\n \"role\": \"user\",\n \"content\": \"What is in the context?\"\n }\n ]\n },\n \"outputs\": {\n \"role\": \"assistant\",\n \"content\": \"Hello world\"\n },\n \"error\": null,\n \"start_time\": 1714978764301,\n \"end_time\": 1714978765301,\n \"duration\": 999.8056,\n \"metadata\": {\n \"cost\": 0.00008,\n \"completion_tokens\": 23,\n \"prompt_tokens\": 35,\n \"total_tokens\": 58\n },\n \"feedback\": {},\n \"metrics\": {\n \"Answer Faithfulness\": 5,\n \"Answer Faithfulness_explanation\": \"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.\",\n \"Number of words\": 18\n },\n \"user_properties\": {\n \"user\": \"google-oauth2|111840237613341303366\"\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.honeyhive.ai/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"project\": \"Simple RAG\",\n \"event_type\": \"model\",\n \"event_name\": \"Model Completion\",\n \"source\": \"playground\",\n \"session_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"event_id\": \"7f22137a-6911-4ed3-bc36-110f1dde6b66\",\n \"parent_id\": \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n \"children_ids\": [],\n \"config\": {\n \"model\": \"gpt-3.5-turbo\",\n \"version\": \"v0.1\",\n \"provider\": \"openai\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"top_p\": 1,\n \"max_tokens\": 1000,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 0,\n \"stop\": [],\n \"n\": 1\n },\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: {{ context }}\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{question}}\"\n }\n ],\n \"type\": \"chat\"\n },\n \"inputs\": {\n \"context\": \"Hello world\",\n \"question\": \"What is in the context?\",\n \"chat_history\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\\n\\nContext: Hello world\"\n },\n {\n \"role\": \"user\",\n \"content\": \"What is in the context?\"\n }\n ]\n },\n \"outputs\": {\n \"role\": \"assistant\",\n \"content\": \"Hello world\"\n },\n \"error\": null,\n \"start_time\": 1714978764301,\n \"end_time\": 1714978765301,\n \"duration\": 999.8056,\n \"metadata\": {\n \"cost\": 0.00008,\n \"completion_tokens\": 23,\n \"prompt_tokens\": 35,\n \"total_tokens\": 58\n },\n \"feedback\": {},\n \"metrics\": {\n \"Answer Faithfulness\": 5,\n \"Answer Faithfulness_explanation\": \"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.\",\n \"Number of words\": 18\n },\n \"user_properties\": {\n \"user\": \"google-oauth2|111840237613341303366\"\n }\n }\n}"
response = http.request(request)
puts response.read_body
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
event
object
Show child attributes
Example:
{
"project": "Simple RAG",
"event_type": "model",
"event_name": "Model Completion",
"source": "playground",
"session_id": "caf77ace-3417-4da4-944d-f4a0688f3c23",
"event_id": "7f22137a-6911-4ed3-bc36-110f1dde6b66",
"parent_id": "caf77ace-3417-4da4-944d-f4a0688f3c23",
"children_ids": [],
"config": {
"model": "gpt-3.5-turbo",
"version": "v0.1",
"provider": "openai",
"hyperparameters": {
"temperature": 0,
"top_p": 1,
"max_tokens": 1000,
"presence_penalty": 0,
"frequency_penalty": 0,
"stop": [],
"n": 1
},
"template": [
{
"role": "system",
"content": "Answer the user's question only using provided context.\n\nContext: {{ context }}"
},
{ "role": "user", "content": "{{question}}" }
],
"type": "chat"
},
"inputs": {
"context": "Hello world",
"question": "What is in the context?",
"chat_history": [
{
"role": "system",
"content": "Answer the user's question only using provided context.\n\nContext: Hello world"
},
{
"role": "user",
"content": "What is in the context?"
}
]
},
"outputs": {
"role": "assistant",
"content": "Hello world"
},
"error": null,
"start_time": 1714978764301,
"end_time": 1714978765301,
"duration": 999.8056,
"metadata": {
"cost": 0.00008,
"completion_tokens": 23,
"prompt_tokens": 35,
"total_tokens": 58
},
"feedback": {},
"metrics": {
"Answer Faithfulness": 5,
"Answer Faithfulness_explanation": "The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.",
"Number of words": 18
},
"user_properties": {
"user": "google-oauth2|111840237613341303366"
}
}
Response
200 - application/json
Event created
event_id
string
success
boolean
Was this page helpful?
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"HoneyHive AI Docs","description":"AI observability and evaluation platform. Trace, evaluate, monitor, and improve AI agents and LLM applications.","colors":{"primary":"#A56311","light":"#E8A23D","dark":"#A56311"},"logo":{"light":"https://mintcdn.com/honeyhiveai/lWy7JAPdMsmL06l1/logo/light.svg?fit=max\u0026auto=format\u0026n=lWy7JAPdMsmL06l1\u0026q=85\u0026s=419c99bb22ce1e89ae8fb4a87c589528","dark":"https://mintcdn.com/honeyhiveai/lWy7JAPdMsmL06l1/logo/dark.svg?fit=max\u0026auto=format\u0026n=lWy7JAPdMsmL06l1\u0026q=85\u0026s=2cee835bc5438cd29005218a18e0168b"},"favicon":{"light":"https://mintcdn.com/honeyhiveai/W7aN2oGPMTbOQxZv/images/favicon.svg?fit=max\u0026auto=format\u0026n=W7aN2oGPMTbOQxZv\u0026q=85\u0026s=1c201da27b06120f1c630bf53ad1a831","dark":"https://mintcdn.com/honeyhiveai/W7aN2oGPMTbOQxZv/images/favicon-dark.svg?fit=max\u0026auto=format\u0026n=W7aN2oGPMTbOQxZv\u0026q=85\u0026s=01cb0bffc66454f0e19853e701832110"},"api":{"openapi":["output.yaml","https://raw.githubusercontent.com/honeyhiveai/honeyhive-openapi/main/data_plane_openapi.yaml","https://raw.githubusercontent.com/honeyhiveai/honeyhive-openapi/main/control_plane_openapi.yaml"],"mdx":{"auth":{"method":"key","name":"key"},"server":"https://api.dp1.us.honeyhive.ai"}},"appearance":{"default":"light"},"background":{"color":{"light":"#ffffff","dark":"#101010"}},"navbar":{"links":[{"href":"https://discord.gg/vqctGpqA97","label":"Community"}],"primary":{"type":"button","label":"Log In","href":"https://app.us.honeyhive.ai"}},"footer":{"socials":{"x":"https://x.com/honeyhiveai","linkedin":"https://www.linkedin.com/company/honeyhive-ai","github":"https://github.com/honeyhiveai"},"links":[{"header":"Resources","items":[{"label":"Quickstart","href":"https://docs.honeyhive.ai/v2/introduction/tracing-quickstart"},{"label":"SDK Reference","href":"https://docs.honeyhive.ai/v2/sdk-reference/overview"},{"label":"API Reference","href":"https://docs.honeyhive.ai/v2/api-reference-autogen/sessions/start-a-new-session"},{"label":"Integrations","href":"https://docs.honeyhive.ai/v2/integrations/openai"},{"label":"Changelog","href":"https://docs.honeyhive.ai/v2/changelog/product"}]},{"header":"Explore","items":[{"label":"Sign Up","href":"https://app.us.honeyhive.ai"},{"label":"Pricing","href":"https://www.honeyhive.ai/pricing"},{"label":"Blog","href":"https://honeyhive.ai/blog"}]},{"header":"Platform","items":[{"label":"Observability","href":"https://honeyhive.ai/observability"},{"label":"Evaluation","href":"https://honeyhive.ai/evaluation"},{"label":"Prompt Management","href":"https://honeyhive.ai/playground"}]},{"header":"Legal","items":[{"label":"Terms of Service","href":"https://honeyhive.ai/terms"},{"label":"Privacy Policy","href":"https://honeyhive.ai/privacy"}]}]},"search":{"prompt":"Search or ask AI..."},"seo":{"metatags":{"og:site_name":"HoneyHive AI Docs"},"indexing":"navigable"},"integrations":{"posthog":{"apiKey":"phc_CtmMXHNhIs1Iem8viAsXYH7lB0aaj4X2nCrCunPqDbF","sessionRecording":false},"telemetry":{"enabled":true}},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode",{"title":"Join Discord","description":"Get help from the HoneyHive community","icon":"discord","href":"https://discord.gg/vqctGpqA97"}],"display":"header"},"styling":{"latex":false},"navigation":{"global":{},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"honeyhiveai","hasAudioNarration":false,"actualSubdomain":"honeyhiveai","customDomains":["docs.honeyhive.ai"],"gitSource":{"type":"github","owner":"honeyhiveai","repo":"honeyhive-ai-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"issues":false,"edits":false,"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af79a6ebba5471b484462ef","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"v2","count":396},{"language":"default","tag":"SDK Reference","count":175},{"language":"default","tag":"Reference","count":172},{"language":"default","tag":"TypeScript API SDK","count":114},{"language":"default","tag":"Documentation","count":92},{"language":"default","tag":"API Reference","count":71},{"language":"default","tag":"Data Plane API","count":51},{"language":"default","tag":"TypeScript Control Plane SDK","count":50},{"language":"default","tag":"Experiments","count":40},{"language":"default","tag":"Integrations","count":34}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@honeyhive.ai"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".update-container .hh-update-entry:first-child>h2{margin-top:0}"}],"page":{"pagePath":"api-reference/events/create-a-new-event","slug":"/api-reference/events/create-a-new-event","pageMetadata":{"openapi":"output.yaml post /events","noindex":true,"title":"Create a new event","description":"Please refer to our instrumentation guide for detailed information","href":"/api-reference/events/create-a-new-event"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Please refer to our instrumentation guide for detailed information\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"output.yaml post /events","noindex":true,"title":"Create a new event","description":"Please refer to our instrumentation guide for detailed information","href":"/api-reference/events/create-a-new-event"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/honeyhiveai/295d4d275d20dba2/leadfeeder.js"],"openApiReferenceData":{"operation":{"tags":["Events"],"operationId":"createEvent","summary":"Create a new event","description":"Please refer to our instrumentation guide for detailed information","requestBody":"378ac16b-b29d-4a13-a5ce-be3919b15c81","responses":{"200":"8fc33856-99eb-4096-bfcf-15e552ca46d2"},"x-codeSamples":[{"lang":"python","label":"createEvent","source":"import honeyhive\nfrom honeyhive.models import components, operations\n\ns = honeyhive.HoneyHive(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE>\",\n)\n\n\nres = s.events.create_event(request=operations.CreateEventRequestBody(\n event=components.CreateEventRequest(\n project='Simple RAG',\n source='playground',\n event_name='Model Completion',\n event_type=components.CreateEventRequestEventType.MODEL,\n event_id='7f22137a-6911-4ed3-bc36-110f1dde6b66',\n session_id='caf77ace-3417-4da4-944d-f4a0688f3c23',\n parent_id='caf77ace-3417-4da4-944d-f4a0688f3c23',\n children_ids=[\n '\u003cvalue>',\n ],\n config={\n 'model': 'gpt-3.5-turbo',\n 'version': 'v0.1',\n 'provider': 'openai',\n 'hyperparameters': {\n 'temperature': 0,\n 'top_p': 1,\n 'max_tokens': 1000,\n 'presence_penalty': 0,\n 'frequency_penalty': 0,\n 'stop': [\n '\u003cvalue>',\n ],\n 'n': 1,\n },\n 'template': [\n {\n 'role': 'system',\n 'content': 'Answer the user\\'s question only using provided context.\n\n Context: {{ context }}',\n },\n {\n 'role': 'user',\n 'content': '{{question}}',\n },\n ],\n 'type': 'chat',\n },\n inputs={\n 'context': 'Hello world',\n 'question': 'What is in the context?',\n 'chat_history': [\n {\n 'role': 'system',\n 'content': 'Answer the user\\'s question only using provided context.\n\n Context: Hello world',\n },\n {\n 'role': 'user',\n 'content': 'What is in the context?',\n },\n ],\n },\n outputs={\n 'role': 'assistant',\n 'content': 'Hello world',\n },\n error=None,\n start_time=1714978764301,\n end_time=1714978765301,\n duration=999.8056,\n metadata={\n 'cost': 0.00008,\n 'completion_tokens': 23,\n 'prompt_tokens': 35,\n 'total_tokens': 58,\n },\n feedback={\n\n },\n metrics={\n 'Answer Faithfulness': 5,\n 'Answer Faithfulness_explanation': 'The AI assistant\\'s answer is a concise and accurate description of Ramp\\'s API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp\\'s financial services into their own applications. The answer is faithful to the provided context.',\n 'Number of words': 18,\n },\n user_properties={\n 'user': 'google-oauth2|111840237613341303366',\n },\n ),\n))\n\nif res.object is not None:\n # handle response\n pass"},{"lang":"typescript","label":"createEvent","source":"import { HoneyHive } from \"honeyhive\";\nimport { CreateEventRequestEventType } from \"honeyhive/dist/models/components\";\n\nasync function run() {\n const sdk = new HoneyHive({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE>\",\n });\n\n const res = await sdk.events.createEvent({\n event: {\n project: \"Simple RAG\",\n source: \"playground\",\n eventName: \"Model Completion\",\n eventType: CreateEventRequestEventType.Model,\n eventId: \"7f22137a-6911-4ed3-bc36-110f1dde6b66\",\n sessionId: \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n parentId: \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n childrenIds: [\n \"\u003cvalue>\",\n ],\n config: {\n \"model\": \"gpt-3.5-turbo\",\n \"version\": \"v0.1\",\n \"provider\": \"openai\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"top_p\": 1,\n \"max_tokens\": 1000,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 0,\n \"stop\": [\n \"\u003cvalue>\",\n ],\n \"n\": 1,\n },\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\n\n Context: {{ context }}\",\n },\n {\n \"role\": \"user\",\n \"content\": \"{{question}}\",\n },\n ],\n \"type\": \"chat\",\n },\n inputs: {\n \"context\": \"Hello world\",\n \"question\": \"What is in the context?\",\n \"chat_history\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\n\n Context: Hello world\",\n },\n {\n \"role\": \"user\",\n \"content\": \"What is in the context?\",\n },\n ],\n },\n outputs: {\n \"role\": \"assistant\",\n \"content\": \"Hello world\",\n },\n error: null,\n startTime: 1714978764301,\n endTime: 1714978765301,\n duration: 999.8056,\n metadata: {\n \"cost\": 0.00008,\n \"completion_tokens\": 23,\n \"prompt_tokens\": 35,\n \"total_tokens\": 58,\n },\n feedback: {\n\n },\n metrics: {\n \"Answer Faithfulness\": 5,\n \"Answer Faithfulness_explanation\": \"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.\",\n \"Number of words\": 18,\n },\n userProperties: {\n \"user\": \"google-oauth2|111840237613341303366\",\n },\n },\n });\n\n if (res.statusCode == 200) {\n // handle response\n }\n}\n\nrun();"}],"method":"post","type":"path","servers":["9c085861-5b70-49fb-8539-db0cd1f26b97"],"security":["a9b62862-c317-4d53-990d-dc3e72abce55"],"path":"/events","baseUrlOptions":["https://api.honeyhive.ai"],"title":"Create a new event","codeSamples":[{"label":"createEvent","lang":"python","source":"import honeyhive\nfrom honeyhive.models import components, operations\n\ns = honeyhive.HoneyHive(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE>\",\n)\n\n\nres = s.events.create_event(request=operations.CreateEventRequestBody(\n event=components.CreateEventRequest(\n project='Simple RAG',\n source='playground',\n event_name='Model Completion',\n event_type=components.CreateEventRequestEventType.MODEL,\n event_id='7f22137a-6911-4ed3-bc36-110f1dde6b66',\n session_id='caf77ace-3417-4da4-944d-f4a0688f3c23',\n parent_id='caf77ace-3417-4da4-944d-f4a0688f3c23',\n children_ids=[\n '\u003cvalue>',\n ],\n config={\n 'model': 'gpt-3.5-turbo',\n 'version': 'v0.1',\n 'provider': 'openai',\n 'hyperparameters': {\n 'temperature': 0,\n 'top_p': 1,\n 'max_tokens': 1000,\n 'presence_penalty': 0,\n 'frequency_penalty': 0,\n 'stop': [\n '\u003cvalue>',\n ],\n 'n': 1,\n },\n 'template': [\n {\n 'role': 'system',\n 'content': 'Answer the user\\'s question only using provided context.\n\n Context: {{ context }}',\n },\n {\n 'role': 'user',\n 'content': '{{question}}',\n },\n ],\n 'type': 'chat',\n },\n inputs={\n 'context': 'Hello world',\n 'question': 'What is in the context?',\n 'chat_history': [\n {\n 'role': 'system',\n 'content': 'Answer the user\\'s question only using provided context.\n\n Context: Hello world',\n },\n {\n 'role': 'user',\n 'content': 'What is in the context?',\n },\n ],\n },\n outputs={\n 'role': 'assistant',\n 'content': 'Hello world',\n },\n error=None,\n start_time=1714978764301,\n end_time=1714978765301,\n duration=999.8056,\n metadata={\n 'cost': 0.00008,\n 'completion_tokens': 23,\n 'prompt_tokens': 35,\n 'total_tokens': 58,\n },\n feedback={\n\n },\n metrics={\n 'Answer Faithfulness': 5,\n 'Answer Faithfulness_explanation': 'The AI assistant\\'s answer is a concise and accurate description of Ramp\\'s API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp\\'s financial services into their own applications. The answer is faithful to the provided context.',\n 'Number of words': 18,\n },\n user_properties={\n 'user': 'google-oauth2|111840237613341303366',\n },\n ),\n))\n\nif res.object is not None:\n # handle response\n pass"},{"label":"createEvent","lang":"typescript","source":"import { HoneyHive } from \"honeyhive\";\nimport { CreateEventRequestEventType } from \"honeyhive/dist/models/components\";\n\nasync function run() {\n const sdk = new HoneyHive({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE>\",\n });\n\n const res = await sdk.events.createEvent({\n event: {\n project: \"Simple RAG\",\n source: \"playground\",\n eventName: \"Model Completion\",\n eventType: CreateEventRequestEventType.Model,\n eventId: \"7f22137a-6911-4ed3-bc36-110f1dde6b66\",\n sessionId: \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n parentId: \"caf77ace-3417-4da4-944d-f4a0688f3c23\",\n childrenIds: [\n \"\u003cvalue>\",\n ],\n config: {\n \"model\": \"gpt-3.5-turbo\",\n \"version\": \"v0.1\",\n \"provider\": \"openai\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"top_p\": 1,\n \"max_tokens\": 1000,\n \"presence_penalty\": 0,\n \"frequency_penalty\": 0,\n \"stop\": [\n \"\u003cvalue>\",\n ],\n \"n\": 1,\n },\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\n\n Context: {{ context }}\",\n },\n {\n \"role\": \"user\",\n \"content\": \"{{question}}\",\n },\n ],\n \"type\": \"chat\",\n },\n inputs: {\n \"context\": \"Hello world\",\n \"question\": \"What is in the context?\",\n \"chat_history\": [\n {\n \"role\": \"system\",\n \"content\": \"Answer the user's question only using provided context.\n\n Context: Hello world\",\n },\n {\n \"role\": \"user\",\n \"content\": \"What is in the context?\",\n },\n ],\n },\n outputs: {\n \"role\": \"assistant\",\n \"content\": \"Hello world\",\n },\n error: null,\n startTime: 1714978764301,\n endTime: 1714978765301,\n duration: 999.8056,\n metadata: {\n \"cost\": 0.00008,\n \"completion_tokens\": 23,\n \"prompt_tokens\": 35,\n \"total_tokens\": 58,\n },\n feedback: {\n\n },\n metrics: {\n \"Answer Faithfulness\": 5,\n \"Answer Faithfulness_explanation\": \"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.\",\n \"Number of words\": 18,\n },\n userProperties: {\n \"user\": \"google-oauth2|111840237613341303366\",\n },\n },\n });\n\n if (res.statusCode == 200) {\n // handle response\n }\n}\n\nrun();"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"object","properties":{"project":{"type":"string","description":"Project associated with the event","isRequired":true,"uniqueKey":"event.project","typeLabel":"string"},"source":{"type":"string","description":"Source of the event - production, staging, etc","isRequired":true,"uniqueKey":"event.source","typeLabel":"string"},"event_name":{"type":"string","description":"Name of the event","isRequired":true,"uniqueKey":"event.event_name","typeLabel":"string"},"event_type":{"type":"string","enum":["model","tool","chain"],"description":"Specify whether the event is of \"model\", \"tool\" or \"chain\" type","isRequired":true,"uniqueKey":"event.event_type","typeLabel":"enum\u003cstring>"},"config":{"type":"object","additionalProperties":true,"description":"Associated configuration JSON for the event - model name, vector index name, etc","isRequired":true,"uniqueKey":"event.config","typeLabel":"object"},"inputs":{"type":"object","additionalProperties":true,"description":"Input JSON given to the event - prompt, chunks, etc","properties":{"chat_history":{"type":"array","items":{"type":"object","additionalProperties":true,"uniqueKey":"event.inputs.chat_history.items.[INDEX]","typeLabel":"object"},"description":"Messages passed to the model","uniqueKey":"event.inputs.chat_history","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"event.inputs","typeLabel":"object"},"duration":{"type":"number","description":"How long the event took in milliseconds","isRequired":true,"uniqueKey":"event.duration","typeLabel":"number"},"event_id":{"type":"string","description":"Unique id of the event, if not set, it will be auto-generated","uniqueKey":"event.event_id","typeLabel":"string"},"session_id":{"type":"string","description":"Unique id of the session associated with the event, if not set, it will be auto-generated","uniqueKey":"event.session_id","typeLabel":"string"},"parent_id":{"type":"string","description":"Id of the parent event if nested","uniqueKey":"event.parent_id","typeLabel":"string"},"children_ids":{"type":"array","items":{"type":"string","uniqueKey":"event.children_ids.items.[INDEX]","typeLabel":"string"},"description":"Id of events that are nested within the event","uniqueKey":"event.children_ids","typeLabel":"string[]"},"outputs":{"type":"object","additionalProperties":true,"description":"Final output JSON of the event","uniqueKey":"event.outputs","typeLabel":"object"},"error":{"type":"string","description":"Any error description if event failed","uniqueKey":"event.error","typeLabel":"string"},"start_time":{"type":"number","description":"UTC timestamp (in milliseconds) for the event start","uniqueKey":"event.start_time","typeLabel":"number"},"end_time":{"type":"integer","description":"UTC timestamp (in milliseconds) for the event end","uniqueKey":"event.end_time","typeLabel":"integer"},"metadata":{"type":"object","additionalProperties":true,"description":"Any system or application metadata associated with the event","uniqueKey":"event.metadata","typeLabel":"object"},"feedback":{"type":"object","additionalProperties":true,"description":"Any user feedback provided for the event output","uniqueKey":"event.feedback","typeLabel":"object"},"metrics":{"type":"object","additionalProperties":true,"description":"Any values computed over the output of the event","uniqueKey":"event.metrics","typeLabel":"object"},"user_properties":{"type":"object","additionalProperties":true,"description":"Any user properties associated with the event","uniqueKey":"event.user_properties","typeLabel":"object"}},"required":["project","event_type","event_name","source","config","inputs","duration"],"example":{"project":"Simple RAG","event_type":"model","event_name":"Model Completion","source":"playground","session_id":"caf77ace-3417-4da4-944d-f4a0688f3c23","event_id":"7f22137a-6911-4ed3-bc36-110f1dde6b66","parent_id":"caf77ace-3417-4da4-944d-f4a0688f3c23","children_ids":[],"config":{"model":"gpt-3.5-turbo","version":"v0.1","provider":"openai","hyperparameters":{"temperature":0,"top_p":1,"max_tokens":1000,"presence_penalty":0,"frequency_penalty":0,"stop":[],"n":1},"template":[{"role":"system","content":"Answer the user's question only using provided context.\n\nContext: {{ context }}"},{"role":"user","content":"{{question}}"}],"type":"chat"},"inputs":{"context":"Hello world","question":"What is in the context?","chat_history":[{"role":"system","content":"Answer the user's question only using provided context.\n\nContext: Hello world"},{"role":"user","content":"What is in the context?"}]},"outputs":{"role":"assistant","content":"Hello world"},"error":null,"start_time":1714978764301,"end_time":1714978765301,"duration":999.8056,"metadata":{"cost":0.00008,"completion_tokens":23,"prompt_tokens":35,"total_tokens":58},"feedback":{},"metrics":{"Answer Faithfulness":5,"Answer Faithfulness_explanation":"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.","Number of words":18},"user_properties":{"user":"google-oauth2|111840237613341303366"}},"uniqueKey":"event","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"event":{"project":"Simple RAG","event_type":"model","event_name":"Model Completion","source":"playground","session_id":"caf77ace-3417-4da4-944d-f4a0688f3c23","event_id":"7f22137a-6911-4ed3-bc36-110f1dde6b66","parent_id":"caf77ace-3417-4da4-944d-f4a0688f3c23","children_ids":[],"config":{"model":"gpt-3.5-turbo","version":"v0.1","provider":"openai","hyperparameters":{"temperature":0,"top_p":1,"max_tokens":1000,"presence_penalty":0,"frequency_penalty":0,"stop":[],"n":1},"template":[{"role":"system","content":"Answer the user's question only using provided context.\n\nContext: {{ context }}"},{"role":"user","content":"{{question}}"}],"type":"chat"},"inputs":{"context":"Hello world","question":"What is in the context?","chat_history":[{"role":"system","content":"Answer the user's question only using provided context.\n\nContext: Hello world"},{"role":"user","content":"What is in the context?"}]},"outputs":{"role":"assistant","content":"Hello world"},"error":null,"start_time":1714978764301,"end_time":1714978765301,"duration":999.8056,"metadata":{"cost":0.00008,"completion_tokens":23,"prompt_tokens":35,"total_tokens":58},"feedback":{},"metrics":{"Answer Faithfulness":5,"Answer Faithfulness_explanation":"The AI assistant's answer is a concise and accurate description of Ramp's API. It provides a clear explanation of what the API does and how developers can use it to integrate Ramp's financial services into their own applications. The answer is faithful to the provided context.","Number of words":18},"user_properties":{"user":"google-oauth2|111840237613341303366"}}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"8fc33856-99eb-4096-bfcf-15e552ca46d2":{"description":"Event created","content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","uniqueKey":"event_id","typeLabel":"string"},"success":{"type":"boolean","uniqueKey":"success","typeLabel":"boolean"}},"example":{"event_id":"7f22137a-6911-4ed3-bc36-110f1dde6b66","success":true},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"event_id":"7f22137a-6911-4ed3-bc36-110f1dde6b66","success":true}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a9b62862-c317-4d53-990d-dc3e72abce55":{"BearerAuth":{"type":"http","scheme":"bearer","scopes":[]}}},"servers":{"9c085861-5b70-49fb-8539-db0cd1f26b97":{"url":"https://api.honeyhive.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"output.yaml"},"subdomain":"honeyhiveai","siteName":"HoneyHive AI Docs","title":"Create a new event - HoneyHive AI Docs","relatedPagesConfig":{"enabled":true,"limit":3,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-26T20:56:27.432Z","originalFileLocation":"api-reference/events/create-a-new-event.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Please refer to our instrumentation guide for detailed information\">\u003cmeta data-mint-head name=\"application-name\" content=\"HoneyHive AI Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"noindex\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a new event - HoneyHive AI Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Please refer to our instrumentation guide for detailed information\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"HoneyHive AI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.honeyhive.ai/api-reference/events/create-a-new-event\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://honeyhiveai.mintlify.site/_mintlify/api/og/v2?division=Events\u0026amp;title=Create+a+new+event\u0026amp;description=Please+refer+to+our+instrumentation+guide+for+detailed+information\u0026amp;theme=5d33c6c4b6bf57211dea5b47\u0026amp;signature=0d174096972a44c5a584e9a332428f9a7705b6cdb4c632046aaecef11c3874d6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a new event - HoneyHive AI Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Please refer to our instrumentation guide for detailed information\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://honeyhiveai.mintlify.site/_mintlify/api/og/v2?division=Events\u0026amp;title=Create+a+new+event\u0026amp;description=Please+refer+to+our+instrumentation+guide+for+detailed+information\u0026amp;theme=5d33c6c4b6bf57211dea5b47\u0026amp;signature=0d174096972a44c5a584e9a332428f9a7705b6cdb4c632046aaecef11c3874d6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/honeyhiveai/XiZ-DZ6IaFrWYjlm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"HoneyHive AI Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#A56311\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.honeyhive.ai/api-reference/events/create-a-new-event\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/events/create-a-new-event.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"HoneyHive AI Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"HoneyHive AI Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/events/create-a-new-event.md","siteName":"HoneyHive AI Docs","nav":{"global":{},"products":[{"product":"v2","icon":"hive","description":"The next generation of HoneyHive.","pages":[{"title":"v2","href":"/v2/introduction/what-is-hhai"}]},{"product":"v1 (legacy)","icon":"server","description":"Deprecating Nov 5, 2026.","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction/what-is-hhai"}]},{"tab":"SDK Reference","pages":[{"title":"SDK Reference","href":"/sdk-reference/authentication"}]},{"tab":"API Reference","groups":[{"group":"Session","pages":[{"openapi":"output.yaml post /session/start","title":"Start a new session","href":"/api-reference/session/start-a-new-session"},{"openapi":"get /session/{session_id}","title":"Retrieve a session","href":"/api-reference/session/retrieve-a-session"}]},{"group":"Events","pages":[{"openapi":"output.yaml put /events","title":"Update an event","description":null,"href":"/api-reference/events/update-an-event"},{"openapi":"output.yaml post /events","title":"Create a new event","href":"/api-reference/events/create-a-new-event"},{"openapi":"post /events/export","title":"Retrieve events based on filters","description":null,"href":"/api-reference/events/retrieve-events-based-on-filters"},{"openapi":"output.yaml post /events/model","title":"Create a new model event","href":"/api-reference/events/create-a-new-model-event"},{"openapi":"output.yaml post /events/batch","title":"Create a batch of events","href":"/api-reference/events/create-a-batch-of-events"},{"openapi":"output.yaml post /events/model/batch","title":"Create a batch of model events","href":"/api-reference/events/create-a-batch-of-model-events"}]},{"group":"Metrics","pages":[{"openapi":"get /metrics","title":"Get all metrics","href":"/api-reference/metrics/get-all-metrics"},{"openapi":"put /metrics","title":"Update an existing metric","href":"/api-reference/metrics/update-an-existing-metric"},{"openapi":"post /metrics","title":"Create a new metric","href":"/api-reference/metrics/create-a-new-metric"},{"openapi":"delete /metrics","title":"Delete a metric","href":"/api-reference/metrics/delete-a-metric"}]},{"group":"Datapoints","pages":[{"openapi":"get /datapoints","title":"Retrieve a list of datapoints","href":"/api-reference/datapoints/retrieve-a-list-of-datapoints"},{"openapi":"post /datapoints","title":"Create a new datapoint","href":"/api-reference/datapoints/create-a-new-datapoint"},{"openapi":"get /datapoints/{id}","title":"Retrieve a specific datapoint","href":"/api-reference/datapoints/retrieve-a-specific-datapoint"},{"openapi":"put /datapoints/{id}","title":"Update a specific datapoint","href":"/api-reference/datapoints/update-a-specific-datapoint"},{"openapi":"delete /datapoints/{id}","title":"Delete a specific datapoint","href":"/api-reference/datapoints/delete-a-specific-datapoint"}]},{"group":"Datasets","pages":[{"openapi":"get /datasets","title":"Get datasets","href":"/api-reference/datasets/get-datasets"},{"openapi":"put /datasets","title":"Update a dataset","href":"/api-reference/datasets/update-a-dataset"},{"openapi":"post /datasets","title":"Create a dataset","href":"/api-reference/datasets/create-a-dataset"},{"openapi":"delete /datasets","title":"Delete a dataset","href":"/api-reference/datasets/delete-a-dataset"},{"openapi":"post /datasets/{dataset_id}/datapoints","title":"Add datapoints to a dataset","href":"/api-reference/datasets/add-datapoints-to-a-dataset"}]},{"group":"Projects","pages":[{"openapi":"get /projects","title":"Get a list of projects","href":"/api-reference/projects/get-a-list-of-projects"},{"openapi":"put /projects","title":"Update an existing project","href":"/api-reference/projects/update-an-existing-project"},{"openapi":"post /projects","title":"Create a new project","href":"/api-reference/projects/create-a-new-project"},{"openapi":"delete /projects","title":"Delete a project","href":"/api-reference/projects/delete-a-project"}]},{"group":"Experiments","pages":[{"openapi":"get /runs","title":"Get a list of evaluation runs","href":"/api-reference/experiments/get-a-list-of-evaluation-runs"},{"openapi":"post /runs","title":"Create a new evaluation run","href":"/api-reference/experiments/create-a-new-evaluation-run"},{"openapi":"get /runs/{run_id}","title":"Get details of an evaluation run","href":"/api-reference/experiments/get-details-of-an-evaluation-run"},{"openapi":"put /runs/{run_id}","title":"Update an evaluation run","href":"/api-reference/experiments/update-an-evaluation-run"},{"openapi":"delete /runs/{run_id}","title":"Delete an evaluation run","href":"/api-reference/experiments/delete-an-evaluation-run"},{"openapi":"get /runs/{run_id}/result","title":null,"href":"/api-reference/experiments/retrieve-experiment-result"},{"openapi":"get /runs/{run_id_1}/compare-with/{run_id_2}","title":null,"href":"/api-reference/experiments/retrieve-experiment-comparison"}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/langchain"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/changelog"}]}]}]},"basePath":"","title":"Create a new event - HoneyHive AI Docs","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","Page-BIYvYBgk.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js","Markdown-CEfymfIH.js","clsx-Dq9TQuNi.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-D2J8knkn.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BgZ2ThuU.js"]}