Skip to main content
POST
/
api
/
agents
/
{id}
/
test-prompts
Add evaluation questions
curl --request POST \
  --url https://agent-evalserver-production.up.railway.app/api/agents/{id}/test-prompts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "prompts": [
    {
      "prompt": "What is your refund policy?",
      "expectedAnswer": "Customers can request a refund within 30 days."
    },
    {
      "prompt": "How can customers contact support?",
      "expectedAnswer": "Customers can contact support by email or chat."
    }
  ]
}
'
[
  {
    "id": 42,
    "prompt": "What is your refund policy?",
    "expectedAnswer": "Customers can request a refund within 30 days.",
    "testAnswer": null,
    "created_at": "2026-06-02T15:10:00Z",
    "updated_at": "2026-06-02T15:10:00Z"
  },
  {
    "id": 43,
    "prompt": "How can customers contact support?",
    "expectedAnswer": "Customers can contact support by email or chat.",
    "testAnswer": null,
    "created_at": "2026-06-02T15:10:00Z",
    "updated_at": "2026-06-02T15:10:00Z"
  }
]

Authorizations

x-api-key
string
header
required

Platform API key for authenticated account-level API access

Path Parameters

id
string<uuid>
required

Evaluation agent ID.

Body

application/json

Create one or more prompts to evaluate against an agent.

prompts
object[]
required

Prompts to add to the evaluation suite.

Response

Test prompts created

id
integer

Numeric prompt identifier. Use this ID when submitting a result for the prompt.

Example:

42

prompt
string

Question or task sent to the evaluated agent.

Example:

"What is your refund policy?"

expectedAnswer
string | null

Optional answer used as the reference for evaluation.

Example:

"Customers can request a refund within 30 days."

testAnswer
string | null

Latest answer captured for this prompt, when available.

Example:

"Customers can request a refund within 30 days of purchase."

created_at
string<date-time>

Creation timestamp.

Example:

"2026-06-02T15:10:00Z"

updated_at
string<date-time>

Last update timestamp.

Example:

"2026-06-02T15:12:00Z"