POST
/
generations
/
log
Authorization
Body
curl --request POST \
  --url https://api.honeyhive.ai/generations/log \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "feedback": {},
  "generation": "<string>",
  "ground_truth": "<string>",
  "hyperparameters": {},
  "inputs": {},
  "latency": 123,
  "metadata": {},
  "model": "<string>",
  "prompt": "<string>",
  "source": "<string>",
  "task": "<string>",
  "usage": {},
  "user_properties": {},
  "version": "<string>"
}'
{
  "generation": "<string>",
  "generation_id": "<string>",
  "stream": true,
  "version": "<string>"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
feedback
object

The feedback associated with this generation

generation
string

The text that was generated by the model provider

ground_truth
string

The ground truth for the generation

hyperparameters
object

The hyperparameters that were used to generate the text

inputs
object

The inputs filled into the prompt

latency
number

The latency of the generation in milliseconds

metadata
object

The metadata to track for the generation

model
string

The model that was used to generate the text

prompt
string

The prompt used to generate the text

source
string

The source of the generation

task
string

The task for which the generation is being logged

usage
object

The token usage for the generation

user_properties
object

The user properties to track for the generation

version
string

The version of the prompt

Response

200 - application/json
generation
string

The generated completion

generation_id
string

The unique ID of the generation

stream
boolean

Is stream output

version
string

The unique ID of the prompt