POST
/
evaluate
/
{id}
/
generate
curl --request POST \
  --url https://app.happyrobot.ai/api/v1/evaluate/{id}/generate \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "agent_id": "<string>",
  "messages": [
    {
      "id": "<string>",
      "role": "system",
      "content": "<string>",
      "tool_calls": [
        {
          "type": "<string>",
          "id": "<string>",
          "function": {
            "name": "<string>",
            "arguments": "<string>"
          }
        }
      ],
      "name": "<string>",
      "tool_call_id": "<string>",
      "start": 123,
      "end": 123,
      "unpreferred_messages": [
        {
          "id": "<string>",
          "content": "<string>",
          "tool_calls": [
            {
              "type": "<string>",
              "id": "<string>",
              "function": {
                "name": "<string>",
                "arguments": "<string>"
              }
            }
          ]
        }
      ],
      "interrupted_thoughts": "<string>",
      "is_filler": true,
      "discard": true
    }
  ],
  "model": "<string>",
  "temperature": 123,
  "date": "<string>",
  "params": {},
  "language": "en-US"
}'
{
  "id": "<string>",
  "role": "system",
  "content": "<string>",
  "tool_calls": [
    {
      "type": "<string>",
      "id": "<string>",
      "function": {
        "name": "<string>",
        "arguments": "<string>"
      }
    }
  ],
  "name": "<string>",
  "tool_call_id": "<string>",
  "start": 123,
  "end": 123,
  "unpreferred_messages": [
    {
      "id": "<string>",
      "content": "<string>",
      "tool_calls": [
        {
          "type": "<string>",
          "id": "<string>",
          "function": {
            "name": "<string>",
            "arguments": "<string>"
          }
        }
      ]
    }
  ],
  "interrupted_thoughts": "<string>",
  "is_filler": true,
  "discard": true
}

Headers

authorization
string
required

Your API key for authentication. Use Bearer format.

Path Parameters

id
string
required

Body

application/json
agent_id
string
required
messages
object[]
required
model
string
required
temperature
number
default: 0.1
date
string
params
object | null
language
enum<string>
required
Available options:
en-US,
es-MX,
es-ES,
in-IN

Response

200 - application/json
id
string
required

Unique identifier for the message.

role
enum<string>
required

Role of the message.

Available options:
system,
assistant,
user,
tool
content
string

Content of the message.

tool_calls
object[]

Tool calls made by the assistant.

name
string

Name of the tool.

tool_call_id
string

ID of the tool call.

start
number
required

Start time in seconds.

end
number

End time in seconds.

unpreferred_messages
object[]

Unpreferred messages.

interrupted_thoughts
string | null

Thoughts that the assistant was going to speak when the user interrupted.

is_filler
boolean

Whether the message is a filler acknowledgement.

discard
boolean
default: false

Whether the message should be discarded when generating a dataset.