Skip to main content

Run an assessment via the API

For integrations that drive the assessment from their own UI (rather than embedding the widget), you can create and run an evaluation directly against the public API.

1. Create an evaluation

curl -X POST "https://$WISELOOK_HOST/v1/evaluations" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"methodology_id": "<METHODOLOGY_UUID>", "locale": "en-US"}'

The response carries the new evaluation_id and its status (in_progress). Locale is fixed from this point.

2. Drive the conversation

Send each visitor turn to the chat endpoint; the response is an SSE stream of Claire's reply:

curl -N -X POST "https://$WISELOOK_HOST/v1/chat/messages" \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"evaluation_id": "<EVALUATION_ID>", "content": "Hello"}'

The stream emits semantic events (message_start, message_delta, message_complete, progress_update, assessment_complete, stream_end) — never raw model tokens. Render message_delta as it arrives.

3. Read the result

When the conversation reaches assessment_complete, scoring runs asynchronously and the evaluation moves to completed. Poll the evaluation, then read its transcript:

curl "https://$WISELOOK_HOST/v1/evaluations/<EVALUATION_ID>" \
-H "Authorization: Bearer $TOKEN"

curl "https://$WISELOOK_HOST/v1/transcripts/<EVALUATION_ID>" \
-H "Authorization: Bearer $TOKEN"

See also