POST
/
generations
Authorization
Body
curl --request POST \
  --url https://api.honeyhive.ai/generations \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "best_of": 123,
  "ground_truth": "<string>",
  "input": {},
  "metadata": {},
  "metric": "<string>",
  "model_id": "<string>",
  "prompts": [
    "<string>"
  ],
  "sampling": "<string>",
  "source": "<string>",
  "stream": true,
  "task": "<string>",
  "user_properties": {}
}'
{
  "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
best_of
integer

The number of generations to be returned

ground_truth
string

The ground truth of the generation

input
object

The input variables for the generation

metadata
object

The metadata to track for the generation

metric
string

The metric used for sorting the generations

model_id
string

The unique ID of the fine-tuned model to generate from

prompts
string[]

The unique IDs of the prompts to generate from

sampling
string

The sampling method used for generating the generations

source
string

The source of the generation

stream
boolean

A boolean flag that represents whether you want to generate a streaming output

task
string

The task for which the generation is being requested

user_properties
object

The user properties to track for the generation

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